/* إدارة المستودعات — أنماط إضافية لمجموعة الشاشات (f). الأصل iv-* في inventory.css و rc-* في record-page.css */

/* نصوص حالة صغيرة */
.if-bad { color: var(--iv-bad, #b91c1c) !important; }
.if-warn { color: var(--iv-warn, #b45309) !important; }
.if-sub { display: block; color: #64748b; font-size: .74rem; }
.if-note { margin: 0 0 .7rem; color: #64748b; font-size: .82rem; line-height: 1.7; }
.if-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.if-off td { color: #94a3b8; text-decoration: line-through; text-decoration-color: #cbd5e1; }
.if-dir { width: 22px; height: 22px; font-size: .75rem; }

/* مربع اختيار داخل شريط الفلاتر */
.if-check { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 700; color: #334155; cursor: pointer; white-space: nowrap; }
.if-check input { width: 16px; height: 16px; accent-color: var(--iv-acc, #047857); }

/* حقول التاريخ في شريط الفلاتر */
.if-date { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 700; color: #64748b; }
.if-date input { height: 38px; border: 1px solid #cbd5e1; border-radius: 10px; padding: 0 8px; font: inherit; font-size: .86rem; color: var(--iv-ink, #0f172a); background: #fff; }

/* صف الإجمالي */
.iv-tbl tfoot td, .rc-tbl tfoot td { background: #f8fafc; border-top: 2px solid #e5e7eb; font-weight: 800; font-variant-numeric: tabular-nums; }
.iv-tbl tfoot td { padding: 10px 12px; }
@media (max-width: 760px) {
    .iv-tbl.iv-cards tfoot tr { display: flex; justify-content: space-between; padding: 8px 12px; }
    .iv-tbl.iv-cards tfoot td { display: block; border: 0; padding: 0; background: none; }
    .iv-tbl.iv-cards tfoot td:empty { display: none; }
}

/* بطاقات مؤشر قابلة للنقر (فلترة بالنوع) */
button.iv-kpi { font: inherit; text-align: start; cursor: pointer; }
.if-kpi:hover { border-color: #a7f3d0; }
.if-kpi.on { border-color: var(--iv-acc, #047857); box-shadow: inset 0 0 0 1px var(--iv-acc, #047857); }
.if-kpi > span i { color: var(--iv-acc, #047857); }

/* بطاقات المستودعات كأزرار فلترة */
.if-wh { font: inherit; text-align: start; cursor: pointer; }
.if-wh.on { border-color: var(--iv-acc, #047857); box-shadow: inset 0 0 0 1px var(--iv-acc, #047857); }

/* سبب منع الترحيل */
.if-issue { display: inline-flex; gap: 5px; align-items: flex-start; font-size: .76rem; font-weight: 700; line-height: 1.5; max-width: 260px; }
.if-warnbox { display: flex; gap: 8px; align-items: flex-start; padding: 9px 11px; margin-bottom: 8px; border-radius: 10px; background: var(--iv-warns, #fffbeb); border: 1px solid #fde68a; color: var(--iv-warn, #b45309); font-size: .8rem; font-weight: 700; line-height: 1.6; }
.if-rules small { line-height: 1.6; }
.iv-list li > .bi { color: #94a3b8; }

/* أزرار قرار داخل البطاقة الجانبية */
.if-acts { display: flex; flex-direction: column; gap: 6px; }
.if-acts .iv-btn { width: 100%; }
.if-acts small { color: #64748b; font-size: .74rem; margin-bottom: 4px; }

/* حقول عمود واحد داخل البطاقة الجانبية */
.if-one { grid-template-columns: 1fr !important; }

/* خيارات الطريقة الافتراضية */
.if-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.if-opt { display: flex; gap: 10px; align-items: flex-start; text-align: start; padding: 12px 14px; border-radius: 12px; border: 1px solid #e5e7eb; background: #fff; font: inherit; cursor: pointer; color: #0f172a; }
.if-opt i { font-size: 1.1rem; color: #94a3b8; margin-top: 2px; }
.if-opt b { display: block; font-size: .92rem; }
.if-opt small { display: block; color: #64748b; font-size: .78rem; }
.if-opt.on { border-color: var(--iv-acc, #047857); background: var(--iv-accs, #ecfdf5); }
.if-opt.on i { color: var(--iv-acc, #047857); }
.if-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.if-sel { min-width: 190px; height: 36px; padding-block: 0; }
.if-end { white-space: nowrap; text-align: end; }
.if-end .iv-btn + .iv-btn { margin-inline-start: 4px; }
.if-ul { margin: 0 0 .5rem; padding-inline-start: 1.1rem; color: #334155; font-size: .84rem; line-height: 1.8; }

/* فلاتر داخل بطاقة */
.if-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.if-filters .iv-search { flex: 1 1 220px; }

/* الخط الزمني لتاريخ الرقم التسلسلي */
.if-tl { list-style: none; margin: 0; padding: 0; position: relative; }
.if-tl::before { content: ""; position: absolute; inset-block: 6px; inset-inline-start: 14px; width: 2px; background: #e5e7eb; }
.if-tl__i { position: relative; display: flex; gap: 12px; padding: 8px 0; }
.if-tl__dot { position: relative; z-index: 1; width: 30px; height: 30px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .85rem; background: #eff6ff; color: #1d4ed8; border: 2px solid #fff; }
.if-tl--in .if-tl__dot { background: #ecfdf5; color: #065f46; }
.if-tl--out .if-tl__dot { background: #fef2f2; color: #b91c1c; }
.if-tl__i b { font-size: .9rem; }
.if-tl__i small { color: #334155; font-size: .8rem; }
.if-tl__m { color: #64748b; font-size: .76rem; margin-top: 2px; }
.if-tl__n { margin-top: 4px; padding: 6px 9px; border-radius: 8px; background: #f8fafc; font-size: .8rem; color: #334155; }
