/* المالية ← شحن المحفظة واسترداده — محصورة تحت .wtp. الألوان من رموز اللوحة
   (--surface/--border/--text/--good/--warn/--crit) ولكلٍّ نظير ليلي؛ وما لا رمز له
   (البنفسجي العميق) يُعرَّف هنا مرّتين: نهاراً و:root[data-theme="dark"] — سمة
   اللوحة من زرّها وحده كبقية صفحاتها، لا من سمة النظام. */

.wtp { --wtp-deep: #54007d; --wtp-soft: #f7f2fc; --wtp-head: #fbfafd;
  display: flex; flex-direction: column; gap: 18px; margin-bottom: 24px }
:root[data-theme="dark"] .wtp { --wtp-deep: #d9c2f0; --wtp-soft: #271939; --wtp-head: #241636 }

.wtp-num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate }
.wtp-head { margin-bottom: 0; align-items: flex-end }
.wtp-kpis { margin-bottom: 0 }
.wtp-kpis small { font-size: 12px; color: var(--muted); font-weight: 700 }

.wtp-note { border-radius: 12px; padding: 10px 14px; font-size: 13px; font-weight: 700; line-height: 1.7 }
.wtp-note.warn { background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn) }

.wtp-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden }
.wtp-ph { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px; background: var(--wtp-head); border-bottom: 1px solid var(--border) }
.wtp-ph b { font-size: 15.5px }
.wtp-pb { padding: 6px 16px 14px; display: flex; flex-direction: column }

.wtp-set { display: grid; grid-template-columns: 260px 1fr; gap: 10px 18px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--border) }
.wtp-set:last-of-type { border-bottom: 0 }
.wtp-set .k b { display: block; font-size: 14px }
.wtp-set .k small { color: var(--muted); font-size: 12px; line-height: 1.6 }
.wtp-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap }

.wtp-seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 4px; gap: 4px }
.wtp-seg button { border: 0; background: none; font: inherit; padding: 7px 14px; border-radius: 9px; font-size: 13px;
  font-weight: 700; color: var(--muted); cursor: pointer }
.wtp-seg button.on { background: var(--surface); color: var(--wtp-deep); box-shadow: 0 1px 4px rgba(0, 0, 0, .08) }
.wtp-seg button:disabled { cursor: not-allowed }

.wtp-inp { width: 96px; border: 1.5px solid var(--border); border-radius: 10px; padding: 6px 10px; font: inherit;
  font-weight: 800; background: var(--surface); color: var(--text); direction: ltr; text-align: left;
  font-variant-numeric: tabular-nums }
.wtp-inp:disabled { background: var(--surface-2); color: var(--muted) }
.wtp-unit { display: inline-flex; align-items: center; gap: 8px }
.wtp-unit i, .wtp-range { font-style: normal; color: var(--muted); font-weight: 600; font-size: 12.5px }
.wtp-range .wtp-inp { width: 84px; margin: 0 4px }

.wtp-tgl { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 700; font-size: 13px }
.wtp-tgl input { width: 40px; height: 22px; accent-color: var(--accent) }

.wtp-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center }
.wtp-chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--border); border-radius: 999px;
  padding: 3px 6px 3px 11px; font-weight: 700; font-size: 13px }
.wtp-chip button { border: 0; background: none; color: var(--crit); font: inherit; font-weight: 800; cursor: pointer; padding: 0 4px }
.wtp-chip.add { border-style: dashed; padding: 2px 4px }
.wtp-chip.add input { width: 72px; border: 0; background: none; font: inherit; color: var(--text); direction: ltr }
.wtp-chip.add button { color: var(--accent) }

.wtp-acts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px }
.wtp-hint { color: var(--muted); font-size: 12px }
.wtp-btn { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 18px;
  border-radius: 11px; font: inherit; font-weight: 800; font-size: 13.5px; cursor: pointer; border: 1px solid transparent }
.wtp-btn.primary { background: var(--primary); color: #fff }
.wtp-btn.danger { background: var(--crit); color: #fff }
.wtp-btn.ghost { background: var(--surface); color: var(--text); border-color: var(--border) }
.wtp-btn:disabled { opacity: .55; cursor: not-allowed }

.wtp-tabs { display: flex; gap: 6px; flex-wrap: wrap }
.wtp-tabs button { border: 1px solid var(--border); background: var(--surface); color: var(--muted); font: inherit;
  font-size: 12.5px; font-weight: 700; padding: 5px 12px; border-radius: 999px; cursor: pointer }
.wtp-tabs button.on { background: var(--wtp-deep); color: var(--surface); border-color: var(--wtp-deep) }

.wtp-tblwrap { overflow-x: auto }
.wtp-tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 820px }
.wtp-tbl th { text-align: right; color: var(--muted); font-weight: 700; font-size: 12.5px; padding: 9px 12px;
  border-bottom: 1px solid var(--border); background: var(--wtp-head) }
.wtp-tbl td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle }
.wtp-tbl tr:last-child td { border-bottom: 0 }
.wtp-tbl td small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px }
.wtp-tbl td .tag + small { margin-top: 4px }
.wtp-why { max-width: 260px; line-height: 1.6 }
.wtp-act { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end }

.wtp-ovl { position: fixed; inset: 0; background: rgba(20, 10, 30, .45); display: grid; place-items: center; z-index: 60; padding: 16px }
.wtp-dlg { width: min(460px, 100%); background: var(--surface); color: var(--text); border-radius: 18px; padding: 20px 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .3) }
.wtp-dlg h2 { margin: 0 0 10px; font-size: 18px }
.wtp-dlg ul { margin: 0 0 12px; padding-inline-start: 20px; line-height: 1.9; font-size: 13.5px }
.wtp-dlg li.warn { color: var(--warn); font-weight: 700 }
.wtp-dlg p { font-size: 13.5px; line-height: 1.8; margin: 0 0 10px }
.wtp-lbl { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 6px }
.wtp-dlg textarea { width: 100%; box-sizing: border-box; border: 1.5px solid var(--border); border-radius: 12px; padding: 10px 12px;
  font: inherit; background: var(--surface); color: var(--text); resize: vertical }

@media (max-width: 720px) {
  .wtp-set { grid-template-columns: 1fr }
}
.wtp-note.crit { background: var(--crit-bg); border: 1px solid var(--crit-line); color: var(--crit) }
.wtp-tbl td .tag + .tag { margin-inline-start: 4px }

/* «محاولات الشحن» — مرشّحات وجدول ورقم الصفحة. */
.wtp-filters { gap: 8px }
.wtp-filters .wtp-sel { width: auto; direction: rtl; text-align: right; font-weight: 700 }
.wtp-filters .wtp-cust { width: 170px }
.wtp-filters .wtp-date { width: 150px }
.wtp-tbl.wtp-att { min-width: 1120px }
.wtp-tbl th small { display: inline; font-weight: 600; font-size: 11px }
.wtp-gwd { max-width: 240px; line-height: 1.5; text-align: left }
.wtp-ref { font-size: 12px }
.wtp-pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 10px 16px;
  color: var(--muted); font-size: 12.5px; border-top: 1px solid var(--border) }
.wtp-pager span { margin-inline-end: auto }
.wtp-panel > .wtp-note { margin: 0 16px 14px }
@media (max-width: 720px) {
  .wtp-filters .wtp-cust, .wtp-filters .wtp-date { width: 100% }
}
