:root {
  --bg: #f4f7fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #35657b;
  --primary-hover: #2a5265;
  --primary-soft: #e9f1f4;
  --danger: #c62828;
  --danger-soft: #fdecec;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);

  --ast-reserved: #b45309;  --ast-reserved-bg: #fef3c7;
  --ast-issued: #15803d;    --ast-issued-bg: #dcfce7;
  --ast-returning: #c2410c; --ast-returning-bg: #ffedd5;
  --ast-available: #1d4ed8; --ast-available-bg: #dbeafe;
  --ast-retired: #475569;   --ast-retired-bg: #e2e8f0;
  --ok: #15803d; --warn: #c2410c;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; line-height: 1.3; }
h1 { font-size: 1.35rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: 1rem; }

.container { max-width: 1080px; margin: 0 auto; padding: 16px 16px 96px; }

/* ---------- الشريط العلوي ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px max(16px, calc((100% - 1080px) / 2 + 16px));
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand-logo { height: 40px; width: auto; }
.brand span { padding-inline-start: 10px; border-inline-start: 1px solid var(--border); }
.brand span { display: flex; flex-direction: column; line-height: 1.25; }
.brand small { color: var(--muted); font-size: .75rem; }
.nav { display: flex; gap: 4px; }
.nav a {
  padding: 8px 14px; border-radius: 8px; color: var(--muted); font-weight: 500;
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { color: var(--primary); background: var(--primary-soft); }
.nav a.nav-primary { background: var(--primary); color: #fff; }
.nav a.nav-primary:hover { background: var(--primary-hover); }

.bottomnav {
  position: fixed; bottom: 0; inset-inline: 0; z-index: 20;
  display: none; justify-content: space-around; align-items: end;
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
}
.bottomnav a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: .68rem; color: var(--muted); flex: 1; min-width: 0; padding: 4px 2px; text-align: center; line-height: 1.3;
}
.bottomnav a .ico { font-size: 1.2rem; line-height: 1; filter: grayscale(1); opacity: .7; }
.bottomnav a.active { color: var(--primary); font-weight: 600; }
.bottomnav a.active .ico { filter: none; opacity: 1; }

@media (max-width: 900px) {
  .nav { display: none; }
  .bottomnav { display: flex; }
  .topbar { padding: 10px 16px; }
}

/* ---------- عناصر عامة ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px;
}
.card + .card { margin-top: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 16px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); font-size: .85rem; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 8px 16px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-danger { color: var(--danger); border-color: #f3c4c4; }
.btn-danger:hover { background: var(--danger-soft); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-sm { min-height: 32px; padding: 4px 10px; font-size: .85rem; }
.btn-block { width: 100%; }

label.field { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--muted); font-weight: 500; }
input, select, textarea {
  font: inherit; color: var(--text); width: 100%;
  min-height: 42px; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: 9px; background: var(--surface);
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.req::after { content: " *"; color: var(--danger); }

.grid { display: grid; gap: 12px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 720px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ast-reserved { color: var(--ast-reserved); background: var(--ast-reserved-bg); }
.ast-issued { color: var(--ast-issued); background: var(--ast-issued-bg); }
.ast-returning { color: var(--ast-returning); background: var(--ast-returning-bg); }
.ast-available { color: var(--ast-available); background: var(--ast-available-bg); }
.ast-retired { color: var(--ast-retired); background: var(--ast-retired-bg); }
.mv-pending { color: var(--ast-reserved); background: var(--ast-reserved-bg); }
.mv-signed { color: var(--ast-issued); background: var(--ast-issued-bg); }
.mv-cancelled { color: var(--ast-retired); background: var(--ast-retired-bg); }

/* ---------- لوحة التحكم ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat {
  display: flex; flex-direction: column; gap: 4px; text-align: start;
  padding: 14px; border-radius: var(--radius); cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  font: inherit; color: inherit; position: relative; overflow: hidden;
}
.stat::before { content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.stat .num { font-size: 1.9rem; font-weight: 700; line-height: 1.1; color: var(--c); }
.stat .lbl { font-weight: 600; font-size: .9rem; }
.stat .hint { color: var(--muted); font-size: .75rem; }
.stat.selected { border-color: var(--c); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 25%, transparent); }

.toolbar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
.toolbar .search { flex: 1; min-width: 200px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); font: inherit; font-size: .82rem; cursor: pointer; color: var(--muted);
}
.chip.active { background: var(--text); color: #fff; border-color: var(--text); }

.list { display: flex; flex-direction: column; gap: 8px; }
.list-item {
  display: grid; grid-template-columns: auto 1fr auto; gap: 4px 14px; align-items: center;
  padding: 12px 14px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); transition: border-color .15s;
}
.list-item:hover { border-color: #b8c7d6; }
.list-item .num { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; grid-row: span 2; align-self: start; padding-top: 2px; }
.list-item .who { font-weight: 600; }
.list-item .who small { color: var(--muted); font-weight: 400; margin-inline-start: 6px; }
.list-item .what { color: var(--muted); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; grid-column: 2 / 4; }
.list-item .meta { text-align: end; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty .big { font-size: 2.2rem; }

/* ---------- نموذج الإدخال ---------- */
.items-table { width: 100%; border-collapse: collapse; }
.items-table th { text-align: start; font-size: .8rem; color: var(--muted); font-weight: 600; padding: 6px; border-bottom: 1px solid var(--border); }
.items-table td { padding: 6px; vertical-align: top; }
.items-table td.idx { color: var(--muted); padding-top: 16px; width: 28px; text-align: center; }
.items-table .qty { width: 90px; }
.items-table .cond { width: 150px; }
@media (max-width: 720px) {
  .items-table thead { display: none; }
  .items-table, .items-table tbody, .items-table tr, .items-table td { display: block; width: 100%; }
  .items-table tr {
    display: grid; grid-template-columns: 90px 1fr; gap: 8px;
    padding: 12px; margin-bottom: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2);
  }
  .items-table td { padding: 0; }
  .items-table td.idx { display: none; }
  .items-table td.desc, .items-table td.notes { grid-column: 1 / -1; }
  .items-table .qty, .items-table .cond { width: auto; }
  .items-table td.act { grid-column: 1 / -1; text-align: end; }
}

/* ---------- التفاصيل ---------- */
.detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 14px; align-items: start; }
@media (max-width: 860px) {
  /* على الجوال: صندوق الخطوة التالية يظهر أولاً */
  .detail-grid { display: flex; flex-direction: column; }
  .detail-grid > div { display: contents; }
  .detail-grid .card + .card { margin-top: 0; }
  .detail-grid .order-first { order: -1; }
}
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 520px) { .kv { grid-template-columns: 1fr 1fr; } }
.kv div span { display: block; color: var(--muted); font-size: .78rem; }
.kv div strong { font-weight: 600; }

.view-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.view-table th, .view-table td { padding: 8px; border-bottom: 1px solid var(--border); text-align: start; }
.view-table th { color: var(--muted); font-weight: 600; font-size: .78rem; background: var(--surface-2); }
.table-wrap { overflow-x: auto; }

.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.steps li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; position: relative; padding-bottom: 14px; }
.steps li:not(:last-child)::after {
  content: ""; position: absolute; inset-inline-start: 13px; top: 28px; bottom: 0; width: 2px; background: var(--border);
}
.steps li.done:not(:last-child)::after { background: var(--ok); }
.steps .dot {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--border); background: var(--surface); font-size: .8rem; color: var(--muted); font-weight: 700;
}
.steps li.done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps li.current .dot { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.steps .t { font-weight: 600; font-size: .9rem; }
.steps .d { color: var(--muted); font-size: .78rem; }

.action-box { border: 1px dashed #a9c4d0; background: var(--primary-soft); border-radius: var(--radius); padding: 14px; }
.action-box h3 { color: var(--primary); margin-bottom: 4px; }
.action-box p { margin: 0 0 12px; font-size: .85rem; color: #335; }
.action-box .row .btn { flex: 1; }

.attach { display: flex; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.attach + .attach { margin-top: 8px; }
.attach img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); background: #fff; }
.attach .pdf { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 6px; background: #fff; border: 1px solid var(--border); color: var(--danger); font-weight: 700; font-size: .8rem; }
.attach .info { flex: 1; min-width: 0; }
.attach .info strong { display: block; font-size: .88rem; }

.events { list-style: none; padding: 0; margin: 0; font-size: .84rem; }
.events li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.events li:last-child { border-bottom: 0; }
.events .when { color: var(--muted); font-size: .75rem; }

details.adv summary { cursor: pointer; color: var(--muted); font-size: .85rem; padding: 4px 0; }
details.adv[open] summary { margin-bottom: 8px; }

/* ---------- الدخول ---------- */
.login-wrap { min-height: 80vh; display: grid; place-items: center; }
.login { width: 100%; max-width: 380px; }
.login .logo { display: grid; place-items: center; margin-bottom: 14px; }
.login h1 { text-align: center; margin-bottom: 4px; }
.login p.muted { text-align: center; margin: 0 0 18px; font-size: .88rem; }
.login form { display: flex; flex-direction: column; gap: 12px; }
.error-msg { color: var(--danger); background: var(--danger-soft); padding: 8px 12px; border-radius: 8px; font-size: .85rem; }

/* ---------- نافذة وحوار ---------- */
dialog {
  border: 0; border-radius: 16px; padding: 0; width: min(520px, calc(100% - 24px));
  box-shadow: 0 20px 50px rgba(15, 23, 42, .25); color: var(--text);
}
dialog::backdrop { background: rgba(15, 23, 42, .45); }
.dlg-head { padding: 16px 18px 0; }
.dlg-body { padding: 14px 18px; max-height: 65vh; overflow: auto; }
.dlg-foot { padding: 12px 18px 16px; display: flex; gap: 8px; justify-content: flex-end; border-top: 1px solid var(--border); }

.toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--text); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: .9rem;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 100; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--danger); }

.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: grid; place-items: center; padding: 60px; color: var(--muted); }

/* ---------- إضافات: العهد والحركات ---------- */
a.stat { text-decoration: none; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .85em; letter-spacing: .2px; }
.warn-text { color: var(--warn); font-weight: 500; }
.ok-text { color: var(--ok); font-weight: 500; }
.ok-msg { color: var(--ok); background: var(--ast-issued-bg); padding: 10px 12px; border-radius: 8px; font-size: .9rem; }
.card.flush { padding: 0; overflow: hidden; }
.table-foot { padding: 8px 14px; border-top: 1px solid var(--border); }
.warn-card { border-color: #f5c9a8; background: #fffaf5; }

.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 16px; }
.quick-btn {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow); color: var(--text); transition: border-color .15s, transform .1s;
}
.quick-btn:hover { border-color: var(--primary); }
.quick-btn:active { transform: scale(.99); }
.quick-btn span { grid-row: span 2; font-size: 1.7rem; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: var(--primary-soft); }
.quick-btn small { color: var(--muted); font-size: .78rem; }
.q-handover span { background: var(--ast-issued-bg); }
.q-return span { background: var(--ast-returning-bg); }
.q-assets span { background: var(--ast-available-bg); }

.type-tag { font-size: .78rem; font-weight: 600; padding: 2px 8px; border-radius: 6px; margin-inline-end: 6px; white-space: nowrap; }
.type-handover { background: var(--ast-issued-bg); color: var(--ast-issued); }
.type-return { background: var(--ast-returning-bg); color: var(--ast-returning); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 12px; overflow-x: auto; }
.tab {
  font: inherit; font-weight: 500; padding: 10px 16px; border: 0; background: none; cursor: pointer; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.cat-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; }
.cat {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0; flex-shrink: 0;
  padding: 8px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface);
  font: inherit; cursor: pointer; color: var(--text);
}
.cat span { font-size: .75rem; color: var(--muted); }
.cat.active { border-color: var(--primary); background: var(--primary-soft); }

/* جدول بيانات يتحول لبطاقات على الجوال */
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table th { text-align: start; font-size: .78rem; color: var(--muted); font-weight: 600; padding: 10px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tr[data-href] { cursor: pointer; }
.data-table tr[data-href]:hover td { background: var(--surface-2); }
.data-table.compact td { padding: 6px 8px; }
.data-table.compact input { min-height: 36px; padding: 4px 8px; }
@media (max-width: 720px) {
  .data-table thead { display: none; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table tr { padding: 10px 14px; border-bottom: 1px solid var(--border); position: relative; }
  .data-table td { border: 0; padding: 2px 0; display: flex; gap: 8px; align-items: baseline; }
  .data-table td::before {
    content: attr(data-label); color: var(--muted); font-size: .75rem; min-width: 90px; flex-shrink: 0;
    font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif; letter-spacing: 0; direction: rtl;
  }
  .data-table td[dir="ltr"] { flex-direction: row-reverse; }
  .data-table td:not([data-label])::before { content: none; }
  .data-table td:not([data-label]) { position: absolute; top: 6px; inset-inline-end: 8px; width: auto; }
  .data-table td > div { display: inline; margin-inline-start: 4px; }
}

/* اختيار الموظف */
.picker { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.picker input { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; }
.picker-results { max-height: 280px; overflow: auto; }
.picker-item {
  display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; width: 100%; text-align: start;
  padding: 10px 12px; border: 0; border-bottom: 1px solid var(--border); background: var(--surface); font: inherit; cursor: pointer;
}
.picker-item:hover { background: var(--primary-soft); }
.picker-item:last-child { border-bottom: 0; }
.picker-item .badge { margin-inline-start: auto; }
.picked { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--primary); background: var(--primary-soft); border-radius: 10px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: var(--primary); color: #fff; font-weight: 700; font-size: 1rem;
}
.list-item .num.avatar { width: 34px; height: 34px; color: #fff; font-size: .9rem; padding: 0; align-self: center; }

/* اختيار العهد للتسليم */
.pick-list { max-height: 360px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.pick-row { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--border); cursor: pointer; font-size: .9rem; }
.pick-row:last-child { border-bottom: 0; }
.pick-row:hover { background: var(--surface-2); }
.pick-row.on { background: var(--primary-soft); }
.pick-row input { width: 18px; height: 18px; min-height: 0; flex-shrink: 0; accent-color: var(--primary); }
@media (max-width: 520px) { .pick-row { flex-wrap: wrap; } .pick-row .spacer { flex-basis: calc(100% - 40px); order: -1; padding-inline-start: 28px; } }

/* إضافة وحدات بالجملة */
.units { display: flex; flex-direction: column; gap: 8px; }
.unit { display: grid; grid-template-columns: 28px 1fr 1fr; gap: 8px; align-items: center; }
.unit .idx { color: var(--muted); text-align: center; font-size: .85rem; }
@media (max-width: 520px) { .unit { grid-template-columns: 24px 1fr; } .unit input[name=notes] { grid-column: 2; } }

/* الإرجاع */
.ret-row {
  display: grid; grid-template-columns: 110px 1fr minmax(0, 1.2fr); gap: 12px; align-items: center;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; background: var(--surface);
}
.ret-row.off { background: #fff7ed; border-color: #f5c9a8; }
.ret-check { display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: .85rem; cursor: pointer; }
.ret-check input { width: 20px; height: 20px; min-height: 0; accent-color: var(--ok); }
.ret-row.off .ret-check { color: var(--warn); }
.ret-fields { display: flex; gap: 6px; }
.ret-fields input { min-height: 38px; padding: 6px 10px; }
input.need { border-color: var(--warn); background: #fff7ed; }
@media (max-width: 720px) {
  .ret-row { grid-template-columns: 1fr; gap: 8px; }
  .ret-fields { flex-direction: column; }
}

.action-box.ok { border-color: #a7d7b5; background: #f0fbf3; }
.action-box.ok h3 { color: var(--ok); }
.action-box.muted-box { border-color: var(--border); background: var(--surface-2); }
.action-box.muted-box h3 { color: var(--muted); }

.link-btn { border: 0; background: none; padding: 0; font: inherit; color: var(--primary); cursor: pointer; text-decoration: underline; }
.disabled-row { opacity: .6; }

.sig-preview {
  width: 200px; height: 80px; border: 1px dashed var(--border); border-radius: 8px; display: grid; place-items: center;
  background: #fff repeating-linear-gradient(0deg, transparent 0 59px, #e2e8f0 59px 60px); overflow: hidden;
}
.sig-preview img { max-width: 92%; max-height: 92%; }

/* حساب «اطّلاع فقط» — إخفاء كل أزرار الإضافة والتعديل */
.role-viewer .w { display: none !important; }
.viewer-note { display: none; }
.role-viewer .viewer-note { display: block; }

.phone-links { display: inline-flex; gap: 6px; }
.btn-wa { color: #128c4b; border-color: #a7dcbf; }
.btn-wa:hover { background: #effaf3; }
