/* نظام أوامر الصرف — راحة */
@font-face { font-family: "Plex Arabic"; src: url("fonts/IBMPlexSansArabic-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Arabic"; src: url("fonts/IBMPlexSansArabic-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Arabic"; src: url("fonts/IBMPlexSansArabic-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex Arabic"; src: url("fonts/IBMPlexSansArabic-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --ink: #16324a;
  --ink-2: #4a6275;
  --navy: #1e4a66;
  --teal: #1bb394;
  --teal-deep: #11866e;
  --teal-wash: #e7f6f2;
  --blue: #0b7ec1;
  --paper: #ffffff;
  --mist: #f1f5f7;
  --line: #d4dfe6;
  --line-soft: #e6edf1;
  --warn: #8a5300;
  --warn-wash: #fff4e0;
  --danger: #b42318;
  --danger-wash: #fdeceb;
  --ok: #11734f;
  --ok-wash: #e4f5ec;
  --focus: #0b7ec1;
  --radius-s: 6px;
  --radius-m: 10px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Plex Arabic", "Segoe UI", Tahoma, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--mist);
}
[hidden] { display: none !important; }
a { color: var(--blue); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.muted { color: var(--ink-2); }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.num { font-variant-numeric: tabular-nums; }

/* ——— الأزرار ——— */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: var(--radius-s);
  border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--ink-2); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: #163a52; }
.btn.go { background: var(--teal-deep); border-color: var(--teal-deep); color: #fff; }
.btn.go:hover { background: #0d6f5b; }
.btn.danger { color: var(--danger); border-color: #e7b4ae; }
.btn.danger.solid { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.small { min-height: 32px; padding: 0 10px; font-size: 13.5px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px;
  border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--paper); cursor: pointer;
}
.icon-btn svg { width: 18px; height: 18px; }

/* ——— الحقول ——— */
label { display: block; font-weight: 500; font-size: 14px; color: var(--ink-2); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input:not([type]), select, textarea {
  display: block; width: 100%; margin-top: 4px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--paper);
  color: var(--ink); font-weight: 400; min-height: 40px;
}
textarea { min-height: 84px; resize: vertical; }
input:disabled, select:disabled, textarea:disabled { background: var(--mist); color: var(--ink); opacity: 1; }
input[readonly] { background: var(--mist); }
.choice { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; color: var(--ink); cursor: pointer; padding: 4px 0; margin-inline-end: 22px; }
.choice input { width: 18px; height: 18px; margin: 0; accent-color: var(--navy); }
.stack > * + * { margin-top: 14px; }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.row .full { grid-column: 1 / -1; }
.hint { font-size: 13px; color: var(--ink-2); font-weight: 400; }

/* ——— التنبيهات ——— */
.note { border-radius: var(--radius-s); padding: 10px 14px; margin: 12px 0; border: 1px solid; }
.note.ok { background: var(--ok-wash); border-color: #b5dfca; color: var(--ok); }
.note.warn { background: var(--warn-wash); border-color: #f1d29c; color: var(--warn); }
.note.err { background: var(--danger-wash); border-color: #f0b9b3; color: var(--danger); }
.note.info { background: #e8f3fa; border-color: #b9d9ee; color: #0a5f92; }
.note strong { display: block; }
code { background: var(--mist); padding: 2px 6px; border-radius: 4px; word-break: break-all; }

/* ——— الشريط العلوي ——— */
.topbar {
  display: flex; align-items: center; gap: 16px; padding: 10px 22px;
  background: var(--paper); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.topbar .brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.topbar .brand img { height: 38px; }
.topbar .brand span { font-weight: 600; font-size: 15px; border-inline-start: 1px solid var(--line); padding-inline-start: 12px; }
.topbar .who { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.topbar .who .meta { text-align: end; line-height: 1.3; }
.topbar .who .meta b { display: block; font-weight: 600; }
.topbar .who .meta small { color: var(--ink-2); }

/* ——— الدخول ——— */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card {
  width: min(420px, 100%); background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-m); padding: 30px 28px; border-top: 5px solid var(--teal);
}
.login-card img { height: 58px; display: block; margin: 0 auto 12px; }
.login-card h1 { font-size: 22px; text-align: center; margin: 0 0 4px; color: var(--navy); }
.login-card p.sub { text-align: center; color: var(--ink-2); margin: 0 0 20px; font-size: 14px; }
.login-card .btn { width: 100%; margin-top: 18px; }

/* ——— التخطيط الرئيسي ——— */
.layout { display: grid; grid-template-columns: 370px minmax(0, 1fr); min-height: calc(100vh - 59px); }
.sidebar { background: var(--paper); border-inline-end: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; position: sticky; top: 59px; height: calc(100vh - 59px); }
.sidebar .side-head { padding: 16px 16px 10px; display: flex; gap: 10px; align-items: center; }
.sidebar .side-head h2 { margin: 0; font-size: 17px; flex: 1; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; border-bottom: 1px solid var(--line-soft); }
.filters button {
  border: 1px solid var(--line); background: var(--paper); border-radius: 999px;
  padding: 3px 12px; font-size: 13.5px; cursor: pointer; color: var(--ink-2);
}
.filters button[aria-pressed=true] { background: var(--navy); border-color: var(--navy); color: #fff; }
.filters button .count { font-variant-numeric: tabular-nums; margin-inline-start: 4px; opacity: .8; }
.search { padding: 10px 16px; border-bottom: 1px solid var(--line-soft); }
.search input { margin: 0; }
.order-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.order-list li button {
  display: block; width: 100%; text-align: start; border: 0; background: transparent;
  padding: 12px 16px; border-bottom: 1px solid var(--line-soft); cursor: pointer;
}
.order-list li button:hover { background: #f7fafb; }
.order-list li button[aria-current=true] { background: var(--teal-wash); box-shadow: inset -4px 0 0 var(--teal); }
.order-list .l1 { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.order-list .l1 b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-list .amt { font-weight: 600; white-space: nowrap; }
.order-list .l2 { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.order-list .empty { padding: 30px 18px; color: var(--ink-2); text-align: center; }
.order-list .mine-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); margin-inline-end: 6px; vertical-align: middle; }

.main { padding: 22px 26px 120px; min-width: 0; }
.main .blank { max-width: 520px; margin: 12vh auto; text-align: center; color: var(--ink-2); }
.main .blank h2 { color: var(--ink); font-size: 20px; margin-bottom: 6px; }

/* ——— الحالة ——— */
.status { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 2px 10px; font-size: 12.5px; font-weight: 600; white-space: nowrap; border: 1px solid; }
.status.draft { color: var(--ink-2); border-color: var(--line); background: var(--mist); }
.status.pending, .status.pending_support, .status.pending_executive { color: #0a5f92; border-color: #b9d9ee; background: #eaf4fb; }
.status.returned { color: var(--warn); border-color: #f1d29c; background: var(--warn-wash); }
.status.approved { color: var(--ok); border-color: #b5dfca; background: var(--ok-wash); }
.status.cancelled { color: var(--danger); border-color: #f0b9b3; background: var(--danger-wash); }

/* ——— رأس الأمر ——— */
.order-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 16px; }
.order-head h1 { margin: 0; font-size: 22px; color: var(--navy); }
.order-head .no { font-weight: 700; }
.order-head .tools { margin-inline-start: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ——— مسار التوقيعات (العنصر المميز) ——— */
.rail { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; margin-bottom: 18px; }
.rail .step { padding: 12px 14px 14px; position: relative; border-inline-start: 1px solid var(--line-soft); min-height: 150px; display: flex; flex-direction: column; }
.rail .step:first-child { border-inline-start: 0; }
.rail .step::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 4px; background: var(--line-soft); }
.rail .step.done::before { background: var(--teal); }
.rail .step.active::before { background: var(--blue); }
.rail .step .t { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.rail .step .t small { color: var(--ink-2); font-size: 12.5px; }
.rail .step .t b { font-weight: 600; font-size: 14.5px; }
.rail .sig-area {
  flex: 1; margin-top: 8px; border: 1px dashed var(--line); border-radius: var(--radius-s);
  display: grid; place-items: center; min-height: 72px; background: #fbfdfd; padding: 6px;
}
.rail .sig-area img { max-height: 66px; max-width: 100%; display: block; }
.rail .sig-area .pending { color: var(--ink-2); font-size: 13px; }
.rail .who { margin-top: 6px; font-size: 13px; }
.rail .who b { font-weight: 600; }
.rail .who time { display: block; text-align: start; unicode-bidi: isolate; color: var(--ink-2); font-size: 12.5px; }
.rail .stale { color: var(--warn); font-size: 12.5px; }

/* ——— الورقة (النموذج) ——— */
.sheet { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 6px 22px 22px; }
.sheet .letterhead { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: start; padding: 16px 0 12px; border-bottom: 2px solid var(--teal); }
.sheet .letterhead .org { font-size: 13.5px; line-height: 1.7; }
.sheet .letterhead .org b { color: var(--navy); }
.sheet .letterhead .mark { text-align: center; }
.sheet .letterhead .mark img { height: 54px; display: block; margin: 0 auto 2px; }
.sheet .letterhead .mark strong { display: block; font-size: 21px; color: var(--navy); font-weight: 700; }
.sheet .letterhead .meta { justify-self: end; font-size: 13.5px; }
.sheet .letterhead .meta div { display: flex; gap: 10px; justify-content: space-between; min-width: 210px; }
.sheet .letterhead .meta span { color: var(--ink-2); }
.sec { margin-top: 18px; }
.sec > h3 {
  margin: 0 0 12px; font-size: 15px; font-weight: 600; color: var(--navy);
  background: var(--teal-wash); padding: 6px 12px; border-inline-start: 4px solid var(--teal); border-radius: 2px;
}
.ro-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius-s); }
.ro-grid > div { padding: 9px 12px; border-bottom: 1px solid var(--line-soft); border-inline-start: 1px solid var(--line-soft); min-width: 0; }
.ro-grid > div:nth-child(odd) { border-inline-start: 0; }
.ro-grid > div.full { grid-column: 1 / -1; border-inline-start: 0; }
.ro-grid span { display: block; color: var(--ink-2); font-size: 12.5px; }
.ro-grid b { font-weight: 600; overflow-wrap: anywhere; white-space: pre-wrap; }
.ro-grid b.empty { color: #9aabb7; font-weight: 400; }
.total-strip { display: flex; flex-wrap: wrap; gap: 6px 24px; align-items: baseline; margin-top: 12px; padding: 10px 14px; background: var(--mist); border-radius: var(--radius-s); }
.total-strip .big { font-size: 22px; font-weight: 700; color: var(--navy); }
.total-strip .words { color: var(--ink-2); }

/* ——— المرفقات ——— */
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.file {
  position: relative; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--paper);
  padding: 12px; display: flex; flex-direction: column; gap: 6px; min-height: 120px;
}
.file .kind { font-size: 11.5px; font-weight: 700; color: #fff; background: var(--navy); align-self: flex-start; border-radius: 3px; padding: 0 6px; direction: ltr; }
.file .kind.img { background: var(--blue); }
.file .name { font-weight: 500; font-size: 14px; overflow-wrap: anywhere; line-height: 1.4; }
.file .size { font-size: 12.5px; color: var(--ink-2); }
.file .acts { margin-top: auto; display: flex; gap: 6px; align-items: center; }
.file .seen { font-size: 12.5px; color: var(--ok); margin-inline-start: auto; }
.file .unseen { font-size: 12.5px; color: var(--warn); margin-inline-start: auto; }
.file.add { border-style: dashed; align-items: center; justify-content: center; text-align: center; color: var(--ink-2); cursor: pointer; }
.file.add svg { width: 26px; height: 26px; }
.file.add:hover { border-color: var(--navy); color: var(--ink); }
.file.add.disabled { cursor: not-allowed; opacity: .6; }
.limits { font-size: 12.5px; color: var(--ink-2); margin-top: 8px; }

/* ——— شريط الإجراءات ——— */
.actionbar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 15;
  background: var(--paper); border-top: 1px solid var(--line);
  padding: 12px 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
}
.actionbar.with-side { inset-inline-start: 370px; }
.actionbar .reqs { display: flex; gap: 14px; font-size: 13.5px; margin-inline-end: auto; flex-wrap: wrap; }
.actionbar .reqs .y { color: var(--ok); }
.actionbar .reqs .n { color: var(--warn); }

/* ——— السجل ——— */
.timeline { list-style: none; margin: 0; padding: 0; border-inline-start: 2px solid var(--line); }
.timeline li { padding: 4px 16px 12px; position: relative; font-size: 14px; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: -6px; top: 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--paper); border: 2px solid var(--teal); }
.timeline time { unicode-bidi: isolate; display: inline-block; color: var(--ink-2); font-size: 12.5px; margin-inline-end: 8px; }
.timeline .by { font-weight: 600; }
details.log summary { cursor: pointer; font-weight: 600; color: var(--navy); padding: 6px 0; }

/* ——— النوافذ ——— */
dialog {
  border: 0; border-radius: var(--radius-m); padding: 0; width: min(560px, calc(100vw - 24px));
  box-shadow: 0 18px 60px rgba(22, 50, 74, .28); color: var(--ink);
}
dialog::backdrop { background: rgba(22, 50, 74, .45); }
dialog .d-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
dialog .d-head h2 { margin: 0; font-size: 17px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
dialog .d-body { padding: 18px; max-height: 70vh; overflow: auto; }
dialog .d-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-start; }
dialog.viewer { width: min(1100px, calc(100vw - 24px)); height: calc(100vh - 40px); }
dialog.viewer[open] { display: flex; flex-direction: column; }
dialog.viewer .d-body { flex: 1; max-height: none; padding: 0; background: #e9eef1; display: grid; place-items: center; }
dialog.viewer iframe { width: 100%; height: 100%; border: 0; background: #fff; }
dialog.viewer img { max-width: 100%; max-height: calc(100vh - 140px); display: block; background: #fff; }

/* ——— التنبيه العائم ——— */
.toast {
  position: fixed; bottom: 86px; left: 50%; transform: translateX(-50%); z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: var(--radius-s);
  max-width: min(560px, calc(100vw - 32px)); box-shadow: 0 8px 30px rgba(0,0,0,.2);
}
.toast.err { background: var(--danger); }
.toast.ok { background: var(--ok); }

/* ——— الإدارة ——— */
.tabs { display: flex; gap: 4px; padding: 0 22px; background: var(--paper); border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 12px 14px; cursor: pointer; color: var(--ink-2); font-weight: 500; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button[aria-selected=true] { color: var(--navy); border-bottom-color: var(--teal); font-weight: 600; }
.panel { max-width: 1100px; margin: 0 auto; padding: 22px; }
.panel h2 { font-size: 19px; margin: 0 0 4px; color: var(--navy); }
.panel .lead { color: var(--ink-2); margin: 0 0 16px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 18px 20px; }
.card + .card { margin-top: 16px; }
.card h3 { margin: 0 0 12px; font-size: 16px; }
.table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: start; font-weight: 600; color: var(--ink-2); font-size: 13px; background: #f7fafb; }
table.data th, table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
.pill { display: inline-block; border-radius: 999px; padding: 0 9px; font-size: 12.5px; background: var(--mist); border: 1px solid var(--line); white-space: nowrap; }
.pill.off { color: var(--danger); border-color: #f0b9b3; background: var(--danger-wash); }
.pill.on { color: var(--ok); border-color: #b5dfca; background: var(--ok-wash); }
.pill.warn { color: var(--warn); border-color: #f1d29c; background: var(--warn-wash); }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .grow { flex: 1; }

/* ——— صفحة التثبيت ——— */
body.plain { background: var(--mist); }
.install { max-width: 640px; margin: 40px auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 26px 28px; border-top: 5px solid var(--teal); }
.install-logo { height: 54px; display: block; margin-bottom: 8px; }
.install h1 { font-size: 21px; color: var(--navy); margin: 0 0 16px; }
.checks { width: 100%; border-collapse: collapse; margin-bottom: 14px; font-size: 14px; }
.checks td { padding: 6px 4px; border-bottom: 1px solid var(--line-soft); }
.checks .pass { color: var(--ok); font-weight: 600; }
.checks .fail { color: var(--danger); font-weight: 600; }
.checks .warn { color: var(--warn); }

/* ——— الاستجابة ——— */
.back-to-list { display: none !important; }
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { border-inline-end: 0; border-bottom: 1px solid var(--line); max-height: none; height: auto; position: static; }
  .order-list { max-height: 60vh; }
  .layout.detail-open .sidebar { display: none; }
  .actionbar.with-side { inset-inline-start: 0; }
  .main { padding: 16px 14px 160px; }
  .back-to-list { display: inline-flex !important; }
}
@media (max-width: 700px) {
  .row, .row.three, .ro-grid { grid-template-columns: 1fr; }
  .ro-grid > div { border-inline-start: 0 !important; }
  .rail { grid-template-columns: 1fr; }
  .rail .step { border-inline-start: 0; border-top: 1px solid var(--line-soft); min-height: 0; }
  .sheet { padding: 4px 14px 16px; }
  .sheet .letterhead { grid-template-columns: 1fr; text-align: center; }
  .sheet .letterhead .meta { justify-self: center; }
  .topbar { padding: 8px 12px; }
  .topbar .brand span { display: none; }
  .topbar .who .meta { display: none; }
  .actionbar { padding: 10px 12px; }
  .actionbar .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: no-preference) {
  .rail .step.active .sig-area { animation: pulse-line 2.4s ease-in-out 1; }
  @keyframes pulse-line { 0%, 100% { border-color: var(--line); } 50% { border-color: var(--blue); } }
}
@media print {
  .topbar, .sidebar, .actionbar, .tabs { display: none !important; }
}

/* ——— صفحة التخصيص ——— */
.cust-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.cust-row input[type=text], .cust-row select { margin: 0; }
.cust-row .tag { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.cust-fields { width: 100%; border-collapse: collapse; font-size: 14px; }
.cust-fields th { text-align: start; color: var(--ink-2); font-weight: 600; font-size: 13px; padding: 6px; border-bottom: 1px solid var(--line); }
.cust-fields td { padding: 6px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.cust-fields td input[type=text] { margin: 0; }
.cust-fields .center { text-align: center; }
.cust-fields input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--navy); }
.flow-preview { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; padding: 10px 12px; background: var(--mist); border-radius: var(--radius-s); font-size: 14px; }
.flow-preview .node { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 2px 12px; }
.flow-preview .arrow { color: var(--ink-2); }
.savebar { position: sticky; bottom: 0; background: var(--paper); border-top: 1px solid var(--line); padding: 12px 0; margin-top: 16px; display: flex; gap: 10px; align-items: center; z-index: 5; }
.subhead { font-size: 14px; font-weight: 600; color: var(--navy); margin: 16px 0 6px; }

/* ——— لوحة رسم التوقيع ——— */
.sig-pad {
  display: block; width: 100%; height: 210px; touch-action: none; cursor: crosshair;
  border: 1px dashed var(--line); border-radius: var(--radius-s);
  background:
    linear-gradient(to bottom, transparent calc(100% - 52px), #c9d6de calc(100% - 52px), #c9d6de calc(100% - 51px), transparent calc(100% - 51px)),
    #fff;
}
.sig-pad:focus-visible { outline: 3px solid var(--focus); }
