/* ═══════════════════════════════════════════════════════════════════
   forms-unified.css — شكلٌ واحدٌ لخانات الإدخال في كلِّ الشاشات
   ═══════════════════════════════════════════════════════════════════
   طلب المالك (١٩-١١-٢٠٢٦): «اصلح حجم الحقول والمربعات للإدخال، تناسق جميع
   الشاشات والجوالات». تصميمُ الخانة موجودٌ في design-system.css لكنّه لا
   يسري إلّا على ما يحمل `.form-control` أو `.field` — والشاشاتُ القديمة
   تكتب `<input>` عارياً، فلكلٍّ ارتفاعٌ وحشوٌ وحدٌّ غيرُ الآخر.

   ═══ حكمان ═══
   · **الأساسُ بأدنى أولويّة** (`:where` = خصوصيّةٌ صفر): يملأ ما لم تقلْه
     الشاشة، وما كتبته شاشةٌ عن قصدٍ يغلب — فلا تنكسر شاشةٌ لها تصميمُها
     (نقطةُ البيع، الجرد، المسوّدات).
   · **على الجوال حدّان مفروضان** — ارتفاعٌ أدنى ٤٤ (يُلمس بالإصبع) وخطُّ ١٦
     (لا يُكبّر آيفون الشاشةَ عند اللمس). ولا يُمسّ ما داخل الجداول (خاناتُ
     الأصناف المضغوطة عن قصد)، ولا جهازُ نقطة البيع.
   ═══════════════════════════════════════════════════════════════════ */

/* ٢٤-١١-٢٠٢٦: كان المحدِّدُ مكسوراً على ثلاثة أسطر — والمسافةُ بين `:not(...)` و`:not(...)` في CSS «داخل»
   لا «و»، فلم يطابق أيَّ <input> منذ ١٩-١١ وبقيت خاناتُ النصّ والتاريخ بشكل المتصفّح. الآن سطرٌ واحد. */
/* الخاناتُ المقصودة: نصٌّ وأرقامٌ وتواريخُ وقوائم — لا مربّعاتُ الاختيار ولا الملفّاتُ ولا الألوان */
:where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]):not([type="range"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="image"]),
       select, textarea) {
  box-sizing: border-box;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background-color: #fff;
  color: #0f172a;
  font-family: inherit;
  font-size: .9rem;
  line-height: 1.4;
  max-width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}
:where(textarea) { min-height: 84px; resize: vertical; }
/* خاناتُ الجداول مضغوطةٌ عن قصد (أصنافُ الفاتورة، الجرد) — لا يُفرض عليها ارتفاع */
:where(td, th) :where(input, select) { min-height: 0; padding: 5px 8px; }
:where(select) { padding-inline-end: 30px; }
:where(input, select, textarea):where(:hover:not(:focus):not(:disabled)) { border-color: #94a3b8; }
:where(input, select, textarea):where(:focus) {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}
:where(input, select, textarea):where(:disabled, [readonly]) { background-color: #f1f5f9; color: #64748b; }
:where(input, textarea)::placeholder { color: #94a3b8; }

/* خانةُ الملف: كانت بشكل المتصفّح الخام («اختيار الملف · لم يتم اختيار ملف») في كلِّ شاشة */
:where(input[type="file"]) {
  box-sizing: border-box; max-width: 100%;
  padding: 6px; border: 1.5px dashed #cbd5e1; border-radius: 10px;
  background-color: #fafcff; color: #64748b; font-family: inherit; font-size: .82rem; cursor: pointer;
}
:where(input[type="file"])::file-selector-button {
  border: 0; border-radius: 8px; background: #e0e7ff; color: #3730a3;
  padding: 8px 14px; margin-inline-end: 10px; font-family: inherit; font-weight: 700; font-size: .82rem; cursor: pointer;
}
:where(input[type="file"]):where(:hover)::file-selector-button { background: #c7d2fe; }

/* ═══ الجوال ═══ */
@media screen and (max-width: 992px) {
  html:not(.dv-pos) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]):not([type="range"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="image"]),
                        select):not(td *):not(th *) {
    min-height: 44px !important;
    font-size: 16px !important;
  }
  html:not(.dv-pos) textarea:not(td *) { font-size: 16px !important; }
  /* الخانةُ والزرُّ في صفٍّ واحد بارتفاعٍ واحد */
  html:not(.dv-pos) :is(form, .row, .filter-form, .rpt-toolbar) > :is(button, .btn):not(td *) { min-height: 44px; }
}
