/* قوائم الاختيار بالبحث وتصفية القوائم (public/picker.js) */
.sp { position:relative; display:inline-block; max-width:100%; vertical-align:middle; }
.sp-native { position:absolute !important; inset:0 !important; width:100% !important; height:100% !important; opacity:0 !important; pointer-events:none !important; margin:0 !important; }
.sp-btn { display:inline-flex; align-items:center; gap:8px; width:100%; min-width:9em; max-width:100%; min-height:38px; text-align:right; cursor:pointer;
  border:1px solid #e2dcd2; border-radius:12px; padding:8px 12px; background:#fff; color:var(--ink, #232846); font:inherit; font-weight:400; line-height:1.4;
  transition:border-color .15s, box-shadow .15s; }
.sp-btn::after { content:''; flex:none; margin-inline-start:auto; width:7px; height:7px; border:solid var(--muted, #7a7f99); border-width:0 2px 2px 0; transform:translateY(-2px) rotate(45deg); }
.sp-lab { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sp-btn.sp-empty .sp-lab { color:var(--muted, #7a7f99); }
.sp-btn:focus-visible, .sp-btn[aria-expanded=true] { outline:none; border-color:var(--accent-2, #3a4aa8); box-shadow:0 0 0 3px rgba(58,74,168,.15); }
.sp-btn.sp-bad { border-color:var(--red, #d6455d); }
.sp-btn:disabled { cursor:not-allowed; background:#f6f4f0; color:var(--muted, #7a7f99); }
.vform .sp, .grid .sp { display:block; width:100%; }
.inline .sp-btn, .inline-form .sp-btn { min-height:30px; padding:4px 8px; font-size:13px; border-radius:8px; min-width:7em; }
table .sp { max-width:340px; }
table .sp-btn { min-width:6em; }

.sp-pop { position:fixed; z-index:1000; background:#fff; border:1px solid var(--line, #ece7df); border-radius:12px; box-shadow:0 12px 28px rgba(39,48,107,.18);
  padding:8px; display:flex; flex-direction:column; gap:6px; font-size:15px; color:var(--ink, #232846); }
.sp-pop[hidden], .sp-back[hidden] { display:none; }
.sp-q { width:100%; box-sizing:border-box; padding:8px 10px; border:1px solid #e2dcd2; border-radius:10px; font:inherit; background:#fff; }
.sp-q:focus { outline:none; border-color:var(--accent-2, #3a4aa8); box-shadow:0 0 0 3px rgba(58,74,168,.15); }
.sp-list { list-style:none; margin:0; padding:0; overflow-y:auto; overscroll-behavior:contain; max-height:340px; }
.sp-opt { padding:8px 10px; border-radius:8px; cursor:pointer; line-height:1.4; }
.sp-opt.sp-in { padding-inline-start:20px; }
.sp-opt:hover { background:#f6f4f0; }
.sp-opt.sp-act { background:var(--accent-soft, #eef0ff); }
.sp-opt[aria-selected=true] { font-weight:700; color:var(--accent, #27306b); }
.sp-opt[aria-selected=true]::before { content:'✓'; display:inline-block; width:1.2em; }
.sp-opt.sp-off { color:#b5b8c8; cursor:default; background:none; }
.sp-opt[hidden], .sp-grp[hidden], .sp-none[hidden] { display:none; }
.sp-grp { padding:6px 10px 2px; font-size:13px; font-weight:700; color:var(--muted, #7a7f99); }
.sp-none { padding:10px; text-align:center; color:var(--muted, #7a7f99); }
.sp-back { position:fixed; inset:0; z-index:999; background:rgba(20,24,50,.25); }
.sp-pop.sp-sheet { font-size:16px; }
.sp-sheet .sp-q { font-size:16px; padding:10px 12px; }   /* 16px حتى لا يكبّر iOS الصفحة */
.sp-sheet .sp-opt { padding:11px 12px; }

/* تصفية الجداول والقوائم الطويلة */
.tf { display:flex; align-items:center; gap:10px; margin:6px 0 10px; }
.tf-q { flex:0 1 340px; min-width:0; padding:8px 12px; border:1px solid #e2dcd2; border-radius:12px; font:inherit; background:#fff; }
.tf-q:focus { outline:none; border-color:var(--accent-2, #3a4aa8); box-shadow:0 0 0 3px rgba(58,74,168,.15); }
@media (max-width:600px) { .tf-q { flex:1; font-size:16px; } }
@media print { .sp-pop, .sp-back, .tf { display:none !important; } .sp-btn { border:0; padding:0; min-height:0; } .sp-btn::after { display:none; } }
