/* ══════════════════════════════════════════════════════════════════════
   fs-closing.css — (2026-12-02) الإقفال والمعالجات: فترات الإقفال ، إقفال السنة المالية ، المعالجات
   ▸ مبنى فوق fs-voucher.css (.fsv): الرأس والكروت والخانات والأزرار من هناك ، وده الزيادة بس (.fcl)
   ▸ كل الألوان من متغيرات الثيم (--fs-primary / --fs-strong / --fs-action / --fs-calm-*) علشان البرتقالى يشتغل
   ▸ :not(#_) و !important علشان قواعد mobile-ui-pack.css على كل button (نفس fs-voucher.css)
   ══════════════════════════════════════════════════════════════════════ */

html body .fcl .fcl-count { font-size: 13px; color: var(--v-mute); white-space: nowrap; }
html body .fcl .fcl-count b { color: var(--fs-ink-strong, var(--fs-strong)); font-size: 16px; }
html body .fcl .fcl-xls:not(#_), html body .fcl .fcl-btn:not(#_) { display: inline-flex; align-items: center; gap: 6px; height: 38px !important; min-height: 0 !important; margin: 0; padding: 0 12px !important; border: 1px solid var(--fs-calm-bd, #9CC6D1) !important; border-radius: 10px !important; background: #fff !important; color: var(--fs-primary) !important; font-family: inherit; font-size: 13.5px !important; font-weight: 700; cursor: pointer; box-shadow: none !important; }
html body .fcl .fcl-xls i, html body .fcl .fcl-btn i { font-size: 18px; }
html body .fcl .fcl-btn.fcl-btn-act:not(#_) { background: var(--fs-action, #D97726) !important; border-color: var(--fs-action, #D97726) !important; color: #fff !important; }
html body .fcl button:disabled { opacity: .55; cursor: default; }

/* المحرر */
html body .fcl .fcl-ed { padding: 14px; gap: 12px; }
html body .fcl .fcl-ed-hd { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--fs-ink-strong, var(--fs-strong)); }
html body .fcl .fcl-ed-hd i { color: var(--fs-primary); font-size: 18px; }
html body .fcl .fcl-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
html body .fcl .fcl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
html body .fcl .fcl-chip:not(#_) { display: inline-flex; align-items: center; gap: 5px; height: 32px !important; min-height: 0 !important; margin: 0; padding: 0 11px !important; border: 1px solid var(--v-line) !important; border-radius: 16px !important; background: #fff !important; color: var(--v-ink2) !important; font-family: inherit; font-size: 13px !important; font-weight: 700; cursor: pointer; box-shadow: none !important; }
html body .fcl .fcl-chip i { font-size: 14px; }
html body .fcl .fcl-chip.on:not(#_) { background: var(--fs-tint-2, #EEF7F9) !important; border-color: var(--fs-calm-bd, #8CC7D3) !important; color: var(--fs-ink-strong, var(--fs-strong)) !important; }
html body .fcl .fcl-chip.on i { color: var(--fs-primary); }
html body .fcl span.fcl-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: 16px; background: var(--fs-tint-2, #EEF7F9); color: var(--fs-ink-strong, var(--fs-strong)); font-size: 13px; font-weight: 700; }
html body .fcl span.fcl-chip i { cursor: pointer; color: var(--v-bad); }
html body .fcl .fcl-tgs { gap: 8px; }
html body .fcl .fcl-tg { display: flex; align-items: center; gap: 8px; min-height: 40px; margin: 0; padding: 0 10px; border: 1px solid var(--v-line); border-radius: 10px; background: var(--v-field); font-size: 13.5px; font-weight: 700; color: var(--v-ink); cursor: pointer; }
html body .fcl .fcl-tg span { color: var(--v-ink) !important; }   /* قاعدة عامة بتلوّن label span بالأحمر (فخ معروف) */
html body .fcl .fcl-tg input {width: 18px; height: 18px; margin: 0; accent-color: var(--fs-primary); flex: none; }
html body .fcl .fcl-tg:has(input:checked) { border-color: var(--fs-calm-bd, #8CC7D3); background: var(--fs-tint-1, #F2F9FA); }
html body .fcl .fcl-warn { margin: 0; display: flex; align-items: flex-start; gap: 7px; padding: 8px 10px; border: 1px solid #F5C77A; border-radius: 10px; background: #FFF6E5; color: #7A4A05; font-size: 13px; font-weight: 700; line-height: 1.5; }
html body .fcl .fcl-warn i { font-size: 17px; flex: none; margin-top: 1px; }
html body .fcl .fcl-warn-top { margin-bottom: 8px; }
html body .fcl .fcl-acts { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }   /* الحفظ + جديد + حذف فى سطر واحد (من غير سكرول على 768) */
html body .fcl .fcl-acts .fcl-wide { grid-column: 1 / -1; }
html body .fcl .fcl-acts .fsv-tile:not(#_) { width: 76px; height: 52px !important; flex-direction: column; gap: 2px; font-size: 12.5px !important; }
html body .fcl .fcl-acts .fcl-wide:not(#_) { width: 100%; flex-direction: row; gap: 8px; font-size: 14px !important; }
html body .fcl .fcl-acts .fcl-del:not(#_) { color: var(--v-bad) !important; }

/* القايمة والجدول */
html body .fcl .fcl-list { padding: 0; overflow: hidden; display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; gap: 0; }
html body .fcl .fcl-list-hd { padding: 10px 12px; border-bottom: 1px solid var(--v-line); }
html body .fcl .fcl-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
html body .fcl .fcl-h { display: inline-flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 800; color: var(--fs-ink-strong, var(--fs-strong)); }
html body .fcl .fcl-h i { color: var(--fs-primary); font-size: 18px; }
html body .fcl .fcl-search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid var(--v-line); border-radius: 10px; background: var(--v-field); color: var(--v-mute); }
html body .fcl .fcl-search:focus-within { border-color: var(--fs-primary); background: #fff; }
html body .fcl .fcl-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: inherit; font-size: 15px; color: var(--v-ink); }
html body .fcl .fcl-tbl-wrap { flex: 1 1 auto; min-height: 120px; max-height: calc(100dvh - 300px); overflow: auto; }
html body .fcl .fcl-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
html body .fcl .fcl-tbl thead th { position: sticky; top: 0; z-index: 1; background: var(--fs-calm-bg, #DDEFF3); color: var(--fs-ink-strong, var(--fs-strong)); border-bottom: 2px solid var(--fs-strong, #004F63); padding: 9px 8px; text-align: start; font-weight: 800; white-space: nowrap; }
html body .fcl .fcl-tbl td { padding: 8px; border-bottom: 1px solid #EEF2F3; }
html body .fcl .fcl-tbl tbody tr { cursor: pointer; }
html body .fcl .fcl-tbl tbody tr:nth-child(even) { background: var(--fs-tint-1, #F7FBFC); }
html body .fcl .fcl-tbl tbody tr:hover { background: var(--fs-tint-2, #EEF7F9); }
html body .fcl .fcl-tbl tbody tr.is-cur { background: var(--fs-tint-2, #EEF7F9); box-shadow: inset -3px 0 0 var(--fs-primary); }
html body .fcl .fcl-tbl tbody tr.is-off td { color: var(--v-mute); }
html body .fcl .fcl-tbl tfoot td { position: sticky; bottom: 0; background: var(--fs-calm-bg, #DDEFF3); font-weight: 800; padding: 9px 8px; border-top: 2px solid var(--fs-strong, #004F63); }
html body .fcl .fcl-tbl .c-name { font-weight: 800; }
html body .fcl .fcl-tbl .c-dt { width: 110px; color: var(--v-ink2); }
html body .fcl .fcl-tbl .c-amt { width: 140px; font-weight: 800; text-align: end; }
html body .fcl .fcl-tbl .c-by { color: var(--v-ink2); font-size: 13px; }
html body .fcl .fcl-lk { display: inline-block; margin: 1px 0 1px 4px; padding: 1px 8px; border-radius: 10px; background: var(--fs-tint-2, #EEF7F9); color: var(--fs-ink-strong, var(--fs-strong)); font-size: 12px; font-weight: 700; }
html body .fcl .fcl-empty { margin: 18px 0; text-align: center; color: var(--v-mute); font-size: 14px; }
html body .fcl .fcl-mute { color: var(--v-mute); font-size: 12.5px; font-weight: 500; }
html body .fcl .fcl-pos { color: var(--v-ok); }
html body .fcl .fcl-neg { color: var(--v-bad); }
html body .fcl .fcl-st { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 12px; font-size: 12px; font-weight: 800; white-space: nowrap; }
html body .fcl .fcl-ok { background: var(--v-ok-t); color: var(--v-ok); }
html body .fcl .fcl-bad { background: var(--v-bad-t); color: var(--v-bad); }
html body .fcl small.fcl-bad { background: transparent; }
html body .fcl .fcl-muted { background: #EEF2F3; color: var(--v-mute); }
html body .fcl .fcl-hint { margin: 0; padding: 18px; display: flex; align-items: center; gap: 10px; color: var(--v-ink2); font-size: 14px; line-height: 1.7; }
html body .fcl .fcl-hint i { font-size: 22px; color: var(--fs-primary); flex: none; }
html body .fcl .fcl-foot { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--v-line); }
html body .fcl .fcl-go:not(#_) { width: auto; min-width: 230px; height: 46px !important; }
html body .fcl .fcl-link { display: inline-flex; align-items: center; gap: 5px; color: var(--fs-primary); font-weight: 700; text-decoration: none; }

/* خطوات إقفال السنة */
html body .fcl .fcl-steps { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
html body .fcl .fcl-steps li { flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 8px; height: 38px; border-radius: 10px; background: #fff; border: 1px solid var(--v-line); color: var(--v-mute); font-size: 14px; font-weight: 700; }
html body .fcl .fcl-steps li b { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #EEF2F3; font-size: 13px; }
html body .fcl .fcl-steps li.cur { background: var(--fs-primary); border-color: var(--fs-primary); color: #fff; }
html body .fcl .fcl-steps li.cur b { background: rgba(255, 255, 255, .22); }
html body .fcl .fcl-steps li.dn { background: var(--v-ok-t); border-color: transparent; color: var(--v-ok); }
@media (min-width: 769px) {   /* إقفال السنة: الإعداد كله يدخل فى 768 من غير سكرول */
    html body .sr-pg.fcy { gap: 10px; }
    html body .fcy .fcl-steps li { height: 34px; }
    html body .fcy .fcy-setup { gap: 9px; padding: 12px 14px; }
    html body .fcy .fcy-setup .fsv-in, html body .fcy .fcy-setup .fsv-pick { height: 40px; }
    html body .fcy .fcy-setup .fsv-dx.dxbl-text-edit, html body .fcy .fcy-setup .fsv-dx .dxbl-text-edit { height: 40px !important; min-height: 40px !important; }
    html body .fcy .fcy-setup .fsv-f { gap: 4px; }
    html body .fcy .fcy-setup .fsv-primary:not(#_) { height: 46px !important; }
    html body .fcy .fcy-pv .fcl-tbl-wrap { max-height: calc(100dvh - 510px); }
    html body .fcy .fcy-st { padding: 10px 12px; gap: 8px; }
    html body .fcy .fcy-st-list { gap: 6px; }
    html body .fcy .fcy-st-it:not(#_) { height: 32px !important; padding: 0 10px !important; font-size: 13px !important; }   /* سطور الفروع بتسكرول جوه الجدول وكارت حالة السنة يفضل باين */
}
html body .fcy .fcl-exp { margin-inline-end: 6px; color: var(--fs-primary); font-size: 15px; }
html body .fcy .fcy-line td { background: #fff; font-size: 13px; font-weight: 500; color: var(--v-ink2); padding-inline-start: 28px; cursor: default; }
html body .fcy .fcy-st { padding: 12px 14px; gap: 10px; }
html body .fcy .fcy-st-list { display: flex; flex-wrap: wrap; gap: 8px; }
html body .fcy .fcy-st-q { width: 220px; height: 34px; }   /* بحث حالة السنة (أكتر من 6 فروع) */
html body .fcy .fcy-st-q input { font-size: 13.5px; }
@media (min-width: 769px) { html body .fcy .fcy-st-list { max-height: 80px; overflow-y: auto; } }   /* سطرين بس والباقى بيسكرول جوه الكارت (50 فرع) */
@media (max-width: 768px) { html body .fcy .fcy-st-q { width: 100%; } html body .fcy .fcy-st-list { max-height: 240px; overflow-y: auto; } }
html body .fcy .fcy-st-it:not(#_) { display: inline-flex; align-items: center; gap: 7px; height: 38px !important; min-height: 0 !important; margin: 0; padding: 0 12px !important; border: 1px solid var(--v-line) !important; border-radius: 10px !important; background: #fff !important; color: var(--v-ink) !important; font-family: inherit; font-size: 13.5px !important; font-weight: 700; cursor: pointer; box-shadow: none !important; }
html body .fcy .fcy-st-it i { font-size: 17px; color: var(--v-ok); }
html body .fcy .fcy-st-it small { font-size: 12px; color: var(--v-mute); font-weight: 500; }
html body .fcy .fcy-st-it.is-closed:not(#_) { background: var(--v-bad-t) !important; border-color: #F3B8AE !important; }
html body .fcy .fcy-st-it.is-closed i { color: var(--v-bad); }
html body .fcy .fcy-st-it.is-dirty:not(#_) { box-shadow: 0 0 0 2px var(--fs-action, #D97726) !important; }

/* المعالجات */
html body .fct .fcl-banner { align-items: center; }
html body .fct .fct-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
html body .fct .fct-card:not(#_) { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; height: auto !important; min-height: 112px !important; margin: 0; padding: 14px !important; border: 1px solid var(--v-line) !important; border-radius: 14px !important; background: #fff !important; color: var(--v-ink) !important; font-family: inherit; text-align: start; cursor: pointer; box-shadow: none !important; }
html body .fct .fct-card b { font-size: 15px !important; font-weight: 800; }
html body .fct .fct-card small { font-size: 12.5px !important; color: var(--v-mute); line-height: 1.5; }
html body .fct .fct-card .fct-ic { font-size: 26px; color: var(--fs-primary); }
html body .fct .fct-card.on:not(#_) { border: 2px solid var(--fs-primary) !important; background: var(--fs-tint-1, #F2F9FA) !important; }
html body .fct .fct-panel { gap: 12px; }
html body .fct .fct-inputs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: end; }
html body .fct .fct-item { display: flex; align-items: center; gap: 8px; }
html body .fct .fct-item .fsv-in { flex: 1 1 auto; min-width: 0; }
html body .fct .fct-kpis { grid-column: span 2; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
html body .fct .fct-kpi { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--v-field); border: 1px solid var(--v-line); }
html body .fct .fct-kpi span { font-size: 12px; color: var(--v-mute); }
html body .fct .fct-kpi b { font-size: 18px; font-weight: 800; color: var(--fs-action, #D97726); }
html body .fct .fct-acts { grid-template-columns: 220px 260px; justify-content: start; }
html body .fct .fct-acts .fsv-primary, html body .fct .fct-acts .fcl-wide { grid-column: auto; }
html body .fct .fct-acts .fsv-primary:not(#_) { height: 44px !important; }
html body .fct .fcl-tbl-wrap { max-height: calc(100dvh - 430px); }
@media (min-width: 769px) { html body .fct .fcl-tbl-wrap { max-height: max(200px, calc(100dvh - 570px)); } }   /* نتيجة الفحص بتسكرول جوه الجدول (من غير سكرول للصفحة على 768) */

/* كروت الجوال */
html body .fcl .fcl-cards { display: none; }

@media (max-width: 768px) {
    html body .fcl .fcl-ed, html body .fcy .fcy-setup { order: 1; }
    html body .fcl .fcl-list { order: 2; }
    html body .fcy .fcy-st { order: 3; }
    html body .fcl .fcl-cards { display: flex !important; flex-direction: column; gap: 6px; padding: 8px 10px; }
    html body .fcl .fcl-card:not(#_) { width: 100%; min-height: 56px !important; height: auto !important; margin: 0; padding: 8px 10px !important; display: flex; align-items: center; gap: 10px; border: 1px solid #EEF2F3 !important; border-radius: 12px !important; background: #fff !important; text-align: start; font-family: inherit; box-shadow: none !important; color: var(--v-ink) !important; }
    html body .fcl .fcl-card.is-cur:not(#_) { border-color: var(--fs-primary) !important; background: var(--fs-tint-1, #F2F9FA) !important; }
    html body .fcl .fcl-card-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
    html body .fcl .fcl-card-t b { font-size: 14.5px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    html body .fcl .fcl-card-t small { font-size: 12px; color: var(--v-mute); }
    html body .fcl .fcl-card-b { flex: none; font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 10px; background: var(--fs-tint-2, #EEF7F9); color: var(--fs-ink-strong, var(--fs-strong)); }
    html body .fcl .fcl-card-a { flex: none; display: flex; flex-direction: column; align-items: flex-end; font-size: 15px; font-weight: 800; }
    html body .fcl .fcl-card-a small { font-size: 11.5px; font-weight: 700; color: var(--v-mute); }
    html body .fcl .fcl-acts { grid-template-columns: minmax(0, 1fr) auto auto; }   /* الحفظ وجديد وحذف فى سطر واحد (أقل سكرول) */
    html body .fcl .fcl-acts .fsv-primary { grid-column: auto; }
    html body .fcl .fcl-acts .fcl-wide { grid-column: 1 / -1; }
    html body .fcl .fcl-acts .fsv-primary:not(#_) { height: 50px !important; font-size: 16px !important; }
    html body .fcl .fcl-acts .fsv-tile:not(#_) { width: 72px; height: 50px !important; flex-direction: column; gap: 2px; font-size: 12.5px !important; }
    html body .fcl .fcl-acts .fcl-wide:not(#_) { width: 100%; flex-direction: row; }
    html body .fcl .fcl-steps li { height: 34px; font-size: 12.5px; gap: 5px; }
    html body .fcl .fcl-steps li b { width: 20px; height: 20px; font-size: 12px; }
    html body .fcy .fcy-pv .fcl-tbl-wrap { max-height: none; overflow-x: auto; }
    html body .fcy .fcy-tbl { font-size: 12.5px; min-width: 560px; }
    html body .fcl .fcl-foot { flex-wrap: wrap; }
    html body .fcl .fcl-go:not(#_) { width: 100%; min-width: 0; }
    html body .fct .fct-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    html body .fct .fct-card:not(#_) { min-height: 96px !important; padding: 10px !important; }
    html body .fct .fct-card small { display: none; }
    html body .fct .fct-card small.fcl-bad { display: block; }
    html body .fct .fct-inputs { grid-template-columns: minmax(0, 1fr); }
    html body .fct .fct-kpis { grid-column: auto; }
    html body .fct .fct-acts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    html body .fct .fct-acts .fsv-primary:not(#_) { width: 100%; height: 50px !important; font-size: 15px !important; }
    html body .fct .fct-acts .fcl-wide:not(#_) { grid-column: auto; width: 100%; height: 50px !important; }
}
