/* ============================================================
   Hafez — التنسيقات المشتركة
   ============================================================ */

:root {
  --bg:            #f3f6f9;
  --surface:       #ffffff;
  --surface-2:     #f8fafc;
  --border:        #e2e8f0;
  --text:          #0f172a;
  --text-muted:    #64748b;
  --brand:         #1d4e79;
  --brand-dark:    #163b5c;
  --brand-darker:  #102a43;
  --brand-light:   #e9f1f7;
  --brand-rgb:     29, 78, 121;
  --brand-light-rgb: 233, 241, 247;
  --brand-soft:    #eef4f9;
  --accent:        #ae163f;
  --accent-dark:   #89112f;
  --accent-light:  #f9e8ed;
  --accent-rgb:    174, 22, 63;
  --danger:        #dc2626;
  --danger-light:  #fee2e2;
  --warn:          #d97706;
  --warn-light:    #fef3c7;
  --ok:            #1d4e79;
  --ok-light:      #e9f1f7;
  --success:       #15803d;
  --success-light: #dcfce7;
  --attn:          #db2777;
  --attn-light:    #fce7f3;
  --radius:        16px;
  --radius-sm:     10px;
  --shadow:        0 1px 2px rgba(15, 23, 42, .06), 0 10px 28px rgba(15, 23, 42, .06);
  --shadow-lg:     0 4px 14px rgba(15, 23, 42, .10), 0 26px 60px rgba(15, 23, 42, .14);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  /* الاتجاه بيتوارث من <html dir="..">‎ بدل ما يكون ثابت هنا — عشان زرار
     تبديل اللغة (EN/AR) في الفورم العام وبوابة العملاء يقدر يقلب الاتجاه فعليًا.
     كل صفحات الموقع أصلاً معرّفة dir="rtl" في الـ <html> بشكل افتراضي. */
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* ---------- شريط الخلفية العلوي الزخرفي ---------- */
.hero-band {
  position: absolute;
  top: 0; right: 0; left: 0;
  height: 320px;
  background:
    radial-gradient(900px 320px at 85% -60px, rgba(255,255,255,.08), transparent 60%),
    linear-gradient(160deg, var(--brand-darker) 0%, var(--brand-dark) 45%, var(--brand) 100%);
  z-index: 0;
}

.hero-band::after {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.55), transparent);
}

/* ---------- تخطيط ---------- */
.wrap      { position: relative; z-index: 1; width: 100%; max-width: 640px; margin: 0 auto; padding: 40px 16px 64px; }
.wrap-wide { width: 100%; max-width: 1280px; margin: 0 auto; padding: 24px 16px 64px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.card-elevated { box-shadow: var(--shadow-lg); border-color: rgba(15, 23, 42, .06); }

.card-title { text-align: center; margin-bottom: 22px; }
.card-title h2 { font-size: 1.14rem; font-weight: 800; }
.card-title p  { color: var(--text-muted); font-size: .87rem; margin-top: 4px; }

/* ---------- رأس الصفحة ---------- */
.page-head { text-align: center; margin-bottom: 26px; }

.logo-mark {
  width: 66px; height: 66px;
  margin: 0 auto 16px;
  border-radius: 19px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .35);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  color: #fff; font-size: 29px; font-weight: 800;
  box-shadow: 0 10px 26px rgba(16, 42, 67, .35);
}

.logo-mark-img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; padding: 3px; }

.page-head h1 { font-size: 1.7rem; font-weight: 800; letter-spacing: -.4px; color: #fff; }
.page-head .tagline { color: rgba(255,255,255,.82); font-size: .92rem; margin-top: 5px; font-weight: 600; }

.page-foot { text-align: center; color: var(--text-muted); font-size: .78rem; margin-top: 22px; }

.secure-note {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  color: var(--text-muted);
  font-size: .8rem;
  font-weight: 600;
  margin-top: 14px;
}

/* ---------- حقول الإدخال ---------- */
.field { margin-bottom: 18px; }

.field > label {
  display: block;
  font-weight: 700;
  font-size: .89rem;
  margin-bottom: 7px;
}

.field .hint {
  font-weight: 400;
  color: var(--text-muted);
  font-size: .82rem;
}

.req { color: var(--danger); font-weight: 700; }

/* ---------- تشيك بوكس اختيار قسم واحد أو أكتر (مودال مستخدم أمين خزينة) ---------- */
.dept-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 11px 13px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
}

.dept-checks label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .86rem;
  font-weight: 600;
  cursor: pointer;
}

.dept-checks input[type="checkbox"] { width: auto; cursor: pointer; }

/* ---------- اختيار نوع العميل (segmented control) ---------- */
.seg {
  display: flex;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  gap: 4px;
}

.seg-btn {
  flex: 1;
  padding: 9px 10px;
  font-family: inherit;
  font-size: .89rem;
  font-weight: 700;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  transition: background .16s, color .16s, box-shadow .16s;
}

.seg-btn:hover:not(.active) { color: var(--text); }

.seg-btn.active {
  background: var(--surface);
  color: var(--brand);
  box-shadow: 0 1px 2px rgba(15,23,42,.08), 0 2px 6px rgba(15,23,42,.06);
}

input[readonly] {
  background: var(--surface-2);
  color: var(--text-muted);
  cursor: not-allowed;
}

input[type="text"], input[type="tel"], input[type="number"],
input[type="date"], input[type="email"], input[type="password"],
input[type="search"], select, textarea {
  width: 100%;
  padding: 11px 14px;
  font-family: inherit;
  font-size: .96rem;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color .16s, box-shadow .16s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3.5px var(--brand-light);
}

input::placeholder, textarea::placeholder { color: #94a3b8; }

textarea { resize: vertical; min-height: 76px; }

input[type="tel"], input[type="number"] { direction: ltr; text-align: right; }

/* خانات الأرقام من غير السهمين (11-10-2026، صاحب المشروع: «في خانة القيمة يوجد سهمين، الغي السهمين دول» — بوابة أمناء الخزينة
   ولوحة التحكم وصفحة تسجيل الإيداع). الخانة نفسها فاضلة type=number (الكسور في لوحة التحكم والتحقق زي ما هم) */
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- اختيار البنك ---------- */
.bank-field {
  min-width: 0;
  padding: 0;
  border: 0;
}

.bank-field > legend {
  width: 100%;
  margin-bottom: 7px;
  font-size: .89rem;
  font-weight: 700;
}

.bank-picker {
  padding: 14px;
  background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  transition: border-color .18s, box-shadow .18s, background .18s;
}

.bank-picker-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 13px;
}

.bank-picker-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: var(--brand);
  background: var(--brand-light);
  border: 1px solid rgba(var(--brand-rgb), .16);
  border-radius: 11px;
}

.bank-picker-icon svg { width: 21px; height: 21px; }

.bank-picker-copy {
  min-width: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  line-height: 1.4;
}

.bank-picker-copy strong { font-size: .9rem; font-weight: 800; }
.bank-picker-copy small  { color: var(--text-muted); font-size: .75rem; font-weight: 500; }

.bank-choice-tag {
  flex-shrink: 0;
  padding: 4px 9px;
  color: var(--brand-dark);
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(var(--brand-rgb), .16);
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 700;
}

.bank-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.bank-opt {
  position: relative;
  min-width: 0;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px;
  overflow: hidden;
  background: rgba(255,255,255,.96);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
  cursor: pointer;
  user-select: none;
  transition: border-color .16s, box-shadow .16s, transform .12s, background .16s;
}

.bank-opt:last-child:nth-child(odd) { grid-column: 1 / -1; }

.bank-opt:hover {
  border-color: #b6c5d5;
  box-shadow: 0 6px 16px rgba(15,23,42,.08);
  transform: translateY(-1px);
}

.bank-opt:active { transform: scale(.985); }

.bank-opt:focus-within {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(var(--brand-light-rgb), .95);
}

.bank-opt input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.bank-opt-logo {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  padding: 5px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.bank-opt-logo .bank-logo {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  border-radius: 7px;
}

.bank-opt-logo .bank-logo.has-img {
  padding: 1px;
  box-shadow: none;
}

.bank-opt-copy {
  min-width: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.35;
}

.bank-opt-name {
  max-width: 100%;
  color: var(--text);
  font-size: .8rem;
  font-weight: 800;
  text-align: right;
}

.bank-opt-code {
  max-width: 100%;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: .68rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bank-opt .check {
  width: 23px;
  height: 23px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  margin-inline-start: auto;
  color: transparent;
  background: #fff;
  border: 1.5px solid #cbd5e1;
  border-radius: 50%;
  transition: color .16s, background .16s, border-color .16s, transform .16s;
}

.bank-opt .check svg { width: 13px; height: 13px; }

.bank-opt.selected {
  background: linear-gradient(145deg, #ffffff 0%, var(--brand-soft) 100%);
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(var(--brand-light-rgb), .9), 0 7px 18px rgba(var(--brand-rgb), .10);
}

.bank-opt.selected .check {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 3px 8px rgba(var(--brand-rgb), .28);
  transform: scale(1.05);
}

.bank-feedback {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 20px;
  margin-top: 10px;
  color: var(--text-muted);
  font-size: .73rem;
  font-weight: 600;
}

.bank-feedback-dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  background: #94a3b8;
  border-radius: 50%;
}

.bank-feedback.is-selected { color: var(--brand-dark); }
.bank-feedback.is-selected .bank-feedback-dot { background: var(--brand); box-shadow: 0 0 0 3px var(--brand-light); }
.bank-feedback.is-error { color: var(--danger); }
.bank-feedback.is-error .bank-feedback-dot { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-light); }

.bank-field.has-error .bank-picker {
  background: linear-gradient(145deg, #fff 0%, #fff7f7 100%);
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-light);
}

.bank-skeleton {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px;
  background: rgba(255,255,255,.75);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.bank-skeleton span,
.bank-skeleton i {
  display: block;
  background: linear-gradient(90deg, #e2e8f0 25%, #f8fafc 50%, #e2e8f0 75%);
  background-size: 220% 100%;
  animation: bank-shimmer 1.2s infinite linear;
}

.bank-skeleton span { width: 54px; height: 54px; flex-shrink: 0; border-radius: 10px; }
.bank-skeleton i    { width: 55%; height: 12px; border-radius: 999px; }

.bank-load-state {
  grid-column: 1 / -1;
  padding: 22px 14px;
  color: var(--text-muted);
  text-align: center;
  font-size: .82rem;
  font-weight: 600;
  background: rgba(255,255,255,.75);
  border: 1px dashed var(--border);
  border-radius: 12px;
}

.bank-load-state.is-error { color: var(--danger); border-color: #fecaca; }

.bank-retry {
  display: block;
  margin: 10px auto 0;
  padding: 6px 12px;
  color: var(--brand-dark);
  font-family: inherit;
  font-size: .75rem;
  font-weight: 700;
  background: #fff;
  border: 1px solid rgba(var(--brand-rgb), .3);
  border-radius: 8px;
  cursor: pointer;
}

.bank-retry:hover { background: var(--brand-light); border-color: var(--brand); }

@keyframes bank-shimmer { to { background-position: -220% 0; } }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- لوجو البنك ---------- */
.bank-logo {
  flex-shrink: 0;
  width: 100%; height: 100%;
  max-width: 64px; max-height: 64px;
  border-radius: 10px;
  display: grid; place-items: center;
  color: #fff;
  font-weight: 800;
  letter-spacing: -.2px;
  overflow: hidden;
}

/* اللوجوهات الحقيقية (صور) بتاخد خلفية بيضا وهامش داخلي بسيط عشان تبان
   نضيفة بغض النظر عن خلفية الصورة الأصلية أو نسبة أبعادها */
.bank-logo.has-img { background: #fff; padding: 6px; box-shadow: inset 0 0 0 1px var(--border); }
.bank-logo img { width: 100%; height: 100%; object-fit: contain; }

.bank-logo.sm { width: 32px; height: 32px; border-radius: 8px; }
.bank-logo.sm.has-img { padding: 3px; }

/* ---------- رفع الصورة ---------- */
.drop {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: 26px 18px;
  text-align: center;
  cursor: pointer;
  transition: border-color .16s, background .16s;
}

.drop:hover, .drop.over { border-color: var(--brand); background: var(--brand-light); }
.drop input[type="file"] { display: none; }
.drop .icon { font-size: 30px; display: block; margin-bottom: 6px; }
.drop .t    { font-weight: 700; font-size: .93rem; }
.drop .s    { color: var(--text-muted); font-size: .81rem; margin-top: 3px; }

.preview { margin-top: 12px; position: relative; display: none; }

.preview img {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  background: #0f172a;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.preview .rm {
  position: absolute; top: 9px; left: 9px;
  width: 30px; height: 30px;
  border: none; border-radius: 8px;
  background: rgba(220, 38, 38, .93);
  color: #fff; font-size: 17px; cursor: pointer;
  display: grid; place-items: center;
}

.preview .fname {
  margin-top: 7px;
  font-size: .8rem;
  color: var(--text-muted);
  text-align: center;
  word-break: break-all;
}

.pdf-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 40px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 700;
  font-size: .92rem;
}

.pdf-preview-icon { font-size: 40px; }

/* ---------- الأزرار ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 20px;
  font-family: inherit;
  font-size: .94rem;
  font-weight: 700;
  color: #fff;
  background: var(--brand);
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(var(--brand-rgb), .15), 0 6px 16px rgba(var(--brand-rgb), .22);
  transition: background .16s, transform .1s, opacity .16s, box-shadow .16s;
}

.btn:hover:not(:disabled) { background: var(--brand-dark); transform: translateY(-1px); box-shadow: 0 2px 6px rgba(var(--brand-rgb), .2), 0 10px 22px rgba(var(--brand-rgb), .28); }
.btn:active:not(:disabled){ transform: scale(.98); }
.btn:disabled              { opacity: .55; cursor: not-allowed; box-shadow: none; }
.btn.block                 { width: 100%; padding: 14px; font-size: 1rem; }
.btn.sm                    { padding: 7px 13px; font-size: .84rem; box-shadow: none; }

.btn.ghost  { background: var(--surface); color: var(--text); border-color: var(--border); box-shadow: none; }
.btn.ghost:hover:not(:disabled) { background: var(--surface-2); border-color: #cbd5e1; box-shadow: none; }

.btn.danger { background: var(--danger); box-shadow: 0 1px 2px rgba(220,38,38,.15), 0 6px 16px rgba(220,38,38,.22); }
.btn.danger:hover:not(:disabled) { background: #b91c1c; box-shadow: 0 2px 6px rgba(220,38,38,.2), 0 10px 22px rgba(220,38,38,.28); }

.btn.ok     { background: var(--ok); box-shadow: 0 1px 2px rgba(var(--brand-rgb), .15), 0 6px 16px rgba(var(--brand-rgb), .22); }
.btn.ok:hover:not(:disabled) { background: var(--brand-dark); box-shadow: 0 2px 6px rgba(var(--brand-rgb), .2), 0 10px 22px rgba(var(--brand-rgb), .28); }

/* زرار تفعيل/إيقاف إشعارات الإيداعات الجديدة (لوحة الإدارة، admin.js) — نقطة
   خضراء صغيرة في الركن تدل على إن الإشعارات شغالة، بدل ما تعتمد بس على تغيّر الأيقونة */
.notify-toggle { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.notify-toggle-icon { font-size: 1rem; line-height: 1; }
.notify-toggle.is-on {
  background: var(--success-light);
  border-color: var(--success);
  color: var(--success);
}
.notify-toggle.is-on::after {
  content: "";
  position: absolute;
  top: 3px;
  inset-inline-end: 3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 2px var(--surface);
}

/* ---------- الرسائل ---------- */
.msg {
  padding: 12px 15px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: 16px;
  display: none;
}

.msg.show   { display: block; }
.msg.error  { background: var(--danger-light); color: #991b1b; }
.msg.ok     { background: var(--ok-light);     color: var(--brand-dark); }
.msg.info   { background: #dbeafe;             color: #1e40af; }

/* ---------- شارة الحالة ---------- */
.badge {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge.pending   { background: var(--warn-light);   color: #92400e; }
.badge.approved  { background: var(--ok-light);     color: var(--brand-dark); }
.badge.confirmed { background: var(--success-light); color: var(--success); }
.badge.rejected  { background: var(--danger-light); color: #991b1b; }
.badge.duplicate { background: #ede9fe;             color: #5b21b6; }
.badge.info      { background: var(--brand-light);  color: var(--brand-dark); }

/* ---------- شاشة النجاح ---------- */
.done { text-align: center; padding: 22px 8px; display: none; }

.done .tick {
  width: 74px; height: 74px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--ok-light);
  color: var(--ok);
  font-size: 40px;
  display: grid; place-items: center;
}

.done h2  { font-size: 1.3rem; margin-bottom: 7px; }
.done p   { color: var(--text-muted); font-size: .93rem; margin-bottom: 20px; }

.done .ref {
  display: inline-block;
  font-family: 'Courier New', monospace;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--brand);
  background: var(--brand-light);
  padding: 9px 22px;
  border-radius: 10px;
  margin-bottom: 20px;
  direction: ltr;
}

/* ---------- سبينر ---------- */
.spin {
  width: 15px; height: 15px;
  border: 2.5px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .65s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading {
  text-align: center;
  padding: 42px 16px;
  color: var(--text-muted);
  font-size: .92rem;
}

/* ---------- شريط الإدارة ---------- */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 13px 0;
  position: sticky; top: 0; z-index: 30;
}

.topbar .inner {
  max-width: 1280px; margin: 0 auto; padding: 0 16px;
  display: flex; align-items: center; gap: 13px;
}

.topbar .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.06rem; }

.topbar .brand .mk {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff; display: grid; place-items: center; font-size: 15px;
}

.topbar .sp { flex: 1; }

/* ---------- التبويبات ---------- */
.tabs { display: flex; gap: 5px; border-bottom: 2px solid var(--border); margin-bottom: 22px; flex-wrap: wrap; }

.admin-only { display: none; } /* JS بيظهرها بس للمشرف بعد التأكد من الصلاحية */

.tab {
  padding: 10px 18px;
  font-family: inherit; font-size: .92rem; font-weight: 700;
  color: var(--text-muted);
  background: none; border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: color .16s, border-color .16s;
}

.tab:hover    { color: var(--text); }
.tab.active   { color: var(--brand); border-bottom-color: var(--brand); }

.panel { display: none; }
.panel.active { display: block; }

/* ---------- بطاقات الإحصائيات ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 13px;
  margin-bottom: 22px;
}

.stat {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 17px;
  box-shadow: var(--shadow);
  cursor: pointer;
  user-select: none;
  transition: border-color .16s, transform .1s, box-shadow .16s;
}

.stat:hover  { border-color: #cbd5e1; transform: translateY(-1px); }
.stat:active { transform: scale(.98); }

.stat .n { font-size: 1.85rem; font-weight: 800; line-height: 1.15; }
.stat .l { color: var(--text-muted); font-size: .84rem; font-weight: 600; margin-top: 2px; }

.stat.p .n { color: var(--warn); }
.stat.a .n { color: var(--ok); }
.stat.c .n { color: var(--success); }
.stat.r .n { color: var(--danger); }
.stat.e .n { color: var(--brand); } /* كارت "تعديلات" — تعديلات أمناء خزينة لسه محتاجة مراجعة، مخفي بالكامل لما يكون العدّاد صفر */

.stat.selected              { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-light); }
.stat.p.selected             { border-color: var(--warn); box-shadow: 0 0 0 3px var(--warn-light); }
.stat.a.selected             { border-color: var(--ok);   box-shadow: 0 0 0 3px var(--ok-light); }
.stat.c.selected             { border-color: var(--success); box-shadow: 0 0 0 3px var(--success-light); }
.stat.r.selected             { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-light); }
.stat.e.selected             { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-light); }

/* ---------- ترقيم الصفحات ---------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 16px 14px 4px;
}

.pg-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  font-size: .86rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .16s, background .16s, color .16s;
}

.pg-btn:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.pg-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pg-btn:disabled { opacity: .4; cursor: not-allowed; }
.pg-btn.pg-nav { font-weight: 800; }

.pg-dots { color: var(--text-muted); padding: 0 2px; user-select: none; }

/* ---------- شريط الفلاتر ---------- */
.filters {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.filters input, .filters select { width: auto; flex: 1; min-width: 148px; }

/* ---------- جدول الإيداعات الاحترافي ---------- */
.data-table-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 12px 32px rgba(15,23,42,.07);
}

.data-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  background: linear-gradient(135deg, #fff 0%, #fbfdfd 100%);
  border-bottom: 1px solid var(--border);
}

.data-table-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.data-table-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: var(--brand);
  background: var(--brand-light);
  border: 1px solid rgba(var(--brand-rgb), .14);
  border-radius: 12px;
}

.data-table-icon svg { width: 22px; height: 22px; }
.data-table-title h2 { font-size: 1rem; font-weight: 800; line-height: 1.4; }
.data-table-title p { margin-top: 2px; color: var(--text-muted); font-size: .76rem; font-weight: 500; }

.data-table-count {
  min-width: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  color: var(--brand-dark);
  background: var(--brand-light);
  border: 1px solid rgba(var(--brand-rgb), .15);
  border-radius: 999px;
  white-space: nowrap;
}

.data-table-count strong { font-size: .92rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.data-table-count span { font-size: .7rem; font-weight: 700; }

.table-scroll {
  position: relative;
  max-height: min(68vh, 720px);
  overflow: auto;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.table-scroll:focus-visible {
  outline: 3px solid rgba(var(--brand-rgb), .22);
  outline-offset: -3px;
}

.table-scroll::-webkit-scrollbar { width: 9px; height: 9px; }
.table-scroll::-webkit-scrollbar-track { background: #f1f5f9; }
.table-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border: 2px solid #f1f5f9; border-radius: 999px; }
.table-scroll::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

.admin-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: .84rem;
}

.admin-table th:nth-child(1) { width: 128px; }
.admin-table th:nth-child(2) { width: 245px; }
.admin-table th:nth-child(3) { width: 190px; }
.admin-table th:nth-child(4) { width: 130px; }
.admin-table th:nth-child(5) { width: 140px; }
.admin-table th:nth-child(6) { width: 82px; }
.admin-table th:nth-child(7) { width: 126px; }
.admin-table th:nth-child(8) { width: 100px; }

.admin-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 12px 15px;
  color: #475569;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  font-size: .74rem;
  font-weight: 800;
  text-align: start;
  white-space: nowrap;
  letter-spacing: .01em;
}

.admin-table thead th:last-child {
  z-index: 5;
  inset-inline-end: 0;
  box-shadow: 8px 0 16px -16px rgba(15,23,42,.8);
}

.admin-table tbody td {
  height: 72px;
  padding: 10px 15px;
  color: #334155;
  background: #fff;
  border-bottom: 1px solid #edf1f5;
  vertical-align: middle;
  white-space: nowrap;
  transition: background .15s, box-shadow .15s;
}

.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover td { background: #f8fafc; }
.admin-table tbody tr:focus-within td { background: #f4f7fa; }

.admin-table tbody td:first-child {
  border-inline-start: 3px solid var(--row-accent, transparent);
}

.admin-table .status-pending   { --row-accent: #f59e0b; }
.admin-table .status-approved  { --row-accent: var(--brand); }
.admin-table .status-confirmed { --row-accent: var(--success); }
.admin-table .status-rejected  { --row-accent: #ef4444; }
.admin-table .status-duplicate { --row-accent: #8b5cf6; }

.admin-table tbody td:last-child {
  position: sticky;
  z-index: 2;
  inset-inline-end: 0;
  box-shadow: 8px 0 16px -16px rgba(15,23,42,.8);
}

/* تقصير النصوص الطويلة بدون التأثير على محاذاة خلايا الجدول */
.cell-trunc {
  display: inline-block;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.mono {
  font-family: 'Cascadia Code', 'Courier New', monospace;
  font-weight: 700;
  direction: ltr;
  unicode-bidi: isolate;
  font-variant-numeric: tabular-nums;
}

.ref-cell-wrap { display: flex; flex-direction: column; gap: 2px; }

.ref-cell {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  direction: ltr;
}

.ref-created { color: var(--text-muted); font-size: .68rem; font-weight: 600; direction: ltr; }

.ref-cell i {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  background: var(--row-accent, #94a3b8);
  border-radius: 50%;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--row-accent, #94a3b8) 15%, transparent);
}

.client-cell,
.bank-cell {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.client-avatar {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: var(--brand-dark);
  background: linear-gradient(145deg, var(--brand-light), #f4f7fa);
  border: 1px solid rgba(var(--brand-rgb), .15);
  border-radius: 11px;
  font-size: .72rem;
  font-weight: 900;
}

.client-details {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.client-details > strong {
  max-width: 168px;
  color: var(--text);
  font-size: .82rem;
  font-weight: 800;
}

.client-meta {
  max-width: 174px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: .67rem;
  overflow: hidden;
}

.client-meta b { color: var(--brand-dark); font-size: .68rem; }
.client-meta i { width: 3px; height: 3px; flex-shrink: 0; background: #cbd5e1; border-radius: 50%; }

.deposit-note-badge {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  max-width: 100%;
  margin-top: 5px;
  padding: 5px 8px;
  border-radius: 8px;
  background: var(--brand-soft);
  border-inline-start: 3px solid var(--brand);
  color: var(--brand-darker);
  font-size: .72rem;
  line-height: 1.4;
  white-space: normal;
  word-break: break-word;
}
.deposit-note-badge .note-icon { flex-shrink: 0; margin-top: 1px; font-size: .78rem; }
.deposit-note-badge .note-label { font-weight: 700; }
.deposit-note-badge .note-text { color: inherit; }

.deposit-admin-note-badge {
  background: var(--danger-light);
  border-inline-start-color: var(--danger);
  color: #7f1d1d;
}

/* بطاقة "تم التعديل" — تظهر تحت بيانات العميل لما أمين خزينة يعدّل إيداع سجّله بنفسه،
   لحد ما المراجع/المشرف يدوس "تمت المراجعة" (renderEditCard/ackDepositEdit في admin.js) */
.deposit-edit-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 100%;
  margin-top: 5px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--warn-light);
  border-inline-start: 3px solid var(--warn);
  color: #78350f;
  font-size: .72rem;
  line-height: 1.4;
}

.deposit-edit-card-head { display: flex; align-items: flex-start; gap: 5px; }
.deposit-edit-card-head .note-icon { flex-shrink: 0; margin-top: 1px; font-size: .78rem; }

.deposit-edit-card-diff { display: flex; flex-direction: column; gap: 3px; }

.edit-diff-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px;
  font-size: .68rem;
}

.edit-diff-row b { flex-shrink: 0; color: #78350f; }
.edit-diff-old { color: #9a6b1f; text-decoration: line-through; opacity: .8; }
.edit-diff-arrow { color: #78350f; }
.edit-diff-new { color: #78350f; font-weight: 700; }

.deposit-edit-card .btn { align-self: flex-start; }

.bank-cell-logo {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  padding: 3px;
  color: #fff;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.bank-cell-logo.is-empty { color: var(--text-muted); background: var(--surface-2); font-weight: 800; }
.bank-cell-logo .bank-logo.sm { width: 30px; height: 30px; border-radius: 7px; }
.bank-cell-logo .bank-logo.sm.has-img { padding: 1px; box-shadow: none; }
.bank-cell .cell-trunc { max-width: 122px; color: var(--text); font-weight: 700; }

.amount-cell {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  direction: ltr;
}

.amount-cell b { color: var(--text); font-size: .85rem; }
.amount-cell small { color: var(--text-muted); font-family: 'Cairo', sans-serif; font-size: .66rem; font-weight: 700; }
.date-cell-wrap { display: flex; flex-direction: column; gap: 1px; }
.cell-date time { color: #475569; font-size: .76rem; font-weight: 700; }
.cell-date .date-time { color: var(--text-muted); font-size: .68rem; font-weight: 600; direction: ltr; }

.receipt-btn {
  position: relative;
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  padding: 0;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 11px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .12s;
}

.receipt-btn:hover { border-color: var(--brand); box-shadow: 0 4px 12px rgba(var(--brand-rgb), .14); transform: translateY(-1px); }
.receipt-btn:focus-visible { outline: 3px solid rgba(var(--brand-rgb), .22); outline-offset: 2px; }
.receipt-placeholder { display: grid; place-items: center; }
.receipt-placeholder svg { width: 21px; height: 21px; }
.receipt-btn.is-loading .receipt-placeholder { animation: receipt-pulse 1s ease-in-out infinite alternate; }
.receipt-btn.is-error { color: var(--danger); background: var(--danger-light); cursor: not-allowed; }

.receipt-btn.is-pdf { color: #b91c1c; background: #fef2f2; }
.receipt-btn.is-pdf .receipt-placeholder { display: grid; }
.receipt-btn.is-pdf::after {
  content: 'PDF';
  position: absolute;
  bottom: 2px; left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .3px;
}

.thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  opacity: 0;
  transition: opacity .18s, transform .18s;
}

.receipt-btn.is-ready .thumb { opacity: 1; }
.receipt-btn.is-ready .receipt-placeholder { display: none; }
.receipt-btn:hover .thumb { transform: scale(1.06); }

.receipt-view {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(15,23,42,.52);
  opacity: 0;
  transition: opacity .16s;
}

.receipt-view svg { width: 19px; height: 19px; }
.receipt-btn.is-ready:hover .receipt-view,
.receipt-btn.is-ready:focus-visible .receipt-view { opacity: 1; }
.no-receipt { color: #94a3b8; font-size: .7rem; font-weight: 600; }

/* عمود الإيصال: زر العرض + زر التنزيل جنب بعض */
.receipt-cell-wrap { display: inline-flex; align-items: center; gap: 6px; }
.receipt-dl {
  width: 32px;
  height: 46px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 11px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .12s, color .15s;
}
.receipt-dl svg { width: 18px; height: 18px; }
.receipt-dl:hover { color: var(--brand); border-color: var(--brand); box-shadow: 0 4px 12px rgba(var(--brand-rgb), .14); transform: translateY(-1px); }
.receipt-dl:focus-visible { outline: 3px solid rgba(var(--brand-rgb), .22); outline-offset: 2px; }
.receipt-dl:disabled { opacity: .5; cursor: progress; }

.admin-table .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: .69rem;
  font-weight: 800;
}

.admin-table .badge::before {
  content: '';
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  background: currentColor;
  border-radius: 50%;
}

.row-actions { display: flex; align-items: center; gap: 7px; flex-wrap: nowrap; }

.icon-btn {
  width: 35px;
  height: 35px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  cursor: pointer;
  transition: color .14s, background .14s, border-color .14s, box-shadow .14s, transform .1s;
}

.icon-btn svg { width: 17px; height: 17px; }
.icon-btn .action-label { display: none; }
.icon-btn.edit { color: var(--brand); border-color: rgba(var(--brand-rgb), .22); }
.icon-btn:hover { background: var(--surface-2); border-color: #b9c6d4; transform: translateY(-1px); }
.icon-btn.edit:hover { background: var(--brand-light); border-color: var(--brand); }
.icon-btn:active { transform: scale(.95); }
.icon-btn:focus-visible { outline: 3px solid rgba(var(--brand-rgb), .22); outline-offset: 2px; }
.icon-btn.danger { color: var(--danger); border-color: #fecaca; }
.icon-btn.danger:hover { background: var(--danger-light); border-color: var(--danger); }

.table-state-row td {
  position: static !important;
  height: 270px !important;
  background: #fff !important;
  border-inline-start: 0 !important;
  box-shadow: none !important;
}

.table-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--text-muted);
  text-align: center;
}

.table-state strong { color: #475569; font-size: .9rem; font-weight: 800; }
.table-state small { max-width: 380px; font-size: .73rem; white-space: normal; }
.table-state.is-error strong, .table-state.is-error { color: var(--danger); }

.table-state-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 5px;
  color: var(--text-muted);
  background: var(--surface-2);
  border-radius: 14px;
  font-size: 1.1rem;
  font-weight: 900;
}

.table-state-icon svg { width: 24px; height: 24px; }
.table-state.is-error .table-state-icon { color: var(--danger); background: var(--danger-light); }

/* ---------- إجمالي المبالغ قيد المراجعة لكل بنك ---------- */
.bank-pending-section { margin-top: 22px; }

.bank-pending-section h3 {
  font-size: .96rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text);
}

.bank-pending-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.bank-pending-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.bank-pending-card .bank-logo { flex-shrink: 0; }

.bank-pending-info { min-width: 0; }
.bank-pending-name { font-size: .82rem; font-weight: 700; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bank-pending-account { display: block; font-size: .7rem; font-weight: 600; color: var(--text-muted); opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bank-pending-amount { font-size: 1.15rem; font-weight: 800; color: var(--warn); direction: ltr; text-align: right; }
.bank-pending-amount small { font-size: .68rem; font-weight: 700; color: var(--text-muted); margin-right: 3px; }
.bank-pending-count { font-size: .7rem; color: var(--text-muted); font-weight: 600; }

/* كارت "مرفوض" — فلتر بالضغط، أعلى صفحة أمناء الخزينة */
.reject-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.reject-filter-group { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }

.reject-filter-card {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 13px 22px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  user-select: none;
  transition: border-color .16s, transform .1s, box-shadow .16s, background .16s;
}

.reject-filter-card:hover  { border-color: #cbd5e1; transform: translateY(-1px); }
.reject-filter-card:active { transform: scale(.98); }

.reject-filter-icon { font-size: 1.4rem; line-height: 1; }

.reject-filter-text { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.reject-filter-count { font-size: 1.5rem; font-weight: 800; color: var(--danger); line-height: 1.1; }
.reject-filter-label { font-size: .8rem; font-weight: 700; color: var(--text-muted); }

.reject-filter-card.active {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-light);
  background: var(--danger-light);
}
.reject-filter-card.active .reject-filter-label { color: var(--danger); }

/* كارت "إيداعاتي المعلّق عليها" — نفس شكل كارت "مرفوض" بس بلون --attn (وردي
   فوشي لافت) بدل --danger (أحمر) و--warn (كهرماني)، عشان يبان تنبيه مختلف
   ومميّز بصريًا عن باقي الألوان المستخدمة في الصفحة أصلاً (أحمر/كهرماني/أخضر) */
.note-filter-card .reject-filter-count { color: var(--attn); }
.note-filter-card.active {
  border-color: var(--attn);
  box-shadow: 0 0 0 3px var(--attn-light);
  background: var(--attn-light);
}
.note-filter-card.active .reject-filter-label { color: var(--attn); }

/* نبضة لفت نظر على كارت "إيداعاتي المعلّق عليها" — بس لما يكون فيه عدد فعلي
   (has-items بتتحط/تتشال من updateNoteCount() في index.js)، وبتوقف لما الكارت
   يتفعّل (active) عشان مايتعاركش مع الـ glow الثابت بتاعه */
.note-filter-card.has-items:not(.active) {
  animation: note-card-pulse 1.7s ease-in-out infinite;
}
@keyframes note-card-pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--attn-light); border-color: var(--border); }
  50%      { box-shadow: 0 0 0 6px var(--attn-light); border-color: var(--attn); }
}

.reject-filter-hint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--danger);
  animation: reject-hint-glow 1.5s ease-in-out infinite;
}

.reject-filter-hint-arrow {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  fill: none;
  stroke: var(--danger);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  /* الـ SVG مرسوم أصلًا وهو بيشاور لليمين (viewBox ثابت مش متأثر بـ dir=rtl)،
     وده بالظبط الاتجاه المطلوب لأن الكارت واقع يمين التلميح في تخطيط RTL. */
  animation: reject-hint-nudge 1.5s ease-in-out infinite;
}

@keyframes reject-hint-glow {
  0%, 100% { opacity: 1; text-shadow: none; }
  50%      { opacity: .8; text-shadow: 0 0 10px var(--danger-light); }
}

@keyframes reject-hint-nudge {
  0%, 100% { transform: translateX(0) scale(1); }
  50%      { transform: translateX(8px) scale(1.15); }
}

@media (max-width: 640px) {
  .reject-filter-hint { display: none; }
}

/* ---------- سجل الحركات (Activity Feed) ---------- */
.activity-feed {
  display: flex;
  flex-direction: column;
  max-height: 640px;
  overflow-y: auto;
}

.activity-feed > .table-state { padding: 50px 16px; }

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  transition: background .14s;
}

.activity-item:last-child { border-bottom: none; }
.activity-item:hover { background: var(--surface-2); }

.activity-icon {
  flex-shrink: 0;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--text-muted);
}

.activity-icon svg { width: 18px; height: 18px; }

.activity-item.tone-ok      .activity-icon { background: var(--ok-light);     color: var(--ok); }
.activity-item.tone-danger  .activity-icon { background: var(--danger-light); color: var(--danger); }
.activity-item.tone-info    .activity-icon { background: var(--brand-light);  color: var(--brand); }
.activity-item.tone-neutral .activity-icon { background: var(--warn-light);   color: var(--warn); }

.activity-body { flex: 1; min-width: 0; }

.activity-line {
  display: flex;
  align-items: baseline;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 3px;
}

.activity-actor { font-size: .87rem; font-weight: 800; color: var(--text); }
.activity-action { font-size: .78rem; font-weight: 700; color: var(--text-muted); }

.activity-detail {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.activity-detail b { color: var(--text); font-weight: 800; }
.activity-detail .badge { font-size: .68rem; padding: 1px 8px; }

.activity-time {
  flex-shrink: 0;
  font-size: .74rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
  padding-top: 2px;
}

@media (max-width: 640px) {
  .activity-item { padding: 12px 14px; gap: 10px; }
  .activity-line { flex-direction: column; align-items: flex-start; gap: 1px; }
}

.table-state-spinner {
  width: 30px;
  height: 30px;
  margin-bottom: 7px;
  border: 3px solid var(--brand-light);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

@keyframes receipt-pulse { to { opacity: .35; } }

.empty { text-align: center; padding: 52px 16px; color: var(--text-muted); }
.empty .ic { font-size: 42px; display: block; margin-bottom: 10px; opacity: .45; }

/* ---------- إدارة البنوك (سحب وإفلات) ---------- */
.bank-list { display: flex; flex-direction: column; gap: 9px; }

.bank-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  transition: border-color .16s, box-shadow .16s, opacity .16s;
}

.bank-row.dragging  { opacity: .4; border-style: dashed; }
.bank-row.drag-over { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-light); }
.bank-row.off       { opacity: .55; background: var(--surface-2); }

.grip {
  cursor: grab;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1;
  padding: 3px 2px;
  user-select: none;
}

.grip:active { cursor: grabbing; }

.bank-row .info { flex: 1; min-width: 0; }
.bank-row .info .nm { font-weight: 700; font-size: .93rem; }
.bank-row .info .mt { color: var(--text-muted); font-size: .78rem; }

/* ---------- مفتاح التبديل ---------- */
.sw { position: relative; display: inline-block; width: 42px; height: 23px; flex-shrink: 0; }
.sw input { opacity: 0; width: 0; height: 0; }

.sw .sl {
  position: absolute; inset: 0;
  background: #cbd5e1;
  border-radius: 23px;
  cursor: pointer;
  transition: background .18s;
}

.sw .sl::before {
  content: '';
  position: absolute;
  width: 17px; height: 17px;
  right: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .18s;
}

.sw input:checked + .sl              { background: var(--ok); }
.sw input:checked + .sl::before      { transform: translateX(-19px); }

/* ---------- النافذة المنبثقة ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15, 23, 42, .62);
  display: none;
  align-items: center; justify-content: center;
  padding: 18px;
  backdrop-filter: blur(3px);
}

.modal.show { display: flex; }

.modal-box {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 26px;
}

.modal-box.wide { max-width: 900px; }

.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}

.modal-head h3 { font-size: 1.14rem; font-weight: 800; }

.x {
  border: none; background: none;
  font-size: 25px; line-height: 1;
  color: var(--text-muted);
  cursor: pointer; padding: 0 5px;
}

.x:hover { color: var(--text); }

.modal-foot { display: flex; gap: 9px; justify-content: flex-start; margin-top: 22px; }

.full-img { width: 100%; max-height: 74vh; object-fit: contain; background: #0f172a; border-radius: var(--radius-sm); }

/* ---------- تلوين حقل اللون ---------- */
input[type="color"] {
  width: 52px; height: 40px;
  padding: 3px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--surface);
}

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }

/* ---------- الجدول كبطاقات على الشاشات الصغيرة ---------- */
@media (max-width: 760px) {
  .data-table-card {
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .data-table-head {
    margin-bottom: 11px;
    padding: 15px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 15px;
    box-shadow: var(--shadow);
  }

  .table-scroll {
    max-height: none;
    overflow: visible;
    scrollbar-gutter: auto;
  }

  .admin-table {
    display: block;
    min-width: 0;
  }

  .admin-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .admin-table tbody {
    display: grid;
    gap: 12px;
  }

  .admin-table tbody tr.deposit-row {
    display: block;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-inline-start: 4px solid var(--row-accent, #94a3b8);
    border-radius: 15px;
    box-shadow: var(--shadow);
  }

  /* جدول الإيداعات وحده له تخطيط شبكي بمناطق مسمّاة */
  #depositsTable tbody tr.deposit-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "ref status"
      "client client"
      "bank bank"
      "amount date"
      "receipt receipt"
      "actions actions";
  }

  /* باقي جداول الإدارة (مستخدمين / IP / حسابات العملاء): كل خلية سطر «عنوان ثم قيمة» مكدّس */
  #usersTable tbody td,
  #ipsTable tbody td,
  #custAccountsTable tbody td {
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
  }

  #usersTable tbody td::before,
  #ipsTable tbody td::before,
  #custAccountsTable tbody td::before { align-self: flex-start; }

  #usersTable .row-actions,
  #custAccountsTable .row-actions,
  #ipsTable .row-actions { flex-wrap: wrap; gap: 8px; }

  #usersTable .icon-btn,
  #custAccountsTable .icon-btn { width: 40px; height: 40px; }

  /* الجداول جوّه النوافذ المنبثقة تفضل بسكرول داخلي بدل ما تطفح */
  .modal .table-scroll { max-height: 58vh !important; overflow: auto !important; }

  .admin-table tbody td {
    position: static !important;
    min-width: 0;
    height: auto;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 13px;
    white-space: normal;
    background: #fff !important;
    border-bottom: 1px solid #edf1f5;
    border-inline-start: 0 !important;
    box-shadow: none !important;
  }

  .admin-table tbody td::before {
    content: attr(data-label);
    flex-shrink: 0;
    color: var(--text-muted);
    font-size: .67rem;
    font-weight: 700;
  }

  .admin-table .cell-ref     { grid-area: ref; }
  .admin-table .cell-client  { grid-area: client; }
  .admin-table .cell-bank    { grid-area: bank; }
  .admin-table .cell-amount  { grid-area: amount; }
  .admin-table .cell-date    { grid-area: date; }
  .admin-table .cell-receipt { grid-area: receipt; }
  .admin-table .cell-status  { grid-area: status; }
  .admin-table .cell-actions { grid-area: actions; border-bottom: 0; }

  .admin-table .cell-ref,
  .admin-table .cell-status {
    background: #fbfcfd !important;
  }

  .admin-table .cell-client,
  .admin-table .cell-bank,
  .admin-table .cell-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .client-cell,
  .bank-cell { width: 100%; }

  .client-details > strong,
  .client-meta,
  .bank-cell .cell-trunc { max-width: none; }

  .client-details { flex: 1; }

  .cell-actions .row-actions {
    width: 100%;
    gap: 9px;
  }

  .cell-actions .icon-btn {
    width: auto;
    min-height: 44px;
    flex: 1;
    gap: 7px;
    padding: 0 12px;
    font-family: inherit;
    font-size: .72rem;
    font-weight: 800;
  }

  .icon-btn .action-label { display: inline; }

  .table-state-row {
    display: block;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 15px;
    box-shadow: var(--shadow);
  }

  .table-state-row td {
    display: block !important;
    height: 240px !important;
    border: 0 !important;
  }

  .table-state-row td::before { display: none; }
  .table-state { height: 100%; }
}

/* ---------- الشاشات الصغيرة ---------- */
@media (max-width: 640px) {
  .card       { padding: 20px 17px; }
  .wrap       { padding: 16px 12px 48px; }
  .wrap-wide  { padding: 16px 12px 48px; }
  .bank-picker { padding: 12px; }
  .bank-grid  { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bank-opt   { gap: 8px; padding: 8px; }
  .bank-opt-logo { width: 48px; height: 48px; }
  .bank-opt-name { font-size: .74rem; }
  .bank-opt-code { font-size: .64rem; }
  .row-2      { grid-template-columns: 1fr; }
  .modal-box  { padding: 20px 17px; }
  .filters input, .filters select { min-width: 100%; }
}

@media (max-width: 480px) {
  .bank-choice-tag { display: none; }
  .bank-grid { grid-template-columns: 1fr; }
  .bank-opt:last-child:nth-child(odd) { grid-column: auto; }
  .bank-opt-name { font-size: .8rem; }
  .data-table-head { gap: 10px; padding: 13px; }
  .data-table-icon { width: 38px; height: 38px; }
  .data-table-title p { display: none; }
  .data-table-count { min-width: auto; padding: 6px 9px; }
  .data-table-count span { display: none; }
}

/* ---------- لوحة التحكم على الموبايل ---------- */
@media (max-width: 760px) {
  .topbar { padding: 9px 0; }
  .topbar .inner { flex-wrap: wrap; gap: 8px 9px; }
  .topbar .brand { flex: 1 1 100%; gap: 8px; font-size: .92rem; line-height: 1.35; }
  .topbar .brand .mk { width: 30px; height: 30px; border-radius: 9px; }
  .topbar .sp { display: none; }
  #userEmail { flex: 1 1 100%; order: 9; font-size: .76rem !important; }
  .topbar .btn.sm { flex: 1 1 auto; justify-content: center; padding: 7px 10px; font-size: .78rem; }

  .tabs {
    flex-wrap: nowrap;
    gap: 2px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: 0 0 auto; padding: 9px 14px; font-size: .86rem; }
}

@media (max-width: 480px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
  .stat { padding: 13px; border-radius: 13px; }
  .stat .n { font-size: 1.45rem; }
  .stat .l { font-size: .76rem; }

  .filters { padding: 11px; gap: 8px; }

  .modal { padding: 10px; }
  .modal-box { padding: 18px 15px; }
  .modal-foot { flex-direction: column; gap: 8px; margin-top: 18px; }
  .modal-foot .btn { width: 100%; }
}

/* ============================================================
   الصفحة العامة — تجربة تسجيل الإيداع
   ============================================================ */
/* Admin dashboard — polished desktop and mobile layout */
.admin-dashboard { background:linear-gradient(180deg,#f5f8fb 0,#f3f6f9 340px); }

.admin-dashboard .topbar {
  padding:0;
  background:rgba(255,255,255,.96);
  border-bottom-color:#dce4ed;
  box-shadow:0 5px 22px rgba(15,23,42,.06);
  backdrop-filter:blur(14px);
}

.admin-dashboard .topbar .inner { max-width:none; min-height:68px; padding:10px 22px; gap:10px; }
.admin-dashboard .topbar .brand { color:#172235; font-size:1rem; font-weight:900; white-space:nowrap; }
.admin-dashboard .topbar .brand .mk { width:42px; height:42px; border-radius:13px; box-shadow:0 5px 14px rgba(var(--brand-rgb),.2); }

.admin-dashboard .topbar-user {
  max-width:190px;
  overflow:hidden;
  padding:6px 10px;
  color:var(--brand-dark);
  background:var(--brand-light);
  border:1px solid rgba(var(--brand-rgb),.13);
  border-radius:999px;
  font-size:.72rem;
  font-weight:700;
  text-overflow:ellipsis;
  white-space:nowrap;
  direction:ltr;
}

.admin-dashboard .topbar-actions { display:flex; align-items:center; justify-content:flex-end; gap:6px; }
.admin-dashboard .topbar-actions .btn { min-height:38px; padding-inline:11px; border-radius:10px; font-size:.74rem; white-space:nowrap; }
.admin-dashboard .topbar-actions .btn:hover { transform:translateY(-1px); }
.admin-dashboard #logoutBtn { color:#9f1239; border-color:#fecdd3; background:#fff7f8; }
.admin-dashboard #logoutBtn:hover { color:#fff; background:#be123c; border-color:#be123c; }

.admin-dashboard .wrap-wide { max-width:1440px; padding:22px 22px 64px; }
.admin-dashboard .tabs {
  position:relative;
  gap:5px;
  margin-bottom:20px;
  padding:5px;
  background:#fff;
  border:1px solid #dce4ed;
  border-radius:16px;
  box-shadow:0 7px 22px rgba(15,23,42,.055);
}

.admin-dashboard .tab {
  min-height:42px;
  margin:0;
  padding:9px 17px;
  border:0;
  border-radius:11px;
  font-size:.84rem;
  transition:color .16s,background .16s,box-shadow .16s,transform .12s;
}

.admin-dashboard .tab:hover { color:var(--brand-dark); background:#f4f7fa; }
.admin-dashboard .tab.active { color:#fff; background:linear-gradient(135deg,var(--brand),var(--brand-dark)); box-shadow:0 5px 13px rgba(var(--brand-rgb),.22); }
.admin-dashboard .tab:active { transform:scale(.98); }
.admin-dashboard .tab:focus-visible { outline:3px solid rgba(var(--brand-rgb),.2); outline-offset:2px; }

.admin-dashboard .stats { gap:11px; margin-bottom:18px; }
.admin-dashboard .stat {
  position:relative;
  overflow:hidden;
  min-height:102px;
  padding:17px 18px 15px;
  border:1px solid #dce4ed;
  border-radius:16px;
  box-shadow:0 2px 4px rgba(15,23,42,.035),0 10px 24px rgba(15,23,42,.055);
}

.admin-dashboard .stat::before { content:''; position:absolute; inset:0 0 auto; height:4px; background:#94a3b8; }
.admin-dashboard .stat.p::before { background:var(--warn); }
.admin-dashboard .stat.a::before { background:var(--brand); }
.admin-dashboard .stat.c::before { background:var(--success); }
.admin-dashboard .stat.r::before { background:var(--danger); }
.admin-dashboard .stat.e::before { background:var(--accent); }
.admin-dashboard .stat:hover { border-color:#b9c7d6; box-shadow:0 12px 28px rgba(15,23,42,.09); transform:translateY(-2px); }
.admin-dashboard .stat.selected { background:linear-gradient(145deg,#fff,var(--brand-soft)); }
.admin-dashboard .stat .n { font-size:1.72rem; font-weight:900; font-variant-numeric:tabular-nums; }
.admin-dashboard .stat .l { margin-top:5px; color:#566579; font-size:.78rem; font-weight:700; }

.admin-dashboard .filters {
  gap:10px;
  padding:14px;
  background:linear-gradient(145deg,#fff 0%,#fbfcfe 100%);
  border-color:#dce4ed;
  border-radius:16px;
  box-shadow:0 7px 22px rgba(15,23,42,.055);
}

.admin-dashboard .filters input,
.admin-dashboard .filters select { min-height:42px; border-color:#d7e0e9; background-color:#fff; font-size:.8rem; }
.admin-dashboard .filters input:hover,
.admin-dashboard .filters select:hover { border-color:#b9c7d6; }
.admin-dashboard .filters .btn { min-height:40px; border-radius:10px; }
.admin-dashboard .deposit-filters { display:block; }
.admin-dashboard .filter-fields { display:grid; grid-template-columns:2fr 1.35fr 1fr 1fr 1fr; gap:9px; }
.admin-dashboard .filter-fields input,
.admin-dashboard .filter-fields select { width:100%; min-width:0; }
.admin-dashboard .filter-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; margin-top:11px; padding-top:11px; border-top:1px solid #e7edf3; }

.admin-dashboard .data-table-card { border-color:#d8e1ea; border-radius:18px; box-shadow:0 2px 5px rgba(15,23,42,.04),0 16px 36px rgba(15,23,42,.075); }
.admin-dashboard .data-table-head { padding:17px 19px; background:linear-gradient(135deg,#fff 0%,#f5f9fc 100%); }
.admin-dashboard .data-table-icon { color:#fff; background:linear-gradient(145deg,var(--brand),var(--brand-dark)); border:0; box-shadow:0 5px 13px rgba(var(--brand-rgb),.2); }
.admin-dashboard .data-table-title h2 { color:#172235; font-size:1.02rem; font-weight:900; }
.admin-dashboard .admin-table thead th { color:var(--brand-dark); background:#edf3f8; border-bottom-color:#d6e0e9; border-left:1px solid #d6e0e9; }
.admin-dashboard .admin-table thead th:last-child { border-left:0; }
.admin-dashboard .admin-table tbody tr:hover td { background:#f8fbfd; }

/* ---------- قائمة جانبية بدل التبويبات الأفقية (شاشات الكمبيوتر فقط) ----------
   نفس فكرة الـ sidebar في سيرفر الشحونات — على الموبايل (760px فأقل) التصميم
   القديم (شريط تبويبات أفقي قابل للتمرير) فاضل زي ما هو تمامًا، من غير أي تغيير؛
   القائمة الجانبية دي بتتفعّل بس فوق نقطة الكسر دي. */
@media (min-width:761px) {
  .admin-dashboard .admin-body { display:flex; flex-direction:row-reverse; align-items:flex-start; }

  .admin-dashboard .tabs {
    flex:0 0 224px;
    width:224px;
    flex-direction:column;
    align-items:stretch;
    gap:0;
    margin:0;
    padding:18px 12px 24px;
    position:fixed;
    right:0;
    top:68px;
    bottom:52px;
    border:0;
    border-radius:0;
    background:linear-gradient(180deg,var(--brand) 0%,var(--brand-dark) 100%);
    box-shadow:-10px 0 30px rgba(15,23,42,.12);
    overflow-y:auto;
    scrollbar-width:thin;
    scrollbar-color:rgba(255,255,255,.35) transparent;
    z-index:80;
  }

  .admin-dashboard .tab {
    display:flex;
    align-items:center;
    gap:10px;
    width:100%;
    min-height:46px;
    margin:3px 0;
    padding:10px 13px;
    border:0;
    border-radius:11px;
    color:#e4edf5;
    background:transparent;
    box-shadow:none;
    font-size:.87rem;
    font-weight:700;
    line-height:1.55;
    transition:background .18s, color .18s, transform .18s;
  }
  /* .tab بتفوز على .admin-only بسبب زيادة تخصيص السيليكتور (class واحد ضد
     اتنين) — ده كان بيخلي تبويبات المشرف بس (البنوك/المستخدمين/IP/سجل
     الحركات/حسابات العملاء) تظهر لأي حد حتى المراجع، قبل ما جافاسكريبت
     applyRolePermissions() يوصل أصلاً. لازم .admin-only تفضل غالبة هنا. */
  .admin-dashboard .tabs .tab.admin-only { display:none; }
  .admin-dashboard .tab .tab-ic { font-size:1.05rem; line-height:1; flex-shrink:0; }
  .admin-dashboard .tab:hover { color:#fff; background:rgba(255,255,255,.13); transform:translateX(-2px); }
  .admin-dashboard .tab.active {
    color:#fff; font-weight:900; border:0;
    background:rgba(255,255,255,.22);
    box-shadow:0 8px 18px rgba(15,23,42,.22);
  }

  .admin-dashboard .wrap-wide { flex:1 1 auto; min-width:0; max-width:none; margin-right:224px; padding:22px 26px 64px; }

  /* Deposits tab — compact layout matching the logistics deposits screen */
  .admin-dashboard #panel-deposits .stats { grid-template-columns:repeat(auto-fit,minmax(145px,1fr)); gap:10px; margin-bottom:14px; }
  .admin-dashboard #panel-deposits .stat {
    min-height:64px;
    display:flex;
    align-items:center;
    gap:10px;
    padding:9px 13px;
    padding-inline-start:17px;
    border-width:1px;
    border-radius:14px;
  }
  .admin-dashboard #panel-deposits .stat::before { top:0; bottom:0; inset-inline-start:0; inset-inline-end:auto; width:3px; height:auto; }
  .admin-dashboard #panel-deposits .stat .n { font-size:1.25rem; line-height:1; }
  .admin-dashboard #panel-deposits .stat .l { margin:0; font-size:.68rem; white-space:nowrap; }

  .admin-dashboard #panel-deposits .deposit-filters { padding:12px 14px; margin-bottom:14px; border-radius:14px; }
  .admin-dashboard #panel-deposits .filter-fields { grid-template-columns:minmax(240px,1.35fr) minmax(190px,1fr) repeat(3,minmax(145px,.68fr)); gap:10px; }
  .admin-dashboard #panel-deposits .admin-dep-field { min-width:0; display:flex; flex-direction:column; gap:4px; }
  .admin-dashboard #panel-deposits .admin-dep-field > span { color:#536278; font-size:.67rem; font-weight:850; }
  .admin-dashboard #panel-deposits .admin-dep-field input,
  .admin-dashboard #panel-deposits .admin-dep-field select { width:100%; min-height:40px; padding-block:7px; background:#fbfcfe; }
  .admin-dashboard #panel-deposits .filter-actions { margin-top:10px; padding-top:10px; }

  .admin-dashboard #panel-deposits .data-table-card { border-radius:16px; box-shadow:0 2px 8px rgba(15,23,42,.05); }
  .admin-dashboard #panel-deposits .data-table-head { padding:12px 17px; }
  .admin-dashboard #panel-deposits .data-table-icon { width:34px; height:34px; color:var(--accent); background:var(--accent-light); box-shadow:none; }
  .admin-dashboard #panel-deposits .data-table-icon svg { width:17px; height:17px; }
  .admin-dashboard #panel-deposits .data-table-title h2 { font-size:.88rem; }
  .admin-dashboard #panel-deposits .data-table-title p { display:none; }
  .admin-dashboard #panel-deposits .data-table-count { padding:5px 9px; font-size:.66rem; }
  .admin-dashboard #panel-deposits .table-scroll { max-height:none; overflow:visible; scrollbar-gutter:auto; }
  .admin-dashboard #panel-deposits .admin-table { min-width:0; table-layout:fixed; font-size:.72rem; }
  .admin-dashboard #panel-deposits .admin-table th:nth-child(1) { width:4%; }
  .admin-dashboard #panel-deposits .admin-table th:nth-child(2) { width:6%; }
  .admin-dashboard #panel-deposits .admin-table th:nth-child(3) { width:17%; }
  .admin-dashboard #panel-deposits .admin-table th:nth-child(4) { width:8%; }
  .admin-dashboard #panel-deposits .admin-table th:nth-child(5) { width:10%; }
  .admin-dashboard #panel-deposits .admin-table th:nth-child(6) { width:7%; }
  .admin-dashboard #panel-deposits .admin-table th:nth-child(7) { width:7%; }
  .admin-dashboard #panel-deposits .admin-table th:nth-child(8) { width:7.5%; }
  .admin-dashboard #panel-deposits .admin-table th:nth-child(9) { width:7.5%; }
  .admin-dashboard #panel-deposits .admin-table th:nth-child(10) { width:7%; }
  .admin-dashboard #panel-deposits .admin-table th:nth-child(11) { width:7%; }
  .admin-dashboard #panel-deposits .admin-table th:nth-child(12) { width:11%; }
  .admin-dashboard #panel-deposits .admin-table thead th {
    position:static;
    padding:11px 7px;
    color:#223651;
    font-size:.66rem;
    text-align:center;
    background:linear-gradient(180deg,#f8fafc,#edf2f7);
    border-bottom:1px solid #9fb4ca;
    border-left:1px solid #d3dde8;
  }
  .admin-dashboard #panel-deposits .admin-table thead th:last-child { border-left:0; }
  .admin-dashboard #panel-deposits .admin-table tbody td {
    height:60px;
    padding:8px 7px;
    overflow:hidden;
    text-align:center;
    text-overflow:ellipsis;
  }
  .admin-dashboard #panel-deposits .admin-table tbody tr:nth-child(even) td { background:#fbfcfe; }
  .admin-dashboard #panel-deposits .admin-table tbody tr:hover td { background:#f4f8fc; }
  .admin-dashboard #panel-deposits .admin-table .cell-client,
  .admin-dashboard #panel-deposits .admin-table .cell-bank { text-align:start; white-space:normal; }
  .admin-dashboard #panel-deposits .admin-table .cell-client { display:table-cell; }
  .admin-dashboard #panel-deposits .admin-table .cell-client > strong { display:block; max-width:100%; font-size:.73rem; }
  .admin-dashboard #panel-deposits .admin-table .cell-code,
  .admin-dashboard #panel-deposits .admin-table .cell-ref { font-size:.69rem; }
  .admin-dashboard #panel-deposits .admin-table .bank-cell { gap:5px; }
  .admin-dashboard #panel-deposits .admin-table .bank-cell-logo { width:24px; height:24px; }
  .admin-dashboard #panel-deposits .admin-table .amount-cell { justify-content:center; }
  .admin-dashboard #panel-deposits .admin-table .date-cell-wrap { align-items:center; }
  .admin-dashboard #panel-deposits .admin-table .cell-created time { display:flex; flex-direction:column; align-items:center; gap:2px; }
  .admin-dashboard #panel-deposits .admin-table .cell-created small { color:var(--text-muted); font-size:.63rem; font-weight:750; }
  .admin-dashboard #panel-deposits .admin-table .cell-submitter { white-space:normal; }
  .admin-dashboard #panel-deposits .admin-table .submitter-meta { display:flex; flex-direction:column; gap:1px; margin-top:3px; color:var(--text-muted); font-size:.58rem; }
  .admin-dashboard #panel-deposits .admin-table .receipt-cell-wrap { justify-content:center; }
  .admin-dashboard #panel-deposits .admin-table .row-actions { justify-content:center; gap:4px; }
  .admin-dashboard #panel-deposits .admin-table .icon-btn { width:29px; height:29px; }
  .admin-dashboard #panel-deposits .admin-table tbody td:last-child { position:static; }
  .admin-dashboard #panel-deposits .pagination { padding:13px 16px; background:#fbfcfe; border-top:1px solid #e3eaf1; }
  .admin-dashboard #panel-deposits .pagination:empty { display:none; }
  .admin-dashboard #panel-deposits .bank-pending-section { margin-top:14px; padding:15px 16px; background:#fff; border:1px solid #dfe6ef; border-radius:16px; box-shadow:0 2px 8px rgba(15,23,42,.05); }
  .admin-dashboard #panel-deposits .bank-pending-section h3 { margin-bottom:11px; font-size:.84rem; }
}

@media (max-width:1180px) {
  .admin-dashboard .topbar .inner { flex-wrap:wrap; }
  .admin-dashboard .topbar .sp { display:none; }
  .admin-dashboard .topbar .brand { flex:1 1 auto; }
  .admin-dashboard .topbar-actions { width:100%; justify-content:flex-start; overflow-x:auto; padding-bottom:1px; scrollbar-width:none; }
  .admin-dashboard .topbar-actions::-webkit-scrollbar { display:none; }
}

@media (max-width:760px) {
  .admin-dashboard .topbar .inner { min-height:0; padding:10px 12px; gap:9px; }
  .admin-dashboard .topbar .brand { flex:1 1 100%; font-size:.9rem; white-space:normal; }
  .admin-dashboard .topbar .brand .mk { width:36px; height:36px; }
  .admin-dashboard #userEmail { order:2; flex:1 1 100%; max-width:none; text-align:center; }
  .admin-dashboard .topbar-actions { order:3; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); overflow:visible; }
  .admin-dashboard .topbar-actions .btn { width:100%; justify-content:center; min-height:40px; padding-inline:8px; font-size:.7rem; }
  .admin-dashboard .wrap-wide { padding:13px 11px 44px; }
  .admin-dashboard .tabs { flex-wrap:nowrap; margin-bottom:15px; padding:4px; overflow-x:auto; border-radius:14px; scrollbar-width:none; }
  .admin-dashboard .tabs::-webkit-scrollbar { display:none; }
  .admin-dashboard .tab { flex:0 0 auto; min-height:38px; padding:8px 13px; font-size:.77rem; }
  .admin-dashboard .stats { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
  .admin-dashboard .stat { min-height:91px; padding:15px 14px 12px; }
  .admin-dashboard .stat .n { font-size:1.5rem; }
  .admin-dashboard .filter-fields { grid-template-columns:1fr; }
  .admin-dashboard .filter-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .admin-dashboard .filter-actions .btn { width:100%; justify-content:center; }
  .admin-dashboard .data-table-head { padding:14px; }
}

@media (max-width:420px) {
  .admin-dashboard .topbar-actions { grid-template-columns:1fr; }
  .admin-dashboard .filter-actions { grid-template-columns:1fr; }
  .admin-dashboard .stats { gap:8px; }
  .admin-dashboard .stat { min-height:86px; padding:14px 12px 11px; }
  .admin-dashboard .stat .l { font-size:.71rem; line-height:1.45; }
}

/* Shared fixed footer for customer and administration portals */
.has-app-footer { --app-footer-h:52px; }
.has-app-footer .wrap { padding-bottom:calc(64px + var(--app-footer-h)); }
.has-app-footer .wrap-wide { padding-bottom:calc(64px + var(--app-footer-h)); }
.has-app-footer .dw-app { padding-bottom:var(--app-footer-h); }
.app-footer {
  position:fixed;
  inset-inline:0;
  inset-block-end:0;
  z-index:25;
  height:var(--app-footer-h,52px);
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--text-muted);
  background:rgba(255,255,255,.97);
  border-top:1px solid var(--border);
  box-shadow:0 -4px 18px rgba(15,23,42,.06);
  backdrop-filter:blur(10px);
  font-size:.72rem;
  font-weight:700;
}
.app-footer::before { content:''; position:absolute; inset:0 0 auto; height:2px; background:linear-gradient(90deg,var(--brand),#c9cdd3,var(--danger)); }
.footer-inner { width:100%; display:flex; align-items:center; justify-content:space-between; gap:20px; padding:0 22px; direction:rtl; }
.footer-brand { display:flex; align-items:center; gap:9px; color:var(--text); font-size:.75rem; font-weight:900; white-space:nowrap; }
.footer-brand img { width:27px; height:27px; display:block; object-fit:cover; border:1px solid #dce3ec; border-radius:8px; box-shadow:0 3px 8px rgba(29,78,121,.12); }
.footer-credit { display:flex; align-items:center; gap:5px; white-space:nowrap; }
.footer-credit strong { color:var(--brand); font-size:.76rem; font-weight:900; letter-spacing:.2px; direction:ltr; }

@media (max-width:760px) {
  .has-app-footer .wrap { padding-bottom:calc(42px + var(--app-footer-h)); }
  .app-footer .footer-brand { display:none; }
  .app-footer .footer-credit { display:flex; }
  .app-footer .footer-inner { justify-content:center; }
}

.public-page {
  --brand: #1d4e79;
  --brand-dark: #163b5c;
  --brand-darker: #102a43;
  --brand-light: #e9f1f7;
  --brand-rgb: 29, 78, 121;
  --brand-light-rgb: 233, 241, 247;
  --brand-soft: #eef4f9;
  --accent: #ae163f;
  --accent-dark: #89112f;
  --accent-light: #f9e8ed;
  --accent-rgb: 174, 22, 63;
  min-height: 100vh;
  overflow-x: hidden;
  background: #f3f6f9;
}

.public-page .hero-band {
  position: fixed;
  inset: 0;
  height: auto;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 93% -8%, rgba(var(--accent-rgb), .12), transparent 68%),
    radial-gradient(700px 420px at -8% 34%, rgba(var(--brand-rgb), .11), transparent 70%),
    linear-gradient(145deg, #f2f5f8 0%, #fbfcfd 48%, #edf2f7 100%);
}

.public-page .hero-band::before {
  content: '';
  position: absolute;
  width: 360px;
  height: 360px;
  top: 9%;
  left: -180px;
  border: 1px solid rgba(var(--accent-rgb), .10);
  border-radius: 50%;
  box-shadow: 0 0 0 58px rgba(var(--accent-rgb), .025), 0 0 0 116px rgba(var(--brand-rgb), .018);
}

.public-page .hero-band::after {
  opacity: .36;
  background-image: radial-gradient(rgba(var(--brand-rgb), .18) .8px, transparent .8px);
  background-size: 26px 26px;
  mask-image: linear-gradient(115deg, rgba(0,0,0,.7), transparent 62%);
}

.public-page .public-shell {
  width: 100%;
  max-width: 1180px;
  display: grid;
  grid-template-columns: 350px minmax(0, 760px);
  align-items: start;
  gap: 24px;
  margin: 0 auto;
  padding: 28px 18px 48px;
}

.public-intro {
  position: sticky;
  top: 28px;
  min-height: 680px;
  height: calc(100vh - 56px);
  max-height: 850px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
  padding: 28px;
  color: #fff;
  background:
    radial-gradient(420px 290px at 105% -5%, rgba(var(--accent-rgb), .72), transparent 68%),
    radial-gradient(320px 280px at -15% 78%, rgba(var(--accent-rgb), .27), transparent 70%),
    linear-gradient(155deg, #102a43 0%, #163b5c 54%, #1d4e79 100%);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(16,42,67,.26);
}

.public-intro::before {
  content: '';
  position: absolute;
  width: 250px;
  height: 250px;
  top: -120px;
  left: -90px;
  z-index: -1;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 50%;
  box-shadow: 0 0 0 38px rgba(255,255,255,.025), 0 0 0 76px rgba(255,255,255,.018);
}

.public-intro::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .3;
  background-image: radial-gradient(rgba(255,255,255,.22) .7px, transparent .7px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.68), transparent 72%);
}

.public-page .page-head {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 52px;
  text-align: start;
}

.public-page .logo-mark {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  margin: 0;
  border-radius: 15px;
  color: #fff;
  font-size: 23px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 10px 24px rgba(16,42,67,.28);
}

.public-page .page-head h1 {
  color: #fff;
  font-size: 1.38rem;
  line-height: 1.25;
  letter-spacing: -.3px;
}

.public-page .page-head .tagline {
  margin-top: 3px;
  color: rgba(255,255,255,.68);
  font-size: .7rem;
  font-weight: 600;
}

.public-hero-copy { margin-bottom: 30px; }

.public-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 13px;
  color: #fbd5df;
  font-size: .72rem;
  font-weight: 700;
}

.public-eyebrow i {
  width: 7px;
  height: 7px;
  background: #f08aa6;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .22);
}

.public-hero-copy h2 {
  color: #fff;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.42;
  letter-spacing: -.65px;
}

.public-hero-copy h2 span { color: #fbd5df; }

.public-hero-copy > p {
  max-width: 290px;
  margin-top: 15px;
  color: rgba(255,255,255,.72);
  font-size: .84rem;
  line-height: 1.9;
  font-weight: 500;
}

.public-benefits {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.public-benefit {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 13px;
  transition: background .18s, border-color .18s;
}

.public-benefit:hover {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.09);
}

.public-benefit-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: #dceaf4;
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
}

.public-benefit-icon svg { width: 18px; height: 18px; }
.public-benefit div { display: flex; flex-direction: column; }
.public-benefit strong { font-size: .78rem; font-weight: 800; }
.public-benefit small { margin-top: 1px; color: rgba(255,255,255,.58); font-size: .65rem; font-weight: 500; }

.public-assurance {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: auto;
  padding: 13px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 15px;
  backdrop-filter: blur(8px);
}

.public-assurance-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: #fbd5df;
  background: rgba(var(--accent-rgb), .18);
  border-radius: 10px;
}

.public-assurance-icon svg { width: 19px; height: 19px; }
.public-assurance div { display: flex; flex-direction: column; }
.public-assurance strong { font-size: .74rem; font-weight: 800; }
.public-assurance span { color: rgba(255,255,255,.58); font-size: .62rem; }

.public-main { min-width: 0; }

.public-page .public-form-card {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(203,213,225,.78);
  border-radius: 28px;
  box-shadow: 0 2px 5px rgba(15,23,42,.05), 0 26px 70px rgba(15,23,42,.12);
}

.public-page .public-form-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0 46%, #fff 46% 54%, var(--brand) 54% 100%);
  pointer-events: none;
}

.public-form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0;
  padding: 28px 32px 24px;
  text-align: start;
  background: linear-gradient(135deg, #fff 0%, #fbfdfd 100%);
  border-bottom: 1px solid var(--border);
}

.form-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 7px;
  padding: 4px 9px;
  color: var(--accent-dark);
  background: var(--accent-light);
  border: 1px solid rgba(var(--accent-rgb), .15);
  border-radius: 999px;
  font-size: .65rem;
  font-weight: 800;
}

.public-form-head h2 { color: var(--text); font-size: 1.42rem; font-weight: 900; letter-spacing: -.35px; }
.public-form-head p { margin-top: 4px; color: var(--text-muted); font-size: .8rem; }

.form-section-count {
  width: 84px;
  height: 64px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--brand-dark);
  background: var(--brand-light);
  border: 1px solid rgba(var(--brand-rgb), .14);
  border-radius: 15px;
}

.form-section-count span { font-size: 1.2rem; font-weight: 900; line-height: 1.2; }
.form-section-count small { color: var(--text-muted); font-size: .58rem; font-weight: 700; }

.public-page .msg { margin: 20px 32px 0; border: 1px solid transparent; border-radius: 12px; }
.public-page .msg.error { border-color: #fecaca; }
.public-page .msg.ok { border-color: rgba(var(--brand-rgb), .24); }

.public-page #depositForm { padding: 0 32px 32px; }

.form-section {
  padding: 29px 0 10px;
  border-bottom: 1px solid #edf1f5;
}

.form-section-last { padding-bottom: 14px; border-bottom: 0; }

.form-section-head {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 22px;
}

.form-section-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: var(--brand);
  background: var(--brand-light);
  border: 1px solid rgba(var(--brand-rgb), .14);
  border-radius: 12px;
}

.form-section-icon svg { width: 20px; height: 20px; }
.form-section-head h3 { color: var(--text); font-size: .94rem; font-weight: 900; line-height: 1.35; }
.form-section-head p { margin-top: 2px; color: var(--text-muted); font-size: .7rem; font-weight: 500; }

.form-section-number {
  margin-inline-start: auto;
  color: #cbd5e1;
  font-family: 'Cascadia Code', 'Courier New', monospace;
  font-size: .82rem;
  font-weight: 800;
  direction: ltr;
}

.public-page .field { margin-bottom: 19px; }
.public-page .field > label,
.public-page .choice-field > legend,
.public-page .bank-field > legend {
  margin-bottom: 8px;
  color: #253348;
  font-size: .79rem;
  font-weight: 800;
}

.choice-field {
  min-width: 0;
  padding: 0;
  border: 0;
}

.public-page .seg.ctype-seg {
  min-height: 0;
  padding: 0;
  gap: 12px;
  background: none;
  border: none;
  border-radius: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.ctype-card {
  position: relative;
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #fff, #f8fafc);
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  cursor: pointer;
  text-align: right;
  overflow: hidden;
  transition: border-color .18s, box-shadow .18s, transform .12s, background .18s;
}

.ctype-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(120px 80px at 15% 0%, rgba(var(--brand-rgb), .08), transparent 70%);
  opacity: 0;
  transition: opacity .18s;
}

.ctype-card:hover {
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15,23,42,.08);
}

.ctype-card.active {
  background: linear-gradient(180deg, #fff, rgba(var(--brand-rgb), .05));
  border-color: var(--brand);
  box-shadow: 0 2px 6px rgba(var(--brand-rgb), .12), 0 10px 24px rgba(var(--brand-rgb), .14);
}

.ctype-card.active::before { opacity: 1; }

.ctype-icon {
  flex-shrink: 0;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: #eef2f7;
  color: #64748b;
  transition: background .18s, color .18s, transform .18s;
}

.ctype-icon svg { width: 21px; height: 21px; }

.ctype-card.active .ctype-icon {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  transform: scale(1.06);
}

.ctype-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; position: relative; z-index: 1; }
.ctype-copy strong { font-size: .88rem; font-weight: 800; color: var(--text); }
.ctype-copy small { font-size: .72rem; color: var(--text-muted); font-weight: 600; }
.ctype-card.active .ctype-copy strong { color: var(--brand-dark); }

.ctype-check {
  position: absolute;
  top: 8px; left: 8px;
  width: 20px; height: 20px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  opacity: 0;
  transform: scale(.5);
  transition: opacity .16s, transform .16s;
}

.ctype-check svg { width: 12px; height: 12px; }
.ctype-card.active .ctype-check { opacity: 1; transform: scale(1); }

.public-page .seg-btn.ctype-card:focus-visible { outline: 3px solid rgba(var(--brand-rgb), .22); outline-offset: 2px; }

@media (max-width: 420px) {
  .public-page .seg.ctype-seg { grid-template-columns: 1fr; gap: 9px; }
  .ctype-card { padding: 11px 13px; }
}

.input-shell {
  position: relative;
  display: flex;
  align-items: center;
}

.input-shell .input-icon {
  position: absolute;
  right: 14px;
  z-index: 1;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  color: #94a3b8;
  pointer-events: none;
  transition: color .16s;
}

.input-shell .input-icon svg { width: 19px; height: 19px; }
.input-shell:focus-within .input-icon { color: var(--brand); }

.public-page .input-shell > input {
  min-height: 50px;
  padding: 11px 46px 11px 14px;
  color: #162033;
  background: #fff;
  border-color: #dbe3ec;
  border-radius: 12px;
  font-size: .86rem;
  font-weight: 600;
}

.public-page .input-shell > input:hover:not(:focus):not([readonly]) { border-color: #bdc9d6; }

.public-page .input-shell > input:focus,
.public-page textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3.5px rgba(var(--brand-light-rgb), .95);
}

.public-page .input-shell > input[readonly] {
  color: #64748b;
  background: #f8fafc;
}

.public-page input::placeholder,
.public-page textarea::placeholder { color: #a1aec0; font-weight: 500; }

.field-help {
  display: block;
  margin-top: 6px;
  color: #8290a3;
  font-size: .65rem;
  font-weight: 500;
}

.field-feedback {
  display: none;
  margin-top: 6px;
  padding-inline-start: 3px;
  font-size: .68rem !important;
  font-weight: 700 !important;
}

.public-page .row-2 { gap: 16px; }

.input-unit {
  position: absolute;
  left: 13px;
  color: var(--text-muted);
  font-size: .68rem;
  font-weight: 800;
  pointer-events: none;
}

.public-page .amount-shell > input { padding-left: 50px; }
.public-page .input-shell-date > input { padding-right: 14px; direction: ltr; text-align: right; }

.public-page .bank-field { margin-top: 2px; margin-inline: 0; }
.public-page .bank-picker { padding: 16px; background: linear-gradient(145deg, #f8fafc, #f2f6fa); border-color: #dbe3ec; border-radius: 16px; }
.public-page .bank-picker-head { margin-bottom: 14px; }
.public-page .bank-opt { min-height: 78px; border-radius: 13px; }
.public-page .bank-opt-name { font-size: .77rem; }

.public-page .drop {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 18px;
  color: var(--text);
  text-align: start;
  background: linear-gradient(145deg, #f8fafc 0%, #f2f6fa 100%);
  border: 1.5px dashed #bdcad8;
  border-radius: 16px;
  transition: border-color .18s, background .18s, box-shadow .18s, transform .12s;
}

.public-page .drop:hover,
.public-page .drop.over {
  background: var(--brand-light);
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(var(--brand-light-rgb), .82);
  transform: translateY(-1px);
}

.public-page .drop:focus-within {
  background: var(--brand-light);
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(var(--brand-light-rgb), .82);
}

.public-page .drop input[type="file"] {
  position: absolute;
  display: block;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  opacity: 0;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.drop-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: var(--brand);
  background: #fff;
  border: 1px solid #dbe3ec;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(15,23,42,.05);
}

.drop-icon svg { width: 25px; height: 25px; }
.drop-copy { min-width: 0; display: flex; flex-direction: column; }
.public-page .drop .t { color: #243247; font-size: .78rem; font-weight: 800; }
.public-page .drop .s { margin-top: 3px; color: var(--text-muted); font-size: .67rem; }

.drop-badge {
  padding: 5px 9px;
  color: #526174;
  background: #fff;
  border: 1px solid #dbe3ec;
  border-radius: 999px;
  font-size: .6rem;
  font-weight: 700;
  white-space: nowrap;
}

.public-page .preview {
  overflow: hidden;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 16px;
}

.public-page .preview img { border: 0; border-radius: 11px; }
.public-page .preview .rm { top: 18px; left: 18px; width: 34px; height: 34px; border: 2px solid rgba(255,255,255,.85); border-radius: 10px; }

.public-page textarea {
  min-height: 105px;
  padding: 13px 15px;
  border-color: #dbe3ec;
  border-radius: 12px;
  font-size: .84rem;
}

.form-submit-area {
  margin: 8px -32px -32px;
  padding: 22px 32px 25px;
  background: linear-gradient(180deg, #fbfdfd 0%, #f8fafc 100%);
  border-top: 1px solid var(--border);
}

.public-page .submit-btn {
  min-height: 55px;
  padding: 13px 18px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  border-radius: 13px;
  box-shadow: 0 3px 8px rgba(var(--accent-rgb), .18), 0 14px 28px rgba(var(--accent-rgb), .24);
  font-size: .9rem;
  font-weight: 900;
}

.public-page .submit-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--accent-dark) 0%, #701027 100%);
  box-shadow: 0 5px 12px rgba(var(--accent-rgb), .22), 0 18px 32px rgba(var(--accent-rgb), .28);
}

.submit-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  margin-inline-start: auto;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
}

.submit-icon svg { width: 16px; height: 16px; }
.submit-btn:disabled .submit-icon { opacity: .25; }

.public-page .secure-note {
  margin-top: 12px;
  color: #718096;
  font-size: .67rem;
}

.public-page .secure-note svg { width: 15px; height: 15px; color: var(--brand); }
.public-page .btn:focus-visible { outline: 3px solid rgba(var(--brand-rgb), .22); outline-offset: 3px; }
.public-page .spin { display: inline-block; vertical-align: middle; }

.public-form-card.is-complete .public-form-head,
.public-form-card.is-complete .msg { display: none !important; }

.public-page .done { min-height: 620px; padding: 110px 32px 70px; }
.public-page .done:focus { outline: none; }

.public-page .done .tick {
  width: 82px;
  height: 82px;
  margin-bottom: 22px;
  color: #fff;
  background: linear-gradient(145deg, var(--brand), var(--brand-dark));
  border: 8px solid var(--brand-light);
  box-shadow: 0 10px 24px rgba(var(--brand-rgb), .24);
}

.public-page .done .tick svg { width: 38px; height: 38px; }
.done-kicker { display: inline-block; margin-bottom: 8px; color: var(--ok); font-size: .72rem; font-weight: 900; }
.public-page .done h2 { font-size: 1.45rem; font-weight: 900; }
.public-page .done p { max-width: 390px; margin: 8px auto 24px; font-size: .82rem; }
.done-ref-label { display: block; margin-bottom: 7px; color: var(--text-muted); font-size: .65rem; font-weight: 700; }
.public-page .done .ref { margin-bottom: 25px; padding: 11px 28px; border: 1px solid rgba(var(--brand-rgb), .18); border-radius: 12px; }

.public-page .page-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 18px;
  color: #758397;
  font-size: .65rem;
  font-weight: 600;
}

.public-page .page-foot i { width: 4px; height: 4px; background: #b7c2cf; border-radius: 50%; }

@media (max-width: 960px) {
  .public-page .public-shell {
    max-width: 780px;
    grid-template-columns: 1fr;
    gap: 18px;
    padding-top: 20px;
  }

  .public-intro {
    position: relative;
    top: auto;
    min-height: 0;
    height: auto;
    max-height: none;
    padding: 25px;
    border-radius: 24px;
  }

  .public-page .page-head { margin-bottom: 24px; }
  .public-hero-copy { margin-bottom: 22px; }
  .public-hero-copy h2 { font-size: 1.72rem; }
  .public-hero-copy > p { max-width: 560px; }

  .public-benefits {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .public-benefit {
    align-items: flex-start;
    padding: 10px;
    background: rgba(255,255,255,.045);
    border-color: rgba(255,255,255,.07);
  }

  .public-benefit-icon { width: 31px; height: 31px; }
  .public-benefit small { line-height: 1.55; }
  .public-assurance { margin-top: 18px; }
}

@media (max-width: 640px) {
  .public-page .public-shell { gap: 14px; padding: 12px 12px 34px; }

  .public-intro { padding: 20px 18px; border-radius: 22px; }
  .public-page .page-head { margin-bottom: 20px; }
  .public-page .logo-mark { width: 46px; height: 46px; border-radius: 13px; font-size: 20px; }
  .public-page .page-head h1 { font-size: 1.22rem; }
  .public-page .page-head .tagline { font-size: .63rem; }
  .public-eyebrow { margin-bottom: 9px; font-size: .66rem; }
  .public-hero-copy h2 { font-size: 1.45rem; line-height: 1.45; }
  .public-hero-copy > p { margin-top: 10px; font-size: .75rem; line-height: 1.75; }
  .public-hero-copy { margin-bottom: 18px; }

  .public-benefit {
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
  }

  .public-benefit strong { font-size: .66rem; }
  .public-benefit small { display: none; }
  .public-assurance { padding: 11px; }

  .public-page .public-form-card { border-radius: 22px; }
  .public-form-head { padding: 21px 19px 19px; }
  .public-form-head h2 { font-size: 1.22rem; }
  .public-form-head p { font-size: .7rem; }
  .form-section-count { width: 66px; height: 56px; }
  .form-section-count small { font-size: .52rem; }

  .public-page .msg { margin: 16px 18px 0; }
  .public-page #depositForm { padding: 0 18px 18px; }
  .form-section { padding-top: 24px; }
  .form-section-head { margin-bottom: 19px; }
  .form-section-icon { width: 37px; height: 37px; }
  .form-section-head h3 { font-size: .86rem; }
  .form-section-head p { font-size: .64rem; }

  .public-page .drop {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 11px;
    padding: 14px;
  }

  .drop-icon { width: 48px; height: 48px; }
  .drop-badge { grid-column: 1 / -1; justify-self: stretch; text-align: center; }
  .form-submit-area { margin: 6px -18px -18px; padding: 19px 18px 22px; }
  .public-page .done { min-height: 520px; padding: 80px 20px 55px; }
}

@media (max-width: 420px) {
  .public-page .public-shell { padding-inline: 9px; }
  .public-intro { padding-inline: 16px; }
  .public-assurance { display: none; }
  .form-section-count { display: none; }
  .public-form-head { display: block; }
  .public-page .input-shell > input { font-size: .82rem; }
  .public-page .bank-picker { padding: 12px; }
  .public-page .page-foot span:last-child,
  .public-page .page-foot i { display: none; }
}

/* ---------- الطباعة ---------- */
@media print {
  .topbar, .tabs, .filters, .row-actions, .btn { display: none !important; }
  body { background: #fff; }
  .data-table-card { box-shadow: none; border: none; }
  .table-scroll { max-height: none; overflow: visible; }
}

/* ---------- زرار تبديل اللغة (بوابة العملاء) ---------- */
.lang-toggle-fixed {
  position: fixed;
  top: 14px;
  inset-inline-end: 14px;
  z-index: 50;
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.4);
  color: #fff;
  backdrop-filter: blur(4px);
}
.lang-toggle-fixed:hover { background: rgba(255,255,255,.24); }

/* ---------- زرار تثبيت التطبيق الثابت (بوابة العملاء) — نفس مكان زرار اللغة بس في الجهة التانية ---------- */
.install-btn-fixed {
  position: fixed;
  top: 14px;
  inset-inline-start: 14px;
  z-index: 50;
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.4);
  color: #fff;
  backdrop-filter: blur(4px);
}
.install-btn-fixed:hover { background: rgba(255,255,255,.24); }

/* ---------- تعديلات اتجاه الصفحة عند التبديل للإنجليزي (LTR) — بوابة العملاء ---------- */
html[dir="ltr"] .public-page input[type="tel"],
html[dir="ltr"] .public-page input[type="number"] { text-align: left; }

html[dir="ltr"] .input-shell .input-icon { right: auto; left: 14px; }
html[dir="ltr"] .public-page .input-shell > input { padding: 11px 14px 11px 46px; }

html[dir="ltr"] .input-unit { left: auto; right: 13px; }
html[dir="ltr"] .public-page .amount-shell > input { padding-left: 14px; padding-right: 50px; }
html[dir="ltr"] .public-page .input-shell-date > input { padding-right: 14px; padding-left: 14px; text-align: left; }

html[dir="ltr"] .bank-opt-name { text-align: left; }
