/* ===================== البرامج: زر القائمة الجانبية + شاشة اختيار البرنامج (js/programs.js) ===================== */
.prog-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 14px; cursor: pointer; text-align: start; font: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .03)); border: 1px solid rgba(255, 255, 255, .13); color: #fff; transition: border-color .2s, background .2s, box-shadow .2s; }
.prog-btn:hover, .prog-btn:focus-visible { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(174, 237, 22, .14); outline: none; }
.prog-btn .pb-ico { width: 36px; height: 36px; flex: none; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(150deg, var(--c1), var(--c2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 6px 14px -6px var(--c2); }
.prog-btn .pb-ico i { color: #fff; font-size: 20px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }
.prog-btn .pb-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.prog-btn .pb-t small { font-size: 11px; font-weight: 800; color: var(--lime); letter-spacing: .02em; }
.prog-btn .pb-t b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prog-btn .pb-grid { margin-inline-start: auto; font-size: 20px; color: rgba(255, 255, 255, .55); transition: transform .3s, color .2s; }
.prog-btn:hover .pb-grid { color: var(--lime); transform: rotate(90deg); }
.sidebar.prog-flash nav { animation: pl-nav .45s ease both; }
@keyframes pl-nav { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

.pl { position: fixed; top: 0; bottom: 0; inset-inline-end: 0; inset-inline-start: var(--sidebar-w); z-index: 65; opacity: 0; transition: opacity .2s ease; overflow: hidden; }
.pl.show { opacity: 1; }
.pl-bg { position: absolute; inset: 0; background: rgba(250, 249, 254, .80); backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5); }
.pl-bg i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .45; animation: pl-drift 18s ease-in-out infinite alternate; }
.pl-bg i:nth-child(1) { width: 460px; height: 460px; background: #845EFF; top: -140px; inset-inline-start: -80px; }
.pl-bg i:nth-child(2) { width: 380px; height: 380px; background: #BA2ABA; bottom: -160px; inset-inline-end: 8%; opacity: .28; animation-delay: -6s; }
.pl-bg i:nth-child(3) { width: 300px; height: 300px; background: #AEED16; top: 34%; inset-inline-end: -90px; opacity: .22; animation-delay: -11s; }
@keyframes pl-drift { to { transform: translate(40px, 30px) scale(1.12); } }
.pl-wrap { position: relative; height: 100%; overflow-y: auto; padding: 26px clamp(18px, 3vw, 44px) 18px; display: flex; flex-direction: column; }
.pl-head, .pl-grid, .pl-foot { width: 100%; max-width: 1180px; margin-inline: auto; }
.pl-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; transform: translateY(-8px); transition: transform .3s ease; }
.pl.show .pl-head { transform: none; }
.pl-eye { font-size: 11.5px; font-weight: 800; letter-spacing: .18em; color: var(--violet); }
.pl-title { font-family: var(--display); font-weight: 900; font-size: 34px; line-height: 1.15; margin: 2px 0; color: var(--text); letter-spacing: -.4px; }
.pl-sub { margin: 0; color: var(--text-2); font-size: 14.5px; }
.pl-q { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; width: min(320px, 100%); height: 46px; padding: 0 14px; border-radius: 999px;
  background: var(--surface); border: 1.5px solid var(--line); box-shadow: 0 8px 24px -14px rgba(10, 5, 38, .35); }
.pl-q:focus-within { border-color: var(--violet); }
.pl-q i { color: var(--violet); font-size: 19px; }
.pl-q input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 14.5px; color: var(--text); }
.pl-back { height: 46px; padding: 0 18px; border-radius: 999px; font-size: 14.5px; }
.pl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 6px 8px; margin-top: 16px; align-content: start; flex: 1; }
.pl-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 6px 8px; border-radius: 20px; border: 1px solid transparent;
  background: transparent; cursor: pointer; font: inherit; color: var(--text); animation: pl-pop .5s cubic-bezier(.2, .9, .3, 1.25) both; animation-delay: calc(var(--i) * 40ms);
  transition: background .2s, border-color .2s, box-shadow .2s; }
@keyframes pl-pop { from { opacity: 0; transform: translateY(18px) scale(.86); } to { opacity: 1; transform: none; } }
.pl-tile:hover, .pl-tile.kb, .pl-tile:focus-visible { background: rgba(255, 255, 255, .72); border-color: var(--line); box-shadow: 0 18px 40px -22px rgba(10, 5, 38, .4); outline: none; }
.pl-tile.kb { border-color: var(--violet); }
.pl-ico { position: relative; width: 70px; height: 70px; border-radius: 22px; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(150deg, var(--c1), var(--c2));
  box-shadow: 0 16px 30px -14px var(--c2), inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 -8px 16px rgba(0, 0, 0, .16);
  transition: transform .35s cubic-bezier(.2, .9, .3, 1.3), box-shadow .3s; }
.pl-ico::before { content: ""; position: absolute; width: 56px; height: 56px; border-radius: 50%; background: rgba(255, 255, 255, .16); top: -20px; inset-inline-end: -22px; }
.pl-ico::after { content: ""; position: absolute; width: 38px; height: 38px; border-radius: 50%; border: 7px solid rgba(255, 255, 255, .10); bottom: -22px; inset-inline-start: -16px; }
.pl-ico i { position: relative; z-index: 1; color: #fff; font-size: 36px; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .22)); }
.pl-gloss { position: absolute; inset: 0 0 50% 0; background: linear-gradient(180deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0)); pointer-events: none; }
.pl-tile:hover .pl-ico, .pl-tile.kb .pl-ico { transform: translateY(-5px) scale(1.05) rotate(-3deg); box-shadow: 0 24px 38px -14px var(--c2), inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 -8px 16px rgba(0, 0, 0, .16); }
.pl-tile:active .pl-ico { transform: scale(.96); }
.pl-tile.cur .pl-ico { box-shadow: 0 0 0 4px var(--bg), 0 0 0 7px var(--c1), 0 16px 30px -14px var(--c2), inset 0 1px 0 rgba(255, 255, 255, .5); overflow: visible; }
.pl-tile.cur .pl-ico::before, .pl-tile.cur .pl-ico::after { display: none; }
.pl-cur { position: absolute; top: 8px; inset-inline-end: calc(50% - 44px); width: 16px; height: 16px; border-radius: 50%; background: var(--lime); border: 3px solid var(--bg); box-shadow: 0 0 0 1px rgba(10, 5, 38, .1); z-index: 2; }
.pl-name { font-weight: 800; font-size: 13.5px; text-align: center; line-height: 1.35; max-width: 100%; overflow-wrap: anywhere; }
.pl-meta { font-size: 11.5px; line-height: 1.2; color: var(--text-3); font-weight: 600; }
.pl-tile.soon .pl-ico { filter: saturate(.45); opacity: .82; }
.pl-soon { display: inline-block; padding: 1px 10px; border-radius: 999px; background: var(--pink-50); color: var(--pink); font-weight: 800; }
.pl-empty { grid-column: 1 / -1; text-align: center; color: var(--text-3); padding: 50px 0; font-size: 15px; }
.pl-empty i { display: block; font-size: 34px; margin-bottom: 8px; }
.pl-foot { display: flex; justify-content: center; align-items: center; gap: 22px; margin-top: 10px; padding-top: 6px; color: var(--text-3); font-size: 12px; }
.pl-foot kbd { font-family: inherit; font-size: 11px; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); margin-inline-end: 4px; }
:root[data-theme="dark"] .pl-bg { background: rgba(14, 10, 36, .82); }
:root[data-theme="dark"] .pl-tile:hover, :root[data-theme="dark"] .pl-tile.kb { background: rgba(255, 255, 255, .05); }
@media (max-width: 1024px) { .pl { inset: 0; } }
@media (max-width: 720px) {
  .pl-wrap { padding: 26px 16px 20px; }
  .pl-title { font-size: 32px; }
  .pl-q { order: 3; width: 100%; margin-inline-start: 0; }
  .pl-back { position: absolute; top: 20px; inset-inline-end: 16px; height: 40px; }
  .pl-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 14px 8px; margin-top: 24px; }
  .pl-tile { padding: 12px 4px 10px; border-radius: 18px; }
  .pl-ico { width: 70px; height: 70px; border-radius: 22px; }
  .pl-ico i { font-size: 36px; }
  .pl-cur { inset-inline-end: calc(50% - 44px); top: 6px; }
  .pl-name { font-size: 13px; }
}
@media (pointer: coarse) { .pl-foot { display: none; } }
@media (max-height: 700px) and (min-width: 721px) {
  .pl-wrap { padding-top: 16px; }
  .pl-title { font-size: 28px; }
  .pl-sub { display: none; }
  .pl-q, .pl-back { height: 40px; }
  .pl-grid { margin-top: 10px; gap: 2px 6px; }
  .pl-ico { width: 60px; height: 60px; border-radius: 19px; }
  .pl-ico i { font-size: 30px; }
  .pl-cur { inset-inline-end: calc(50% - 40px); }
}
@media (prefers-reduced-motion: reduce) { .pl-tile, .pl-bg i, .sidebar.prog-flash nav { animation: none; } }
.pl-ext { display: inline-flex; align-items: center; gap: 4px; padding: 1px 10px; border-radius: 999px; background: var(--violet-50); color: var(--violet-d); font-weight: 800; }
:root[data-theme="dark"] .pl-ext { color: #C9B8FF; }
.pl-links { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.pl-links:hover { border-color: var(--violet); color: var(--violet); }

/* ===================== وضوح خطوط القائمة الجانبية ===================== */
.sidebar { font-size: 15px; }
.nav-sec > button, .nav-home a { font-size: 16px; font-weight: 800; color: #fff; }
.nav-sec > button i.ti, .nav-home a i.ti, .ico i.ti { font-size: 21px; }
.nav-item, .nav-group > button { font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, .96); padding: 8px 12px; line-height: 1.5; }
.nav-group > button { font-weight: 700; color: #fff; }
.nav-item:hover, .nav-group > button:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.nav-item.active, .nav-home a.active { font-weight: 800; }
.nav-group > button .chev, .nav-sec > button .chev { color: rgba(255, 255, 255, .7); }
.nav-sec .count { font-size: 12px; line-height: 20px; }
.nav-sec.open > .nav-items { border-inline-start-color: rgba(255, 255, 255, .28); }
.brand .name small { color: #D4CFEE; font-size: 11px; }
.sidebar .search { color: #E3DFF5; border-color: rgba(255, 255, 255, .28); font-size: 14.5px; }
.sidebar .search kbd { color: #E3DFF5; border-color: rgba(255, 255, 255, .35); }
.sidebar .dalel { font-size: 14.5px; font-weight: 700; }
.prog-btn .pb-t small { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prog-btn .pb-t b { font-size: 15.5px; }
.side-foot { color: #D4CFEE; font-size: 13.5px; }
.side-foot .faint-l { color: #BDB7DA; }
.sidebar nav { scrollbar-color: #5A4FA0 transparent; }

/* صف حساب جديد داخل جدول تعريف الحسابات */
tr.acc-new td { background: var(--lime-50); border-block: 2px solid var(--lime); vertical-align: middle; }
tr.acc-new .input, tr.acc-new .select { height: 34px; width: 100%; min-width: 64px; padding-inline: 8px; }
tr.acc-new #nc { min-width: 110px; font-weight: 800; }
tr.acc-new #nn { min-width: 220px; }
tr.acc-new input[type=checkbox] { width: 18px; height: 18px; }

.acc-entry-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 18px; background: var(--lime-50); border-block: 2px solid var(--lime); position: sticky; top: 0; z-index: 4; }
.acc-entry-bar > i { font-size: 22px; color: var(--lime-ink); }
.acc-entry-bar .aeb-btns { margin-inline-start: auto; display: flex; gap: 8px; }
.acc-entry-bar kbd { font-family: inherit; font-size: 11px; padding: 0 6px; border-radius: 5px; border: 1px solid rgba(0, 0, 0, .25); background: rgba(255, 255, 255, .35); margin-inline-start: 4px; }
table.acc-list tr.clickable { cursor: default; }
table.acc-list tr.sel td { background: var(--violet-50); }

/* ===================== معيار الأزرار: الحذف والإلغاء أحمر وأكبر (js/standards.js) ===================== */
.btn.btn-danger { background: #DC2626 !important; border-color: #B91C1C !important; color: #fff !important; font-weight: 800; min-height: 42px; padding-inline: 18px; font-size: 14.5px; box-shadow: 0 6px 14px -8px #DC2626; }
.btn.btn-danger i { color: #fff !important; font-size: 18px; }
.btn.btn-danger:hover, .btn.btn-danger:focus-visible { background: #B91C1C !important; }
.btn.btn-danger.sm { min-height: 36px; padding-inline: 12px; font-size: 13.5px; }
.btn.btn-danger.btn-danger-icon { min-width: 40px; padding-inline: 0; }
.btn.btn-danger kbd { color: #fff; border-color: rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .15); }

/* ===================== جدول الحسابات: أعمدة أوضح ===================== */
table.acc-list td.c-name { min-width: 230px; max-width: 320px; }
table.acc-list th.c-tax, table.acc-list td.c-tax { width: 150px; max-width: 150px; }
table.acc-list td.c-lvl, table.acc-list td.c-tax, table.acc-list td.n, table.acc-list td.num { color: var(--text); font-size: 14px; }
table.acc-list td.c-lvl b { color: var(--text); }
table.acc-list td.acc-act { white-space: nowrap; text-align: end; min-width: 128px; overflow: visible; }
table.acc-list td.acc-act .btn { margin-inline-start: 4px; vertical-align: middle; }
table.acc-list tr.acc-new td.acc-act, table.acc-list tr.acc-edit td.acc-act { display: table-cell; }
table.acc-list tr.acc-edit td { background: var(--lime-50); border-block: 2px solid var(--lime); vertical-align: middle; }
table.acc-list tr.acc-edit .input, table.acc-list tr.acc-edit .select { height: 34px; width: 100%; min-width: 64px; padding-inline: 8px; }
table.acc-list tr.acc-edit #nn { min-width: 220px; }
table.acc-list tr.acc-edit input[type=checkbox] { width: 18px; height: 18px; }

/* رقم الإصدار وتنبيه التحديث (js/updater.js) */
.ver-stamp { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed rgba(255, 255, 255, .18); font-size: 12.5px; color: #D4CFEE; }
.ver-stamp b { color: var(--lime); }
.ver-stamp button { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .3); background: transparent; color: #fff; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.ver-stamp button:hover { border-color: var(--lime); color: var(--lime); }
.upd-bar { position: fixed; top: 0; inset-inline: 0; z-index: 200; display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 10px 16px; background: #F97316; color: #fff; font-weight: 700; box-shadow: 0 6px 20px -8px rgba(0, 0, 0, .5); }
.upd-bar .btn { background: #fff !important; color: #C2410C !important; border-color: #fff !important; font-weight: 800; }
.upd-bar i { font-size: 20px; }

/* ===================== شاشة تعريف الحسابات: شريط أدوات واحد مضغوط ===================== */
#main[data-compact] .page-head { padding-bottom: 6px; margin-bottom: 8px; gap: 10px; }
#main[data-compact] .page-title { font-size: 26px; margin: 0; line-height: 1.2; }
#main[data-compact] .page-sub { display: none; }
#main[data-compact] .eyebrow { font-size: 11px; }
.acc-tools { margin-bottom: 8px; }
.acc-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 8px 12px; }
.acc-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.acc-chips .btn { height: 32px; padding-inline: 8px; font-size: 13px; }
.acc-grp { width: 165px; height: 36px; font-size: 13.5px; }
.acc-q { display: flex; align-items: center; gap: 6px; flex: 1 1 190px; max-width: 250px; height: 36px; padding: 0 10px; border: 1.5px solid var(--violet); border-radius: 10px; background: var(--surface); }
.acc-q i { color: var(--violet); font-size: 18px; }
.acc-q input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-weight: 800; font-size: 15px; color: var(--text); }
.acc-count { font-size: 13px; font-weight: 700; color: var(--text-2); white-space: nowrap; }
.acc-grpinfo { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; font-weight: 700; min-width: 0; }
.acc-grpinfo > b { color: var(--violet); font-size: 16px; }
.acc-grpinfo .acc-gn { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-bulk { position: relative; }
.acc-bulk > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.acc-bulk > summary::-webkit-details-marker { display: none; }
.acc-bulk > div { position: absolute; z-index: 30; top: calc(100% + 4px); inset-inline-end: 0; display: flex; flex-direction: column; gap: 6px; padding: 8px; min-width: 290px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 34px -12px rgba(10, 5, 38, .35); }
.acc-bulk > div .btn { justify-content: flex-start; }
.acc-tblcard { overflow: hidden; }

.acc-lbl { font-size: 12.5px; font-weight: 800; color: var(--text-2); align-self: center; }
.acc-chips .btn { min-width: 34px; justify-content: center; }
.acc-grpinfo .acc-gn { max-width: 120px; }

/* ===================== جدول الحسابات: تدرّج ألوان المستويات ===================== */
/* المستوى الأول (المجموعات الرئيسية 1..9): لون غامق وكلام أبيض بولد · المستوى الثاني: أخف · مستوى ثالث تحته حسابات: أخف منه · الحسابات الفرعية: أبيض بولد */
/* هادية: المستوى الأول بنفسجي فاتح وكلام بنفسجي غامق بولد + شريط على أول الصف · الثاني أفتح · الثالث أفتح منه */
table.tbl tr.lv-g1 td { background: color-mix(in srgb, var(--violet) 26%, var(--surface)); font-weight: 900; border-color: color-mix(in srgb, var(--violet) 18%, transparent); }
table.tbl tr.lv-g1 td, table.tbl tr.lv-g1 td * { color: #2E1F73 !important; }
table.tbl tr.lv-g1 td:first-child { box-shadow: inset -4px 0 0 color-mix(in srgb, var(--violet) 70%, transparent); }
table.tbl tr.lv-g1 a.acc-drill { text-decoration: underline; }
table.tbl tr.lv-g2 td { background: color-mix(in srgb, var(--violet) 12%, var(--surface)); font-weight: 800; }
table.tbl tr.lv-g3 td { background: color-mix(in srgb, var(--violet) 5%, var(--surface)); font-weight: 800; }
table.tbl tr.lv-leaf td { background: var(--surface); font-weight: 700; }
table.tbl tr.lv-g2 td .cbx, table.tbl tr.lv-g3 td .cbx { background: var(--surface); }
table.acc-list a.acc-drill { color: inherit; font-weight: 800; cursor: pointer; border-bottom: 1px dashed currentColor; }
table.acc-list a.acc-drill:hover { color: var(--violet); }
table.tbl tr.lv-g1 a.acc-drill:hover { color: var(--violet-d) !important; }
table.acc-list tr.sel td { box-shadow: inset 0 3px 0 var(--lime), inset 0 -3px 0 var(--lime); }
:root[data-theme="dark"] table.tbl tr.lv-g1 td { background: color-mix(in srgb, var(--violet) 38%, var(--surface)); }
:root[data-theme="dark"] table.tbl tr.lv-g1 td, :root[data-theme="dark"] table.tbl tr.lv-g1 td * { color: #EDE8FF !important; }
:root[data-theme="dark"] table.tbl tr.lv-g2 td { background: color-mix(in srgb, var(--violet) 20%, var(--surface)); }
:root[data-theme="dark"] table.tbl tr.lv-g3 td { background: color-mix(in srgb, var(--violet) 9%, var(--surface)); }

/* نفس التدرّج في شجرة الحسابات (تعريف الحسابات 2) */
.t-row.lv-g1 { background: color-mix(in srgb, var(--violet) 26%, var(--surface)); color: #2E1F73; font-weight: 900; box-shadow: inset -4px 0 0 color-mix(in srgb, var(--violet) 70%, transparent); }
.t-row.lv-g1 *, .t-row.lv-g1 .faint { color: #2E1F73 !important; }
.t-row.lv-g2 { background: color-mix(in srgb, var(--violet) 12%, var(--surface)); font-weight: 800; }
.t-row.lv-g3 { background: color-mix(in srgb, var(--violet) 5%, var(--surface)); font-weight: 800; }
.t-row.lv-leaf { font-weight: 700; }
:root[data-theme="dark"] .t-row.lv-g1 { background: color-mix(in srgb, var(--violet) 38%, var(--surface)); }
:root[data-theme="dark"] .t-row.lv-g1 *, :root[data-theme="dark"] .t-row.lv-g1 .faint { color: #EDE8FF !important; }
:root[data-theme="dark"] .t-row.lv-g2 { background: color-mix(in srgb, var(--violet) 20%, var(--surface)); }
:root[data-theme="dark"] .t-row.lv-g3 { background: color-mix(in srgb, var(--violet) 9%, var(--surface)); }

/* ===================== جدول الحسابات: كل الأعمدة قدام العين من غير تمرير أفقي ===================== */
/* عرض ثابت لكل عمود، واسم الحساب ياخد الباقي — فأزرار الصف (تعديل / حفظ / إلغاء) تفضل ظاهرة على طول */
table.acc-list { table-layout: fixed; width: 100%; min-width: 880px; }
table.acc-list th:nth-child(1) { width: 92px; }
table.acc-list th:nth-child(2) { width: auto; }
table.acc-list th:nth-child(3) { width: 130px; }
table.acc-list th:nth-child(4) { width: 92px; }
table.acc-list th:nth-child(5) { width: 78px; }
table.acc-list th:nth-child(6), table.acc-list th:nth-child(7), table.acc-list th:nth-child(8) { width: 56px; }
table.acc-list th:nth-child(9) { width: 48px; }
table.acc-list th:nth-child(10) { width: 68px; }
table.acc-list th:nth-child(11) { width: 138px !important; }
table.acc-list td.c-name, table.acc-list th.c-name { min-width: 0; max-width: none; }
table.acc-list td, table.acc-list th { overflow: hidden; text-overflow: ellipsis; padding-inline: 8px; }
table.acc-list td.acc-act { overflow: visible; min-width: 0; padding-inline: 4px; }
table.acc-list td.c-lvl, table.acc-list td.c-tax { max-width: none; }
table.acc-list tr.acc-new .input, table.acc-list tr.acc-edit .input, table.acc-list tr.acc-new .select, table.acc-list tr.acc-edit .select { min-width: 0; }
table.acc-list tr.acc-new #nn, table.acc-list tr.acc-edit #nn { min-width: 0; }
table.acc-list tr.acc-new #nc { min-width: 0; padding-inline: 6px; }
table.acc-list tr.acc-new .acc-act .btn, table.acc-list tr.acc-edit .acc-act .btn { margin-inline-start: 2px; padding-inline: 8px; }
table.acc-list tr.acc-edit .acc-act, table.acc-list tr.acc-new .acc-act { white-space: nowrap; }

/* ===================== تفاصيل الحساب (الدرج): رأس + تبويبات + أزرار ثابتة ===================== */
.ad-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 16px; background: linear-gradient(135deg, var(--violet-50), var(--surface-2)); border: 1px solid var(--line); }
.ad-ico { width: 46px; height: 46px; flex: none; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(150deg, #9D7BFF, #5530E0); box-shadow: 0 8px 16px -8px #5530E0, inset 0 1px 0 rgba(255, 255, 255, .45); }
.ad-ico i { color: #fff; font-size: 24px; }
.ad-id { display: flex; flex-direction: column; min-width: 0; flex: 1 1 200px; line-height: 1.3; }
.ad-id b { font-size: 20px; color: var(--violet); font-family: var(--display); }
.ad-name { font-weight: 800; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.acc-tabs { display: flex; gap: 2px; flex-wrap: wrap; margin: 14px 0 12px; border-bottom: 1.5px solid var(--line); }
.acc-tab { display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 14px; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1.5px; background: transparent; font: inherit; font-weight: 700; font-size: 14px; color: var(--text-2); cursor: pointer; }
.acc-tab i { font-size: 18px; color: var(--text-3); }
.acc-tab:hover { color: var(--violet); }
.acc-tab.on { color: var(--violet); border-bottom-color: var(--violet); }
.acc-tab.on i { color: var(--violet); }
.acc-pane { display: none; }
.acc-pane.on { display: block; }
.ad-sec-h { display: flex; align-items: center; gap: 8px; margin: 16px 0 8px; padding-bottom: 6px; border-bottom: 1px dashed var(--line); font-size: 14px; font-weight: 800; color: var(--violet); }
.ad-sec-h:first-child { margin-top: 4px; }
.ad-sec-h i { font-size: 18px; }
.acc-grid { gap: 12px 16px; }
.ad-ft { position: sticky; bottom: -16px; z-index: 3; display: flex; gap: 8px; flex-wrap: wrap; margin: 18px -18px -16px; padding: 12px 18px; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -10px 20px -16px rgba(10, 5, 38, .35); }

/* ===================== تفاصيل الحساب — نسخة مضغوطة واحترافية (.acc-dr) ===================== */
.acc-dr { font-size: 13.5px; }
.acc-dr .ad-top { padding: 10px 12px; gap: 10px; border-radius: 14px; background: linear-gradient(120deg, var(--violet-50) 0%, color-mix(in srgb, var(--pink) 6%, var(--surface)) 100%); }
.acc-dr .ad-ico { width: 38px; height: 38px; border-radius: 11px; }
.acc-dr .ad-ico i { font-size: 20px; }
.acc-dr .ad-id b { font-size: 17px; line-height: 1.1; }
.acc-dr .ad-name { font-size: 14px; }
.acc-dr .ad-badges .badge { font-size: 11.5px; padding: 2px 9px; }
/* التبويبات: شريط حبوب صغير */
.acc-dr .acc-tabs { margin: 10px 0; padding: 4px; gap: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.acc-dr .acc-tabs::-webkit-scrollbar { display: none; }
.acc-dr .acc-tab { flex: none; height: 32px; padding: 0 11px; margin: 0; border: 0; border-radius: 9px; font-size: 12.5px; white-space: nowrap; }
.acc-dr .acc-tab i { font-size: 16px; }
.acc-dr .acc-tab:hover { background: var(--surface); }
.acc-dr .acc-tab.on { background: var(--violet); color: #fff; box-shadow: 0 6px 14px -8px var(--violet); }
.acc-dr .acc-tab.on i, .acc-dr .acc-tab.on .badge { color: #fff; }
.acc-dr .acc-tab .badge { font-size: 10.5px; padding: 0 6px; line-height: 16px; background: rgba(132, 94, 255, .15); color: var(--violet-d); }
.acc-dr .acc-tab.on .badge { background: rgba(255, 255, 255, .25); }
/* الكروت */
.acc-dr .ad-card { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); margin-bottom: 10px; overflow: hidden; }
.acc-dr .ad-card-h { display: flex; align-items: center; gap: 7px; padding: 8px 12px; font-weight: 800; font-size: 13px; color: var(--violet-d); background: linear-gradient(90deg, var(--violet-50), transparent); border-bottom: 1px solid var(--line-soft); }
.acc-dr .ad-card-h i { font-size: 17px; color: var(--violet); }
.acc-dr .form-grid.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px 10px; padding: 10px 12px 12px; }
.acc-dr .ad-sub { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 11.5px; font-weight: 800; color: var(--text-3); letter-spacing: .02em; }
.acc-dr .ad-sub:first-child { margin-top: 0; }
.acc-dr .ad-sub::after { content: ""; flex: 1; height: 1px; background: var(--line); }
/* الخانات نفسها: أصغر وأنعم */
.acc-dr .field { gap: 3px; margin: 0; min-width: 0; }
.acc-dr .field > label { font-size: 11.5px; font-weight: 700; color: var(--text-2); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-dr .field > .faint { display: none; }
.acc-dr .input, .acc-dr .select { height: 34px; min-height: 34px; padding: 0 10px; font-size: 13.5px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); transition: border-color .15s, background .15s, box-shadow .15s; }
.acc-dr textarea.input { height: auto; min-height: 70px; padding: 8px 10px; }
.acc-dr .input:hover, .acc-dr .select:hover { border-color: color-mix(in srgb, var(--violet) 35%, var(--line)); }
.acc-dr .input:focus, .acc-dr .select:focus { outline: none; border-color: var(--violet); background: var(--surface); box-shadow: 0 0 0 3px var(--violet-50); }
.acc-dr .input[readonly] { background: var(--line-soft); color: var(--text-2); font-weight: 800; }
/* خانات الاختيار كأزرار صغيرة تتلوّن لما تتعلّم */
.acc-dr .field.chk { justify-content: flex-end; }
.acc-dr .field.chk > span { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); font-size: 13px; font-weight: 700; cursor: pointer; user-select: none; transition: background .15s, border-color .15s; }
.acc-dr .field.chk input { width: 16px; height: 16px; accent-color: var(--violet); margin: 0; }
.acc-dr .field.chk:has(input:checked) > span { background: var(--violet-50); border-color: var(--violet); color: var(--violet-d); }
.acc-dr .chain { font-size: 12px; padding: 6px 10px; border-radius: 9px; background: var(--surface-2); }
.acc-dr .ad-ft { padding: 10px 18px; }
.acc-dr .ad-ft .btn { height: 38px; }
@media (max-width: 520px) { .acc-dr .form-grid.acc-grid { grid-template-columns: 1fr 1fr; } }
/* الاسمين والمجموعة ياخدوا نص الصف بس (مش الصف كله) فالتبويب يتلم */
.acc-dr .field:has([name="parent"]), .acc-dr .field:has([name="name"]), .acc-dr .field:has([name="ename"]), .acc-dr .field:has([name="ar_registrationname"]), .acc-dr .field:has([name="en_registrationname"]), .acc-dr .field:has([name="address_new"]) { grid-column: span 2 !important; }
@media (max-width: 520px) { .acc-dr .field:has([name]) { grid-column: auto !important; } .acc-dr .field:has([name="name"]), .acc-dr .field:has([name="parent"]) { grid-column: 1 / -1 !important; } }
/* عناوين الخانات بولد وأغمق (طلب المالك) */
.acc-dr .field > label { font-size: 12.5px; font-weight: 800; color: var(--text); }
.acc-dr .field.chk > span { font-weight: 800; }
.acc-dr .ad-sub { font-weight: 900; color: var(--text-2); font-size: 12px; }

/* ===================== كل شاشات الإدخال: نفس الشكل الاحترافي (عناوين بولد، خانات أصغر، اختيارات كأزرار) ===================== */
.field > label, .field label:not(.chk) { font-size: 12.5px; font-weight: 800; color: var(--text); letter-spacing: 0; }
.field .input, .field .select { height: 36px; min-height: 36px; padding-inline: 10px; font-size: 13.5px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); transition: border-color .15s, background .15s, box-shadow .15s; }
.field textarea.input { height: auto; min-height: 72px; padding: 8px 10px; }
.field .input:hover, .field .select:hover { border-color: color-mix(in srgb, var(--violet) 35%, var(--line)); }
.field .input:focus, .field .select:focus { outline: none; border-color: var(--violet); background: var(--surface); box-shadow: 0 0 0 3px var(--violet-50); }
.field .input[readonly], .field .input:disabled, .field .select:disabled { background: var(--line-soft); color: var(--text-2); font-weight: 700; }
.form-grid { gap: 10px 12px; }
.field.chk span { height: 36px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); font-size: 13px; font-weight: 800; cursor: pointer; user-select: none; transition: background .15s, border-color .15s; }
.field.chk input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--violet); margin: 0; }
.field.chk:has(input:checked) span { background: var(--violet-50); border-color: var(--violet); color: var(--violet-d); }
.filters .btn, .form-grid .btn { height: 36px; }
:root[data-theme="dark"] .field .input, :root[data-theme="dark"] .field .select { background: var(--surface-2); }

/* ===================== شاشات الإدخال: ترتيب احترافي (نفس روح تفاصيل الحساب) ===================== */
/* الخانة «العريضة» تاخد عمودين بس على الشاشة الكبيرة (مش الصف كله) — فالشاشة تتلم والخانات تتجاور */
@media (min-width: 1100px) {
  .main .form-grid > .field[style*="grid-column:1/-1"]:not(:has(textarea)) { grid-column: span 2 !important; }
}
.main .form-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
/* السندات (قبض / صرف / إشعارات / إيداع): رأس ملوّن + كارت «بيانات السند» + كارت الحسابات + الإجماليات */
.vch-card { overflow: hidden; }
.vch-card > .card-head { background: linear-gradient(120deg, var(--violet-50) 0%, color-mix(in srgb, var(--pink) 6%, var(--surface)) 100%); border-bottom: 1px solid var(--line); }
.vch-card > .card-head .card-title { font-size: 18px; font-weight: 900; }
.vch-card #vf { margin: 12px 12px 10px; padding: 0 12px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.vch-card #vf::before { content: "بيانات السند"; grid-column: 1 / -1; display: flex; align-items: center; margin: 0 -12px 2px; padding: 8px 12px; font-weight: 800; font-size: 13px; color: var(--violet-d); background: linear-gradient(90deg, var(--violet-50), transparent); border-bottom: 1px solid var(--line-soft); border-radius: 14px 14px 0 0; }
.vch-card #vs.pad { padding: 0 12px 12px; }
.vch-card .vch-split { border: 1px solid var(--line); border-radius: 14px; padding: 0 12px 4px; background: var(--surface); }
.vch-card .vch-sub { margin: 0 -12px 10px; padding: 8px 12px; font-weight: 800; font-size: 13px; color: var(--violet-d); background: linear-gradient(90deg, var(--violet-50), transparent); border-bottom: 1px solid var(--line-soft); border-radius: 14px 14px 0 0; }
.vch-card .vch-srow { gap: 8px 12px; margin-bottom: 8px; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); max-width: 980px; }
.vch-card .vch-totals { margin: 0 12px 12px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(120deg, var(--surface-2), var(--violet-50)); }
.vch-card .vch-totals .t .l { font-weight: 800; color: var(--text-2); }
.vch-card .vch-totals .t .v { font-size: 19px; font-weight: 900; color: var(--violet-d); font-family: var(--display); }

/* =====================================================================================
   شكل برنامج العيادات (معيار المالك): عناوين الأقسام بتدرّج — الأول غامق، التاني أفتح، التالت فاتح —
   والخانات بلون باهت واضح، وأول ما تدخل الخانة تبقى بيضا بإطار بنفسجي. الألوان نفس العيادات بالظبط.
   ===================================================================================== */
:root { --field-bg: #F6F8FB; --field-line: #CDD3DE; --field-hover: #AEB6C6; --field-ink: #1E1B4B;
  --sh1-a: #2A1F6B; --sh1-b: #3B2E8F; --sh2-a: #5B4BC4; --sh2-b: #7262D8; --sh3-a: #DCD5FF; --sh3-b: #E9E4FF; --sh3-ink: #2A1F6B; }
:root[data-theme="dark"] { --field-bg: #1F2430; --field-line: #384152; --field-hover: #535D74; --field-ink: #F1EEFF; --sh3-a: #2B2560; --sh3-b: #2B2560; --sh3-ink: #E9E4FF; }

/* ---- العنوان الأول (غامق): رأس أي كارت فيه نموذج إدخال، ورأس السندات */
.sh-1,
.main .card:has(> form.form-grid) > .card-head,
.main .card:has(> form > .form-grid) > .card-head,
.vch-card > .card-head { background: linear-gradient(135deg, var(--sh1-a), var(--sh1-b)) !important; border-bottom: 0 !important; }
.sh-1 .card-title, .sh-1 .card-title i,
.main .card:has(> form.form-grid) > .card-head .card-title, .main .card:has(> form.form-grid) > .card-head .card-title i,
.main .card:has(> form > .form-grid) > .card-head .card-title, .main .card:has(> form > .form-grid) > .card-head .card-title i,
.vch-card > .card-head .card-title, .vch-card > .card-head .card-title .faint { color: #fff !important; }
.vch-card > .card-head .card-title { font-size: 17px; font-weight: 900; }
.vch-card > .card-head .input { background: #fff; border-color: transparent; color: var(--sh1-a); font-weight: 800; }

/* ---- العنوان التاني (أفتح) */
.sh-2,
.vch-card #vf::before { background: linear-gradient(135deg, var(--sh2-a), var(--sh2-b)) !important; color: #fff !important; border-bottom: 0 !important; }

/* ---- العنوان التالت (فاتح): الحسابات تحت السند، وكروت الجداول والتقارير */
.sh-3,
.vch-card .vch-sub,
.main .card:has(> .table-wrap) > .card-head { background: linear-gradient(135deg, var(--sh3-a), var(--sh3-b)) !important; border-bottom: 0 !important; }
.sh-3, .vch-card .vch-sub, .main .card:has(> .table-wrap) > .card-head .card-title { color: var(--sh3-ink) !important; }

/* ---- كارت «بيانات السند» والحسابات: البرواز يمشي مع العنوان */
.vch-card #vf, .vch-card .vch-split { border-color: #CFC8F5; }
.vch-card #vf::before, .vch-card .vch-sub { font-size: 13.5px; font-weight: 800; padding: 9px 14px; }

/* ---- تفاصيل الحساب: الرأس غامق، أول كارت أفتح، والباقي فاتح */
.acc-dr .ad-top { background: linear-gradient(135deg, var(--sh1-a), var(--sh1-b)); border: 0; color: #fff; }
.acc-dr .ad-top .ad-id b { color: #fff; }
.acc-dr .ad-top .ad-name { color: rgba(255, 255, 255, .92); }
.acc-dr .ad-top .badge { background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .22); }
.acc-dr .ad-top .ad-ico { background: rgba(255, 255, 255, .14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
.acc-dr .acc-pane .ad-card:first-child .ad-card-h { background: linear-gradient(135deg, var(--sh2-a), var(--sh2-b)); color: #fff; border-bottom: 0; }
.acc-dr .acc-pane .ad-card:first-child .ad-card-h i { color: #fff; }
.acc-dr .acc-pane .ad-card:not(:first-child) .ad-card-h { background: linear-gradient(135deg, var(--sh3-a), var(--sh3-b)); color: var(--sh3-ink); border-bottom: 0; }
.acc-dr .acc-pane .ad-card:not(:first-child) .ad-card-h i { color: var(--sh2-a); }
.acc-dr .ad-card { border-color: #CFC8F5; }

/* ---- الخانات في كل الشاشات: لون باهت واضح، والكلام اللي جواها بولد */
.field > label, .field label:not(.chk) { font-size: 13px; font-weight: 800; color: var(--text); }
.field .input, .field .select { background-color: var(--field-bg); border-color: var(--field-line); color: var(--field-ink); font-size: 14px; font-weight: 700; }
.field .input::placeholder { color: #8A93A6; font-weight: 500; font-size: 13px; }
.field .input:hover:not(:focus):not([readonly]):not(:disabled), .field .select:hover:not(:focus):not(:disabled) { border-color: var(--field-hover); }
.field .input:focus, .field .select:focus { background-color: var(--surface); border-color: var(--violet); box-shadow: 0 0 0 3px rgba(124, 92, 255, .15); }
.field .input[readonly], .field .select:disabled { background-color: var(--line-soft); color: var(--text-2); }
.field .req, .field label .req, .field label span[style*="--bad"] { color: #E5484D !important; }
/* التاريخ: الرقم في النص وبولد، والأيقونة بنفسجي */
.field .dt-wrap .dt-in { text-align: center; font-weight: 800; letter-spacing: .4px; }
.field .dt-wrap .dt-cal { color: var(--violet); }
/* خانات الاختيار */
.field.chk span { background: var(--field-bg); border-color: var(--field-line); }
.field.chk:has(input:checked) span { background: var(--violet-50); border-color: var(--violet); color: var(--violet-d); }

/* =====================================================================================
   الأزرار المجسّمة (3D) في كل البرنامج + لون ثابت لكل وظيفة (معيار المالك)
   رجوع برتقالي · جديد أزرق · حفظ أخضر · طباعة نيلي · حذف/إلغاء أحمر · اسأل غامق · الباقي أبيض مجسّم
   ===================================================================================== */
.btn:not(.ghost):not(.icon-btn) {
  background: linear-gradient(180deg, #FFFFFF 0%, #F0EDF9 100%); border: 1px solid #D9D3EC; border-bottom-color: #C2BADB;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 2px 0 rgba(42, 31, 107, .10), 0 6px 12px -8px rgba(42, 31, 107, .35);
  transition: transform .08s ease, box-shadow .12s ease, filter .12s ease; font-weight: 800;
}
.btn:not(.ghost):not(.icon-btn):hover { filter: brightness(1.04); }
.btn:not(.ghost):not(.icon-btn):active { transform: translateY(1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 1px 0 rgba(42, 31, 107, .12), 0 2px 6px -4px rgba(42, 31, 107, .35); }
.btn:disabled { filter: grayscale(.4) opacity(.6); transform: none !important; }
/* بنفسجي (الأساسي) */
.btn.primary:not(.k-save):not(.k-new) { background: linear-gradient(180deg, #9D7BFF 0%, #6A44E8 100%) !important; border-color: #5530E0 !important; color: #fff !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 2px 0 #4521C9, 0 8px 16px -10px #5530E0 !important; }
/* حفظ — أخضر */
.btn.k-save { background: linear-gradient(180deg, #4ADE80 0%, #16A34A 100%) !important; border-color: #15803D !important; color: #fff !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 2px 0 #116B32, 0 8px 16px -10px #15803D !important; }
/* جديد — أزرق */
.btn.k-new { background: linear-gradient(180deg, #38BDF8 0%, #0284C7 100%) !important; border-color: #0369A1 !important; color: #fff !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 2px 0 #075985, 0 8px 16px -10px #0369A1 !important; }
/* طباعة — نيلي */
.btn.k-print, .btn.rb-print { background: linear-gradient(180deg, #6366F1 0%, #3730A3 100%) !important; border-color: #312E81 !important; color: #fff !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 2px 0 #27245F, 0 8px 16px -10px #312E81 !important; }
/* رجوع — برتقالي */
.btn.rb-back { background: linear-gradient(180deg, #FDBA74 0%, #EA580C 100%) !important; border-color: #C2410C !important; color: #fff !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 2px 0 #9A3412, 0 8px 16px -10px #C2410C !important; }
/* Excel — أخضر فاتح بالأيقونة المجسّمة */
.btn.rb-xls { background: linear-gradient(180deg, #F0FDF4 0%, #BBF7D0 100%) !important; border-color: #86EFAC !important; color: #166534 !important; box-shadow: inset 0 1px 0 #fff, 0 2px 0 #4ADE80, 0 6px 12px -8px #16A34A !important; }
/* حذف / إلغاء — أحمر */
.btn.btn-danger { background: linear-gradient(180deg, #F87171 0%, #DC2626 100%) !important; border-color: #B91C1C !important; color: #fff !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 2px 0 #991B1B, 0 8px 16px -10px #B91C1C !important; }
/* اسأل — غامق */
.btn.dark { background: linear-gradient(180deg, #3B2E8F 0%, #0A0526 100%) !important; border-color: #0A0526 !important; color: #fff !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 2px 0 #000, 0 8px 16px -10px #0A0526 !important; }
.btn.k-save i, .btn.k-new i, .btn.k-print i, .btn.rb-print i, .btn.rb-back i, .btn.btn-danger i, .btn.dark i, .btn.primary i { color: #fff !important; }
.btn.k-save kbd, .btn.k-new kbd, .btn.primary kbd { background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .45); color: #fff; }
:root[data-theme="dark"] .btn:not(.ghost):not(.icon-btn):not(.primary):not(.k-save):not(.k-new):not(.k-print):not(.rb-back):not(.rb-xls):not(.btn-danger):not(.dark) { background: linear-gradient(180deg, #2A2450 0%, #1C1740 100%); border-color: #3B3561; color: var(--text); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 2px 0 rgba(0, 0, 0, .4); }

/* =====================================================================================
   مسافات أقل في كل الشاشات: العنوان يطلع لفوق والشاشة تتلم في صفحة واحدة
   ===================================================================================== */
.main { padding-top: 14px; }
.page-head { padding-bottom: 8px; margin-bottom: 10px; gap: 10px; }
.page-title { font-size: 28px; margin: 0; line-height: 1.2; }
.page-sub { font-size: 12px; margin: 0; }
.eyebrow { font-size: 11px; }
.head-actions { gap: 8px; }
.note-row { margin-bottom: 8px; }
.vch-card { margin-bottom: 10px; }
.vch-card > .card-head { padding-block: 8px; }
.vch-card #vf { margin: 8px 8px 8px; padding: 0 10px 10px; gap: 8px 10px; }
.vch-card #vs.pad { padding: 0 8px 8px; }
.vch-card .vch-split { padding: 0 10px 2px; }
.vch-card .vch-sub { margin: 0 -10px 8px; }
.vch-card .vch-srow { margin-bottom: 6px; gap: 6px 10px; }
.vch-card .vch-totals { margin: 0 8px 8px; padding: 8px 14px; }
/* حسابات السند: العناوين في أول سطر بس (زي الجدول) — الشاشة تتلم في صفحة واحدة */
.vch-split .vch-srow ~ .vch-srow .field > label { display: none; }
.vch-card .field .input, .vch-card .field .select { height: 34px; min-height: 34px; }
.vch-card .field > label { font-size: 12.5px; }
.vch-card .field { gap: 2px; }

/* =====================================================================================
   قائمة الحركة كلها بنفس شكل السند: قيود اليومية + السندات المتعددة + فاتورة الخدمات + الشاشات التانية
   ===================================================================================== */
/* كارت النموذج التاني في نفس الصفحة = العنوان التاني (أفتح) — مش غامق تاني */
.main .card:has(> form.form-grid, > form > .form-grid) ~ .card:has(> form.form-grid, > form > .form-grid) > .card-head,
.main .vch-card ~ .card:has(> form.form-grid, > form > .form-grid) > .card-head,
.main .vch-card ~ .vch-card > .card-head { background: linear-gradient(135deg, var(--sh2-a), var(--sh2-b)) !important; }
.main .vch-card ~ .vch-card > .card-head .card-title, .main .vch-card ~ .card:has(> form.form-grid, > form > .form-grid) > .card-head .card-title { color: #fff !important; }
/* رؤوس الكروت اللي لسه من غير لون (كروت جانبية / أدوات) = العنوان التالت */
.main .card > .card-head { background: linear-gradient(135deg, var(--sh3-a), var(--sh3-b)); border-bottom: 0; }
.main .card > .card-head .card-title { color: var(--sh3-ink); }

/* ---- قيود اليومية: رأس غامق «بيانات القيد» + الخانات بنفس الشكل + الإجماليات في كارت */
.jv-layout > div > .card { overflow: hidden; border-color: #CFC8F5; }
.jv-layout > div > .card::before { content: "بيانات القيد"; display: block; padding: 10px 16px; font-weight: 900; font-size: 15px; color: #fff; background: linear-gradient(135deg, var(--sh1-a), var(--sh1-b)); }
.jv-head { margin: 10px 12px 8px; padding: 10px 12px; border: 1px solid #CFC8F5; border-radius: 14px; background: var(--surface); gap: 8px 12px; }
.jv-head .field > label { font-size: 12.5px; font-weight: 800; color: var(--text); }
.jv-head .field .input, .jv-head .field .select { height: 34px; min-height: 34px; background-color: var(--field-bg); border-color: var(--field-line); color: var(--field-ink); font-weight: 700; border-radius: 9px; }
.jv-head .field .input:focus, .jv-head .field .select:focus { background-color: var(--surface); border-color: var(--violet); box-shadow: 0 0 0 3px rgba(124, 92, 255, .15); }
.jv-layout > div > .card > .add-line { padding: 8px 12px; }
.jv-layout > div > .card > .totals-bar { margin: 0 12px 12px; border: 1px solid #CFC8F5; border-radius: 14px; background: linear-gradient(120deg, var(--surface-2), var(--violet-50)); }
.jv-layout > div > .card > .totals-bar .t .l { font-weight: 800; color: var(--text-2); }
.jv-layout > div > .card > .totals-bar .t .v { font-weight: 900; font-family: var(--display); }
.jv-layout .side-panel .card { overflow: hidden; border-color: #CFC8F5; }

/* ================= كشف الحساب — شكل احترافي مضغوط (ارتفاع أقل) ================= */
.stp { display: flex; flex-direction: column; gap: 10px; }
.stp .card { margin: 0; overflow: hidden; border-color: #DDD6FB; box-shadow: 0 1px 2px rgba(40, 20, 110, .05), 0 6px 18px -12px rgba(60, 30, 160, .25); }
/* الفلاتر: صف واحد مضغوط */
.stp-flt { display: grid; grid-template-columns: minmax(220px, 2.2fr) 1fr 1fr 1.2fr auto; gap: 10px; align-items: end; padding: 9px 14px 10px; }
.stp-flt .field { gap: 3px; }
.stp-flt label { font-size: 12px; font-weight: 800; color: var(--text-2); display: flex; align-items: center; gap: 4px; }
.stp-flt label i { color: var(--violet); font-size: 14px; }
.stp-flt .input, .stp-flt .select, .stp-flt .dt-in { height: 34px; min-height: 34px; font-weight: 700; background: #F6F8FB; }
.stp-chk { height: 34px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #F6F8FB; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.stp-chk:has(input:checked) { background: var(--violet-50); border-color: var(--violet); color: var(--violet-d); }
.stp-chk input { accent-color: var(--violet); width: 15px; height: 15px; margin: 0; }
/* شريط الحساب: رقم واسم الحساب بشكل واضح أعلى الكشف */
.stp-acc { display: flex; align-items: center; gap: 12px; padding: 9px 14px; color: #fff; position: relative;
  background: linear-gradient(110deg, #1E1450 0%, #3B2496 55%, #6A44E8 100%); }
.stp-acc::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 12% 120%, rgba(200, 255, 90, .18), transparent 40%); pointer-events: none; }
.stp-ic { width: 38px; height: 38px; flex: none; border-radius: 11px; display: grid; place-items: center; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); font-size: 20px; }
.stp-id { min-width: 0; flex: 1; }
.stp-path { font-size: 11.5px; font-weight: 600; color: rgba(255, 255, 255, .68); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 3px; }
.stp-path i { font-size: 11px; opacity: .7; }
.stp-nm { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 1px; }
.stp-nm b { font-family: var(--display); font-size: 20px; font-weight: 900; line-height: 1.25; letter-spacing: -.01em; }
.stp-code { background: #C6F432; color: #1E1450; font-weight: 900; font-size: 14px; padding: 2px 10px; border-radius: 8px; letter-spacing: .04em; box-shadow: 0 2px 8px -2px rgba(198, 244, 50, .5); }
.stp-tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); }
.stp-per { display: flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 5px 11px; border-radius: 10px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); white-space: nowrap; position: relative; z-index: 1; }
.stp-per b { font-weight: 800; }
.stp-nav { display: flex; gap: 6px; position: relative; z-index: 1; }
.stp-nav .btn { height: 30px; background: rgba(255, 255, 255, .1) !important; border: 1px solid rgba(255, 255, 255, .28) !important; color: #fff !important; box-shadow: none !important; font-weight: 700; }
.stp-nav .btn:hover:not(:disabled) { background: rgba(255, 255, 255, .22) !important; }
.stp-nav .btn:disabled { opacity: .35; }
/* الأرقام الأربعة: شريط واحد قليل الارتفاع */
.stp-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stp-kpis .k { --c: #64748B; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--surface); border: 1px solid #DDD6FB; border-inline-start: 4px solid var(--c); }
.stp-kpis .ki { width: 32px; height: 32px; flex: none; border-radius: 9px; display: grid; place-items: center; font-size: 17px; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.stp-kpis .kl { font-size: 11.5px; font-weight: 800; color: var(--text-2); display: flex; gap: 6px; align-items: baseline; }
.stp-kpis .kl em { font-style: normal; font-weight: 600; color: var(--text-3); font-size: 11px; }
.stp-kpis .kv { font-family: var(--display); font-size: 19px; font-weight: 900; line-height: 1.2; color: var(--text); }
.stp-kpis .k-dr { --c: var(--dr); } .stp-kpis .k-dr .kv { color: var(--dr); }
.stp-kpis .k-cr { --c: var(--cr); } .stp-kpis .k-cr .kv { color: var(--cr); }
.stp-kpis .k-bal { --c: #C6F432; border: 0; color: #fff; background: linear-gradient(115deg, #2A1B6E, #6A44E8); }
.stp-kpis .k-bal .ki { color: #C6F432; background: rgba(255, 255, 255, .12); }
.stp-kpis .k-bal .kl { color: rgba(255, 255, 255, .78); }
.stp-kpis .k-bal .kv, .stp-kpis .k-bal .bal-side { color: #fff; }
.stp-kpis .k-bal .bal-side { background: rgba(255, 255, 255, .16); padding: 1px 6px; border-radius: 6px; }
/* جدول الحركة */
.stp-th { display: flex; align-items: center; gap: 12px; padding: 7px 14px; background: linear-gradient(90deg, var(--violet-50), var(--surface)); border-bottom: 1px solid #E6DEFF; }
.stp-th h2 { margin: 0; font-size: 15px; font-weight: 900; display: flex; align-items: center; gap: 7px; }
.stp-th h2 i { color: var(--violet); font-size: 18px; }
.stp-cnt { font-size: 11.5px; font-weight: 800; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px; background: var(--violet); color: #fff; display: inline-grid; place-items: center; }
.stp-q { margin-inline-start: auto; position: relative; width: min(320px, 45%); }
.stp-q i { position: absolute; inset-inline-start: 10px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.stp-q .input { height: 32px; min-height: 32px; padding-inline-start: 32px; border-radius: 999px; background: var(--surface); }
.stp .st-tbl thead th { background: #2A1B6E !important; color: #fff !important; font-size: 12.5px; font-weight: 800; padding: 8px 10px; border: 0; }
.stp .st-tbl td { padding: 6px 10px; font-size: 13px; }
.stp .st-tbl tbody tr[data-no]:nth-child(even) td { background: #FAF9FF; }
.stp .st-tbl tbody tr[data-no]:hover td { background: var(--violet-50) !important; }
.stp .st-tbl td.c-no { font-weight: 800; color: var(--violet-d); }
.stp .st-tbl td.c-bal { font-weight: 800; }
.stp .st-tbl tr.st-open td { background: #F4FBE3 !important; color: #3F5A0B; font-weight: 800; border-bottom: 1px solid #DCEFB0; }
.stp .st-tbl tr.st-open td i { color: #65A30D; }
.stp .st-tbl tr.st-empty td { text-align: center; padding: 22px 10px !important; background: var(--surface) !important; }
.stp .st-tbl tr.st-empty i { display: block; font-size: 30px; color: #C4B5FD; margin-bottom: 4px; }
.stp .st-tbl tr.st-empty b { display: block; font-size: 14px; color: var(--text-2); }
.stp .st-tbl tr.st-empty span { font-size: 12px; color: var(--text-3); }
.stp .st-tbl tfoot td { background: linear-gradient(90deg, #EEE8FF, #F7F4FF) !important; border-top: 2px solid var(--violet); font-weight: 900; font-size: 13.5px; padding: 8px 10px; }
.stp-hint { font-size: 11.5px; color: var(--text-3); padding: 6px 14px; display: flex; align-items: center; gap: 5px; }
:root[data-theme="dark"] .stp .card, :root[data-theme="dark"] .stp-kpis .k:not(.k-bal) { border-color: var(--line); }
:root[data-theme="dark"] .stp-flt .input, :root[data-theme="dark"] .stp-flt .select, :root[data-theme="dark"] .stp-chk { background: var(--surface-2); }
:root[data-theme="dark"] .stp .st-tbl tbody tr[data-no]:nth-child(even) td { background: var(--surface-2); }
:root[data-theme="dark"] .stp .st-tbl tr.st-open td { background: #1D2A0C !important; color: #BEF264; }
:root[data-theme="dark"] .stp .st-tbl tfoot td { background: var(--violet-50) !important; }
@media (max-width: 1100px) { .stp-flt { grid-template-columns: 1fr 1fr 1fr; } .stp-flt .f-acc { grid-column: 1 / -1; } .stp-per { display: none; } }
@media (max-width: 760px) {
  .stp-flt { grid-template-columns: 1fr 1fr; } .stp-kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stp-acc { flex-wrap: wrap; } .stp-nav { width: 100%; justify-content: flex-end; } .stp-q { width: 100%; }
  .stp-th { flex-wrap: wrap; }
}

/* كشف الحساب الشهري / بأنواع القيود: عنوان المجموعة + طي وفتح + «ملخص فقط» */
.stp .st-tbl tr.st-grp td { background: linear-gradient(90deg, #EEE8FF, #F8F6FF) !important; color: #2A1B6E; font-weight: 900; border-top: 1px solid #DCD2FF; border-bottom: 1px solid #DCD2FF; padding-top: 7px; padding-bottom: 7px; cursor: pointer; user-select: none; }
.stp .st-tbl tr.st-grp:hover td { background: linear-gradient(90deg, #E4DBFF, #F1EDFF) !important; }
.stp .st-tbl tr.st-grp td:first-child { display: table-cell; }
.stp .st-tbl tr.st-grp b { font-size: 13.5px; margin-inline-end: 8px; }
.stp .st-tbl tr.st-grp .stg-tg { font-size: 14px; color: var(--violet); margin-inline-end: 6px; transition: transform .15s; display: inline-block; vertical-align: -2px; }
.stp .st-tbl tr.st-grp.folded .stg-tg { transform: rotate(90deg); }
.stp .st-tbl tr.st-grp .stg-ic { font-size: 16px; color: var(--violet-d); margin-inline-end: 6px; vertical-align: -3px; }
.stp .st-tbl tr.st-grp .stg-n { font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 999px; background: #fff; border: 1px solid #DCD2FF; color: var(--violet-d); }
.stp .st-tbl tr.st-grp td.n { color: #2A1B6E; }
.stp .st-tbl tr.st-grp .stg-bl { display: block; font-size: 10px; font-weight: 700; color: var(--text-3); line-height: 1.1; }
.stp .st-tbl tr.g-hid { display: none; }
.stp-sum { height: 30px; font-weight: 800; border-radius: 999px !important; background: var(--surface) !important; border: 1px solid #CFC4FF !important; color: var(--violet-d) !important; box-shadow: none !important; }
.stp-sum.on { background: var(--violet) !important; border-color: var(--violet) !important; color: #fff !important; }
:root[data-theme="dark"] .stp .st-tbl tr.st-grp td { background: var(--violet-50) !important; color: #E4DCFF; border-color: var(--line); }
:root[data-theme="dark"] .stp .st-tbl tr.st-grp td.n { color: #E4DCFF; }
:root[data-theme="dark"] .stp .st-tbl tr.st-grp .stg-n { background: var(--surface); border-color: var(--line); }

/* كشف الحساب — أقصى توفير في الارتفاع: العنوان جوه الخانة، الحساب والأرقام كل واحد في سطر واحد */
.stp { gap: 8px; }
.stp-flt { grid-template-columns: minmax(240px, 2.4fr) minmax(150px, 1fr) minmax(150px, 1fr) minmax(170px, 1.1fr) auto; gap: 8px; padding: 7px 10px; align-items: center; }
.stp-f { display: flex; align-items: center; min-width: 0; height: 34px; border: 1px solid var(--line); border-radius: 10px; background: #F6F8FB; overflow: visible; cursor: text; transition: border-color .12s, box-shadow .12s; }
.stp-f:focus-within { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(132, 94, 255, .15); background: var(--surface); }
.stp-f .stp-pl { flex: none; display: flex; align-items: center; gap: 4px; height: 100%; padding: 0 10px; font-size: 12px; font-weight: 800; color: var(--violet-d); background: var(--violet-50); border-inline-end: 1px solid #E2DAFF; border-radius: 0 9px 9px 0; white-space: nowrap; }
[dir="ltr"] .stp-f .stp-pl { border-radius: 9px 0 0 9px; }
.stp-f .stp-pl i { font-size: 14px; }
.stp-f > .input, .stp-f > .select, .stp-f .dt-wrap { flex: 1; min-width: 0; }
.stp-f .input, .stp-f .select, .stp-f .dt-in { height: 32px !important; min-height: 32px !important; border: 0 !important; box-shadow: none !important; background: transparent !important; font-weight: 800; }
.stp-f .dt-wrap { display: block; position: relative; }
.stp-f .dt-wrap .dt-in { text-align: center; }
.stp-chk { height: 34px; }
/* شريط الحساب في سطر واحد */
.stp-acc { padding: 6px 12px; gap: 10px; min-height: 44px; }
.stp-acc .stp-ic { width: 30px; height: 30px; border-radius: 9px; font-size: 17px; }
.stp-acc .stp-code { font-size: 13.5px; padding: 1px 9px; }
.stp-acc .stp-name { font-family: var(--display); font-size: 19px; font-weight: 900; line-height: 1.2; white-space: nowrap; }
.stp-acc .stp-path { flex: 1; min-width: 0; font-size: 11.5px; color: rgba(255, 255, 255, .65); }
.stp-acc .stp-nav .btn { height: 28px; }
/* الأرقام الأربعة: سطر واحد داخل نفس الكارت */
.stp-kp { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid #E6DEFF; }
.stp-kp .k { --c: #64748B; display: flex; align-items: center; gap: 7px; padding: 0 12px; height: 40px; min-width: 0; border-inline-start: 1px solid #ECE7FF; position: relative; }
.stp-kp .k:first-child { border-inline-start: 0; }
.stp-kp .k::before { content: ""; position: absolute; inset-inline-start: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--c); }
.stp-kp .k > i { font-size: 16px; color: var(--c); }
.stp-kp .kl { font-size: 12px; font-weight: 800; color: var(--text-2); white-space: nowrap; }
.stp-kp .kv { font-family: var(--display); font-size: 17px; font-weight: 900; white-space: nowrap; margin-inline-start: auto; }
.stp-kp em { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--text-3); white-space: nowrap; }
.stp-kp .k-dr { --c: var(--dr); } .stp-kp .k-dr .kv { color: var(--dr); }
.stp-kp .k-cr { --c: var(--cr); } .stp-kp .k-cr .kv { color: var(--cr); }
.stp-kp .k-bal { --c: #C6F432; background: linear-gradient(115deg, #2A1B6E, #6A44E8); color: #fff; }
.stp-kp .k-bal .kl { color: rgba(255, 255, 255, .8); }
.stp-kp .k-bal .kv, .stp-kp .k-bal .bal-side { color: #fff; }
.stp-kp .k-bal .bal-side { background: rgba(255, 255, 255, .16); padding: 1px 6px; border-radius: 6px; }
.stp-th { padding: 5px 12px; }
.stp .st-tbl thead th { padding: 7px 10px; }
.stp-hint { padding: 4px 12px; }
:root[data-theme="dark"] .stp-f { background: var(--surface-2); }
:root[data-theme="dark"] .stp-f .stp-pl { border-color: var(--line); }
:root[data-theme="dark"] .stp-kp, :root[data-theme="dark"] .stp-kp .k { border-color: var(--line); }
@media (max-width: 1100px) {
  .stp-flt { grid-template-columns: 1fr 1fr 1fr; } .stp-flt .f-acc { grid-column: 1 / -1; }
  .stp-kp { grid-template-columns: 1fr 1fr; } .stp-kp .k:nth-child(3) { border-inline-start: 0; } .stp-kp .k:nth-child(n+3) { border-top: 1px solid #ECE7FF; }
  .stp-acc .stp-path { display: none; }
}
@media (max-width: 760px) {
  .stp-flt { grid-template-columns: 1fr 1fr; }
  .stp-kp em { display: none; }
  .stp-acc { flex-wrap: wrap; } .stp-acc .stp-name { white-space: normal; font-size: 17px; }
}

/* ================= كل التقارير بنفس فكرة كشف الحساب: أقصى مساحة للجسم =================
   - عنوان الخانة جوه الخانة نفسها (بادئة على اليمين) ← الفلاتر في سطر واحد
   - الكروت (الأرقام) سطر واحد: العنوان والقيمة جنب بعض
   - راس النتيجة والمسافات أصغر */
#main:has(.filters, .stp) .page-head { padding-bottom: 6px; margin-bottom: 8px; }
#main:has(.filters, .stp) .page-title { font-size: 26px; line-height: 1.15; }
#main:has(.filters, .stp) .page-sub { margin-top: 0; font-size: 12px; }
.card:has(> .filters) { margin-bottom: 8px !important; overflow: visible; }
.filters { display: flex !important; flex-wrap: wrap; gap: 8px !important; padding: 7px 10px !important; align-items: center !important; }
.filters > .field:not(.chk) { flex: 1 1 190px; min-width: 0; display: flex; flex-direction: row; align-items: center; gap: 0; height: 34px; border: 1px solid var(--line); border-radius: 10px; background: #F6F8FB; transition: border-color .12s, box-shadow .12s; }
.filters > .field:has(input[list], [data-acc], .span-all) , .filters > .field.span-all { flex: 2.2 1 300px; }
.filters > .field:not(.chk):focus-within { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(132, 94, 255, .15); background: var(--surface); }
.filters > .field:not(.chk) > label { flex: none; display: flex; align-items: center; gap: 4px; height: 100%; margin: 0; padding: 0 10px; font-size: 12px; font-weight: 800; color: var(--violet-d); background: var(--violet-50); border-inline-end: 1px solid #E2DAFF; border-radius: 0 9px 9px 0; white-space: nowrap; }
[dir="ltr"] .filters > .field:not(.chk) > label { border-radius: 9px 0 0 9px; }
.filters > .field:not(.chk) > .input, .filters > .field:not(.chk) > .select, .filters > .field:not(.chk) > .dt-wrap { flex: 1; min-width: 0; }
.filters > .field:not(.chk) .input, .filters > .field:not(.chk) .select, .filters > .field:not(.chk) .dt-in { height: 32px !important; min-height: 32px !important; border: 0 !important; box-shadow: none !important; background: transparent !important; font-weight: 800; }
.filters > .field:not(.chk) .dt-wrap { display: block; position: relative; }
.filters > .field:not(.chk) .dt-wrap .dt-in { text-align: center; }
.filters > .field:not(.chk) > .faint { display: none; }
.filters > .field.chk { flex: none; height: 34px; display: inline-flex; align-items: center; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #F6F8FB; font-size: 13px; font-weight: 700; }
.filters > .btn, .filters > label.btn { height: 34px !important; align-self: center !important; flex: none; }
.filters .input.flt-val, .filters .select.flt-val, .filters .dt-in.flt-val { background: transparent !important; }
.filters > .field:has(.flt-val) { background: #FFF7ED; border-color: #FB923C; }
.filters > .field:has(.flt-val) > label { background: #FFEDD5; color: #C2410C; border-color: #FED7AA; }
:root[data-theme="dark"] .filters > .field:not(.chk), :root[data-theme="dark"] .filters > .field.chk { background: var(--surface-2); }
:root[data-theme="dark"] .filters > .field:not(.chk) > label { border-color: var(--line); }

/* الكروت: سطر واحد */
.sum-cards { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important; margin-bottom: 8px !important; overflow: hidden; }
.sum-cards > div { position: relative; display: flex; align-items: center; flex-wrap: nowrap; gap: 7px; height: 40px; padding: 0 12px 0 12px !important; border-top: 0 !important; border-inline-start: 1px solid #ECE7FF; min-width: 0; }
.sum-cards > div::before { content: ""; position: absolute; inset-inline-start: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--s, var(--violet)); }
.sum-cards .l { font-size: 12px !important; font-weight: 800; color: var(--text-2); white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.sum-cards .l i { color: var(--s, var(--violet)); font-size: 15px; }
.sum-cards .v { margin: 0 !important; margin-inline-start: auto !important; font-size: 17px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sum-cards .s { font-size: 10.5px !important; font-weight: 700; white-space: nowrap; order: 3; }
:root[data-theme="dark"] .sum-cards > div { border-color: var(--line); }

/* راس جدول النتيجة */
.card-head:has(#rq) { padding: 5px 12px !important; min-height: 0; }
.card-head:has(#rq) .card-title { font-size: 15px; font-weight: 900; }
.card-head:has(#rq) #rq { height: 32px; min-height: 32px; border-radius: 999px; }
#main:has(#rf) .placeholder { padding: 26px 16px; }
@media (max-width: 760px) {
  .filters > .field:not(.chk) { flex-basis: 100%; }
  .sum-cards { grid-template-columns: 1fr 1fr !important; }
  .sum-cards .s { display: none; }
}
.stp-flt { grid-template-columns: minmax(200px, 1.7fr) minmax(190px, 1fr) minmax(190px, 1fr) minmax(175px, 1fr) auto; }
.stp-f .stp-pl { padding: 0 8px; }
.stp-chk { padding: 0 10px; }
.filters > .field:not(.chk):has(.dt-wrap, input[type="date"]) { flex: 1 1 210px; }
.filters > .field:not(.chk):has(select) { flex: 1 1 200px; }
.sum-cards { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important; }
.sum-cards .l, .sum-cards .v { flex-shrink: 0; }
.sum-cards .s { min-width: 0; flex-shrink: 1; overflow: hidden; text-overflow: ellipsis; }
.card:has(#rq) > .note-row { margin: 6px 12px 0 !important; padding: 4px 10px !important; font-size: 12px; min-height: 0; }
@media (max-width: 1100px) { .stp-flt { grid-template-columns: 1fr 1fr 1fr; } .stp-flt .f-acc { grid-column: 1 / -1; } }
@media (max-width: 760px) {
  .stp-flt { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .stp-flt .f-acc { grid-column: 1 / -1; }
  .stp-kp .k { padding: 0 8px; gap: 5px; } .stp-kp .kl { font-size: 11px; } .stp-kp .kv { font-size: 14.5px; }
  .stp-kp .k > i { display: none; }
}
@media (max-width: 760px) {
  .stp-flt > .stp-f { grid-column: 1 / -1; }
  .stp-flt > .stp-f:has(select) { grid-column: auto; }
  .stp-kp .k { flex-wrap: wrap; height: auto; padding: 5px 9px; row-gap: 0; }
  .stp-kp .kv { margin-inline-start: 0; width: 100%; font-size: 15px; }
  .stp-kp .k::before { top: 6px; bottom: 6px; }
}

/* كل التقارير (ميزان المراجعة وغيره) بنفس شكل كشف الحساب: كارت فوق = الفلاتر + شريط العنوان + الأرقام، والجدول تحته */
.rpt .stp-top > .filters { border-bottom: 0; }
.rpt .stp-acc .stp-name { min-width: 0; max-width: 55%; overflow: hidden; text-overflow: ellipsis; font-size: 17px; }
.rpt .stp-acc .stp-path { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.rpt .stp-acc .stp-tag { flex: none; }
.rpt .stp-kp { grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); }
.rpt .stp-kp .k { height: auto; min-height: 40px; flex-wrap: wrap; row-gap: 0; padding: 4px 10px; border-top: 0 !important; }
.rpt .stp-kp .k:not(:first-child) { border-inline-start: 1px solid #ECE7FF !important; }
.rpt .stp-kp .kv { font-size: 16px; }
.rpt .stp-kp .kv .badge { font-size: 12px; }
.rpt .stp-kp em { width: auto; }
.rpt .stp-card .note-row { margin: 6px 12px 0 !important; padding: 4px 10px !important; font-size: 12px; }
.rpt > .placeholder { padding: 26px 16px; }
:root[data-theme="dark"] .rpt .stp-kp .k:not(:first-child) { border-color: var(--line) !important; }
@media (max-width: 760px) {
  .rpt .stp-kp { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rpt .stp-kp .k:nth-child(odd) { border-inline-start: 0 !important; }
  .rpt .stp-kp .k:nth-child(n+3) { border-top: 1px solid #ECE7FF !important; }
  .rpt .stp-acc .stp-path { display: none; }
  .rpt .stp-acc .stp-name { max-width: none; white-space: normal; }
}

/* البحث جوه الشريط البنفسجي (بدل سطر راس الجدول) */
.stp-q-in { margin-inline-start: auto; width: min(260px, 30%); flex: none; position: relative; z-index: 1; }
.stp-q-in i { color: rgba(255, 255, 255, .7) !important; }
.stp-q-in .input { height: 30px !important; min-height: 30px !important; border-radius: 999px; padding-inline-start: 30px; background: rgba(255, 255, 255, .12) !important; border: 1px solid rgba(255, 255, 255, .28) !important; color: #fff !important; font-weight: 700; box-shadow: none !important; }
.stp-q-in .input::placeholder { color: rgba(255, 255, 255, .6); }
.stp-q-in .input:focus { background: #fff !important; color: var(--text) !important; border-color: #fff !important; }
.stp-q-in:focus-within i { color: var(--text-3) !important; }
.stp-acc .stp-tag { flex: none; position: relative; z-index: 1; }
.stp-acc .stp-sum { height: 28px; flex: none; position: relative; z-index: 1; background: rgba(255, 255, 255, .12) !important; border: 1px solid rgba(255, 255, 255, .28) !important; color: #fff !important; }
.stp-acc .stp-sum.on { background: #C6F432 !important; border-color: #C6F432 !important; color: #1E1450 !important; }
.stp-acc .stp-q-in + .stp-nav { margin-inline-start: 0; }
.stp-acc .stp-path { flex: 1 1 auto; }
.stp-card { border-top: 0; }
@media (max-width: 760px) {
  .stp-q-in { width: 100%; order: 9; }
}
.stp-q-in { width: auto; flex: 0 1 240px; min-width: 120px; }
.stp-acc .stp-path { flex: 1 1 0; }
.stp-acc .stp-name { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) { .stp-q-in { flex: 1 1 100%; } }

/* «عرض قيد»: خانة رقم القيد صغيرة والرقم كبير + سهمين + أقل/أعلى رقم في نفس السطر */
.filters > .field.ent-no { flex: 0 0 auto !important; }
.filters > .field.ent-no .input { width: 92px; flex: none; text-align: center; font-size: 19px !important; font-weight: 900 !important; font-family: var(--display); color: var(--violet-d); letter-spacing: .02em; }
.ent-no .en-btn { flex: none; width: 30px; height: 30px; margin: 0 2px; border: 0; border-radius: 8px; display: grid; place-items: center; background: var(--violet-50); color: var(--violet-d); font-size: 18px; cursor: pointer; transition: background .12s, color .12s, transform .08s; }
.ent-no .en-btn:hover:not(:disabled) { background: var(--violet); color: #fff; }
.ent-no .en-btn:active:not(:disabled) { transform: scale(.94); }
.ent-no .en-btn:disabled { opacity: .3; cursor: default; }
.en-range { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border: 1px dashed #D6CCFF; border-radius: 10px; font-size: 12px; font-weight: 700; color: var(--text-3); white-space: nowrap; }
.en-range button { min-width: 30px; height: 24px; padding: 0 8px; border: 1px solid #D6CCFF; border-radius: 7px; background: var(--surface); color: var(--violet-d); font-weight: 900; font-size: 13px; cursor: pointer; }
.en-range button:hover { background: var(--violet); border-color: var(--violet); color: #fff; }
.en-range span + button { margin-inline-end: 4px; }
:root[data-theme="dark"] .en-range, :root[data-theme="dark"] .en-range button { border-color: var(--line); }

/* الخانات ما تكبرش على الفاضي: التواريخ والقوائم (زي نوع القيد) بعرض محدد، والحساب بس هو اللي ياخد الباقي */
.filters > .field:not(.chk):has(.dt-wrap, input[type="date"]) { flex: 0 0 200px; }
.filters > .field:not(.chk):has(select) { flex: 0 1 210px; }
.filters > .field:not(.chk):has(input[type="text"]:not([list])):not(:has(select)):not(.ent-no) { flex: 0 1 220px; }
.filters > .field:not(.chk):has(input[list], [data-acc]) { flex: 1 1 280px; }
.filters > .btn.go-near { margin-inline-end: 4px; }
@media (max-width: 760px) {
  .filters > .field:not(.chk) { flex: 1 1 100% !important; }
  .filters > .field.ent-no { flex: 1 1 100% !important; }
  .filters > .field.ent-no .input { flex: 1; width: auto; }
}
@media (max-width: 760px) { .filters > .field:not(.chk) > select { width: auto !important; flex: 1 1 auto !important; } .filters > .field:not(.chk):has(> select) { flex: 1 1 100% !important; } }
.en-range { gap: 4px; padding: 0 7px; }
.en-range button { min-width: 26px; padding: 0 6px; }
.en-range span + button { margin-inline-end: 2px; }
.filters > .btn.go-near { padding-inline: 12px; }

/* ================= عرض القيد بشكل البرنامج القديم (تاريخ لكل سطر + سطر البيان + اللوجو + الاعتماد) ================= */
.ev-host > .ev-src { display: none; }
.ev-host { border: 0 !important; background: transparent !important; box-shadow: none !important; overflow: visible !important; }
.ev-wrap { display: flex; flex-direction: column; gap: 12px; }
.ev { background: var(--surface); border: 1px solid #DDD6FB; border-radius: 14px; overflow: hidden; box-shadow: 0 1px 2px rgba(40, 20, 110, .05), 0 8px 22px -14px rgba(60, 30, 160, .3); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.ev.closed { border-color: #BBF7D0; }
/* الراس */
.ev-h { display: flex; align-items: center; gap: 14px; padding: 10px 16px; background: linear-gradient(100deg, #FBFAFF, #F1ECFF); border-bottom: 1px solid #E6DEFF; }
.ev-logo { width: 54px; height: 54px; flex: none; border-radius: 12px; background: #fff; border: 1px solid #E2DAFF; display: grid; place-items: center; overflow: hidden; position: relative; }
.ev-logo img { display: none; max-width: 100%; max-height: 100%; object-fit: contain; }
.ev-logo.ok img { display: block; }
.ev-logo.ok .ev-ini { display: none; }
.ev-ini { font-family: var(--display); font-weight: 900; font-size: 24px; color: #fff; width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(135deg, #2A1B6E, #6A44E8); }
.ev-co { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ev-co b { font-family: var(--display); font-size: 19px; font-weight: 900; color: #1E1450; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-co span { font-size: 13px; font-weight: 800; color: var(--violet-d); }
.ev-id { display: flex; flex-direction: column; align-items: center; padding: 4px 16px; border-radius: 12px; background: #fff; border: 1px solid #E2DAFF; }
.ev-id span { font-size: 11px; font-weight: 800; color: var(--text-3); }
.ev-id b { font-family: var(--display); font-size: 24px; font-weight: 900; color: var(--violet-d); line-height: 1.1; }
.ev-pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 900; }
.ev-pill.ok { background: #DCFCE7; color: #166534; border: 1px solid #86EFAC; }
.ev-pill.wait { background: #FFF7ED; color: #9A3412; border: 1px solid #FED7AA; }
/* الجدول */
.ev-tbl { width: 100%; border-collapse: collapse; }
.ev-tbl thead th { background: linear-gradient(180deg, #3B2496, #2A1B6E); color: #fff; font-size: 12.5px; font-weight: 800; padding: 8px 10px; text-align: start; white-space: nowrap; }
.ev-tbl thead th.n { text-align: end; }
.ev-tbl td { padding: 6px 10px; font-size: 13px; }
.ev-tbl tr.ev-l td { border-top: 1px solid #E9E4FF; font-weight: 700; cursor: pointer; }
.ev-tbl tr.ev-l:first-child td { border-top: 0; }
.ev-tbl .ev-dt { color: #9F1239; font-weight: 900; white-space: nowrap; }
.ev-tbl .ev-code { color: #1E1450; font-weight: 900; }
.ev-tbl .ev-nm b { color: #1E1450; font-weight: 900; }
.ev-tbl .ev-sub { color: var(--text-2); font-weight: 700; }
.ev-tbl .ev-m { color: var(--dr); font-weight: 900; }
.ev-tbl .ev-c { color: var(--cr); font-weight: 900; }
.ev-tbl tr.ev-b td { padding: 2px 10px 8px; background: #FAF8FF; color: var(--text-2); font-size: 12.5px; font-weight: 600; cursor: pointer; border-bottom: 1px dashed #E2DAFF; }
.ev-tbl tr.ev-b i.ti-align-right { color: #B4A5F5; margin-inline-end: 6px; font-size: 14px; vertical-align: -2px; }
.ev-chip { display: inline-flex; align-items: center; gap: 4px; margin-inline-start: 10px; padding: 1px 8px; border-radius: 999px; background: #fff; border: 1px solid #E2DAFF; font-size: 11.5px; font-weight: 800; color: var(--violet-d); }
.ev-tbl tr:hover td { background: #F3EFFF; }
.ev-tbl tr.sel td { background: #2563EB !important; color: #fff !important; }
.ev-tbl tr.sel td * { color: #fff !important; }
.ev-tbl tr.sel .ev-chip { background: rgba(255, 255, 255, .15); border-color: rgba(255, 255, 255, .35); }
.ev-go { width: 40px; text-align: center; }
.ev-st { width: 28px; height: 28px; border: 0; border-radius: 8px; background: var(--violet-50); color: var(--violet-d); font-size: 16px; cursor: pointer; display: inline-grid; place-items: center; }
.ev-st:hover { background: var(--violet); color: #fff; }
.ev-tbl tr.sel .ev-st { background: rgba(255, 255, 255, .2); }
.ev-tbl tfoot td { padding: 9px 10px; font-weight: 900; font-size: 14px; background: linear-gradient(90deg, #EEE8FF, #F7F4FF); border-top: 2px solid var(--violet); color: #1E1450; }
.ev-tbl tfoot td.n { text-align: end; }
.ev-en { font-family: Arial, sans-serif; font-weight: 700; color: var(--text-3); margin-inline-start: 6px; }
/* الذيل: مين عمل القيد ومين اعتمده + الأزرار */
.ev-f { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid #E6DEFF; background: #FCFBFF; flex-wrap: wrap; }
.ev-sigs { display: flex; gap: 10px; flex-wrap: wrap; flex: 1; min-width: 0; }
.ev-sig { display: flex; flex-direction: column; min-width: 170px; padding: 6px 12px; border-radius: 10px; background: #fff; border: 1px solid #E6DEFF; border-inline-start: 4px solid #8B5CF6; }
.ev-sig.ok { border-inline-start-color: #16A34A; background: #F0FDF4; }
.ev-sig.wait { border-inline-start-color: #F59E0B; }
.ev-sig.ed { border-inline-start-color: #64748B; }
.ev-sl { font-size: 11px; font-weight: 800; color: var(--text-3); }
.ev-sig b { font-size: 13.5px; font-weight: 900; color: #1E1450; }
.ev-at { font-size: 11.5px; font-weight: 700; color: var(--text-2); }
.ev-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ev-apv { background: linear-gradient(180deg, #22C55E, #15803D) !important; border-color: #15803D !important; color: #fff !important; font-weight: 900; box-shadow: 0 3px 0 #14532D, 0 6px 14px -6px rgba(21, 128, 61, .6) !important; }
.ev-apv:hover { filter: brightness(1.06); }
.ev-locked { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 10px; background: #DCFCE7; color: #166534; font-weight: 900; font-size: 13px; border: 1px solid #86EFAC; }
.ev-stbtn:disabled { opacity: .5; }
:root[data-theme="dark"] .ev { border-color: var(--line); }
:root[data-theme="dark"] .ev-h, :root[data-theme="dark"] .ev-f { background: var(--surface-2); border-color: var(--line); }
:root[data-theme="dark"] .ev-co b, :root[data-theme="dark"] .ev-tbl .ev-code, :root[data-theme="dark"] .ev-tbl .ev-nm b, :root[data-theme="dark"] .ev-sig b, :root[data-theme="dark"] .ev-tbl tfoot td { color: #EDE9FF; }
:root[data-theme="dark"] .ev-tbl tr.ev-b td { background: var(--surface-2); }
:root[data-theme="dark"] .ev-id, :root[data-theme="dark"] .ev-sig, :root[data-theme="dark"] .ev-logo { background: var(--surface); border-color: var(--line); }
:root[data-theme="dark"] .ev-tbl tfoot td { background: var(--violet-50); }
@media screen and (max-width: 760px) {
  .ev-h { flex-wrap: wrap; } .ev-co b { white-space: normal; }
  .ev-tbl thead { display: none; }
  .ev-tbl, .ev-tbl tbody, .ev-tbl tfoot { display: block; }
  .ev-tbl tr.ev-l { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 8px; padding: 8px 10px 0; border-top: 1px solid #E9E4FF; }
  .ev-tbl tr.ev-l td { display: block; padding: 0; border: 0 !important; }
  .ev-tbl tr.ev-l td:nth-child(2), .ev-tbl tr.ev-l td:nth-child(3) { display: none; }
  .ev-tbl tr.ev-b { display: block; } .ev-tbl tr.ev-b td { display: block; }
  .ev-tbl tfoot tr { display: grid; grid-template-columns: 1fr auto auto; } .ev-tbl tfoot td:last-child { display: none; }
}
/* الطباعة */
.ev-print .ev { border: 1px solid #999; }
.ev-print .ev-tbl tr.sel td { background: transparent !important; color: inherit !important; }
.ev-print .ev-tbl tr.sel td * { color: inherit !important; }
.logo-srv { display: flex; align-items: center; gap: 14px; padding: 0 18px 16px; flex-wrap: wrap; }
.logo-prev { width: 120px; height: 72px; border: 1px dashed #D6CCFF; border-radius: 12px; display: grid; place-items: center; background: #fff; overflow: hidden; font-size: 12px; }
.logo-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ev-f { flex-wrap: wrap; }
.ev-sigs { flex: 1 1 560px; flex-wrap: nowrap; }
.ev-sig { flex: 1 1 0; min-width: 0; }
.ev-sig b, .ev-at { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-acts { flex: 0 1 auto; margin-inline-start: auto; }
@media screen and (max-width: 760px) { .ev-sigs { flex-wrap: wrap; } .ev-sig { flex: 1 1 140px; } }
/* طباعة عرض القيد: دايمًا بالأعمدة (مش شكل الموبايل) */
.ev-print .ev-tbl td, .ev-print .ev-tbl th { font-size: 11.5px; padding: 5px 7px; }
.ev-print .table-wrap { overflow: visible !important; }
.ev-miss { color: #B91C1C; font-weight: 800; font-size: 12px; }
/* عرض القيد — ترتيب الأعمدة من اليمين: التاريخ، مستند رقم، رقم الحساب، اسم الحساب، مدين، دائن — والبيان تحت */
.ev-tbl .ev-c-dt { width: 96px; } .ev-tbl .ev-c-doc { width: 78px; } .ev-tbl .ev-c-code { width: 104px; }
.ev-tbl .ev-c-amt { width: 124px; } .ev-tbl .ev-c-go { width: 40px; }
.ev-tbl .ev-doc { color: var(--text-2); font-weight: 800; }
.ev-tbl .ev-nm b { font-size: 13.5px; font-weight: 900; }
.ev-tbl tr.ev-b td { padding: 0 10px 7px; }
.ev-bx { display: flex; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; }
.ev-byn { flex: 1 1 260px; min-width: 0; color: #4B4470; font-size: 12.5px; font-weight: 600; }
.ev-byn i { color: #B4A5F5; margin-inline-end: 6px; font-size: 13px; vertical-align: -1px; }
.ev-meta { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; margin-inline-start: auto; font-size: 11px; font-weight: 700; color: var(--text-2); }
.ev-meta em { font-style: normal; font-weight: 800; color: #9585E0; margin-inline-end: 4px; }
.ev-meta span + span { padding-inline-start: 12px; border-inline-start: 1px solid #E2DAFF; }
.ev-tbl tr.sel .ev-meta em, .ev-tbl tr.sel .ev-byn i { color: #fff !important; opacity: .8; }
/* التوقيعات: العنوان وجنبه الاسم، وتحتهم التاريخ والوقت — حجم صغير */
.ev-f { padding: 8px 12px; gap: 10px; }
.ev-sigs { flex: 0 1 auto; flex-wrap: wrap; gap: 8px; }
.ev-sig { flex: 0 0 auto; min-width: 0; padding: 4px 11px 5px; gap: 1px; border-radius: 9px; border-inline-start-width: 3px; }
.ev-sr { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.ev-sl { font-size: 11px; font-weight: 800; color: var(--text-3); }
.ev-sl::after { content: ':'; }
.ev-sig b { font-size: 13px; line-height: 1.3; }
.ev-at { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; line-height: 1.2; color: var(--text-2); }
.ev-at i { font-size: 12px; color: var(--text-3); }
@media screen and (max-width: 760px) {
  .ev-tbl tr.ev-l { grid-template-columns: auto auto 1fr; }
  .ev-tbl tr.ev-l td:nth-child(3) { display: block; }
  .ev-meta { margin-inline-start: 0; }
  .ev-sig { flex: 1 1 140px; }
}
.ev-print .ev-tbl td, .ev-print .ev-tbl th { font-size: 11.5px; padding: 5px 8px; }
.ev-print .ev-tbl tr.ev-b td { padding-top: 0; }
.ev-tbl td.n, .ev-tbl th.n { text-align: end; white-space: nowrap; }
.ev-tbl .ev-c-amt { width: 140px; }
/* عرض القيد: كل الخانات تبدأ من اليمين (الأرقام ltr فبنحدد right صريح) — وعناوين المدين والدائن في النص */
.ev-tbl td, .ev-tbl th { text-align: right; }
.ev-tbl td.n, .ev-tbl tfoot td.n { text-align: right; padding-inline-start: 14px; }
.ev-tbl thead th.n { text-align: center; }
.ev-tbl .ev-c-amt { width: 118px; }
.ev-tbl .ev-go { text-align: center; }
/* الطباعة: هوامش يمين وشمال صغيرة جدًا علشان سطر البيان ياخد العرض كله */
.ev-print { padding: 0 !important; }
.ev-print .ev { border-radius: 8px; }
.ev-print .ev-h, .ev-print .ev-f { padding-inline: 8px; }
.ev-print .ev-tbl td, .ev-print .ev-tbl th { padding-inline: 6px; }
/* طباعة كشف الحساب بنفس شكل «عرض القيد» */
.evs-acc { display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 5px 14px; border-radius: 12px; background: #fff; border: 1px solid #E2DAFF; max-width: 46%; }
.evs-acc span { font-family: var(--display); font-size: 20px; font-weight: 900; color: var(--violet-d); line-height: 1.1; }
.evs-acc b { font-size: 14px; font-weight: 900; color: #1E1450; }
.evs-acc em { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--text-3); }
.evs-kp { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid #E6DEFF; }
.evs-k { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 6px 10px; border-inline-start: 1px solid #E6DEFF; background: #FCFBFF; }
.evs-k:first-child { border-inline-start: 0; }
.evs-k span { font-size: 11px; font-weight: 800; color: var(--text-3); }
.evs-k b { font-size: 13.5px; font-weight: 900; color: #1E1450; }
.evs-k.dr b { color: var(--dr); } .evs-k.cr b { color: var(--cr); }
.evs-k.bal { background: #F1ECFF; } .evs-k.bal b { color: var(--violet-d); }
.evs-tbl tbody td { border-top: 1px solid #E9E4FF; font-weight: 700; vertical-align: top; }
.evs-tbl .c-no, .evs-tbl .c-doc { color: var(--text-2); font-weight: 800; white-space: nowrap; }
.evs-tbl .c-dt { color: #9F1239; font-weight: 900; white-space: nowrap; }
.evs-tbl .c-type { white-space: nowrap; font-size: 11.5px; }
.evs-tbl .c-type .badge, .evs-tbl .c-type .tbadge, .evs-tbl .badge { border: 0 !important; background: none !important; padding: 0 !important; color: var(--violet-d) !important; font-weight: 800; font-size: 11.5px; }
.evs-tbl .c-byn { color: #4B4470; font-weight: 600; width: 100%; }
.evs-tbl .c-m { color: var(--dr); font-weight: 900; } .evs-tbl .c-d { color: var(--cr); font-weight: 900; }
.evs-tbl .c-bal { color: #1E1450; font-weight: 900; white-space: nowrap; }
.evs-tbl .bal-side { font-size: 10px; font-weight: 800; margin-inline-start: 3px; }
.evs-tbl .bal-side.d { color: var(--dr); } .evs-tbl .bal-side.c { color: var(--cr); }
.evs-tbl tr.group-row td { background: #F1ECFF; color: #2A1B6E; font-weight: 900; border-top: 1px solid #DDD3FF; }
.evs-tbl tr.st-open td { background: #FAF8FF; color: #4B4470; }
.evs-tbl .stg-bl { font-size: 10px; color: var(--text-3); margin-inline-end: 4px; }
.evs-tbl tfoot td { padding: 8px 10px; font-weight: 900; background: linear-gradient(90deg, #EEE8FF, #F7F4FF); border-top: 2px solid var(--violet); color: #1E1450; }
.evs-tbl thead { display: table-header-group; }
.evs-tbl tr { break-inside: avoid; }
.evs-f { justify-content: flex-start; gap: 18px; font-size: 11.5px; color: var(--text-2); }
.evs-f b { color: #1E1450; } .evs-n { margin-inline-start: auto; font-weight: 800; }
.ev-print .evs-tbl td, .ev-print .evs-tbl th { padding: 4px 6px; font-size: 11px; }
/* طباعة موازين المراجعة بنفس الشكل */
.evr-t { flex-direction: row; align-items: center; gap: 8px; max-width: 55%; }
.evr-t i { font-size: 20px; color: var(--violet); }
.evr-t b { font-family: var(--display); font-size: 15px; font-weight: 900; color: #1E1450; line-height: 1.3; }
.ev-print .evr-t i { display: inline-block; }
.evs-k span em { display: block; font-style: normal; font-size: 9.5px; font-weight: 700; color: var(--text-3); }
.evr-tbl tbody td { font-weight: 700; color: #1E1450; }
.evr-tbl td.dr-col { color: var(--dr); } .evr-tbl td.cr-col { color: var(--cr); }
.evr-tbl tr.lv-g1 td { background: color-mix(in srgb, var(--violet) 26%, #fff) !important; color: #2E1F73 !important; font-weight: 900; }
.evr-tbl tr.lv-g1 td * { color: #2E1F73 !important; }
.evr-tbl tr.lv-g2 td { background: color-mix(in srgb, var(--violet) 12%, #fff); font-weight: 900; }
.evr-tbl tr.lv-g3 td { background: color-mix(in srgb, var(--violet) 5%, #fff); font-weight: 800; }
.evr-tbl tr.lv-leaf td { background: #fff; font-weight: 700; }
.evr-tbl a { color: inherit; text-decoration: none; border: 0; }
.evr-tbl td { white-space: nowrap; }
.evr-tbl td:not(.n) { white-space: normal; }
.evr-html { padding: 8px 10px; }
.ev-print .evr-html button, .ev-print .evr-html .btn, .ev-print .evr-html input[type=checkbox] { display: none !important; }
/* طباعة المستندات (سند قبض / صرف / إشعارات / إيداع / أمر صرف / طلب تحويل) بنفس شكل «عرض القيد» */
.evd .ev-co span { font-size: 12px; font-weight: 700; color: var(--text-2); }
.evd-ids { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--text-2); }
.evd-ids b { color: #1E1450; }
.evd-t { min-width: 120px; }
.evd-t span { font-family: var(--display); font-size: 15px; font-weight: 900; color: #1E1450; }
.evd-dt b { font-size: 16px; }
.evd-amt { display: flex; align-items: center; gap: 14px; padding: 9px 16px; background: linear-gradient(90deg, #F1ECFF, #FBFAFF); border-bottom: 1px solid #E6DEFF; flex-wrap: wrap; }
.evd-amt span { font-size: 12px; font-weight: 800; color: var(--text-3); }
.evd-amt b { font-family: var(--display); font-size: 24px; font-weight: 900; color: var(--violet-d); padding: 2px 16px; border: 2px solid var(--violet); border-radius: 10px; background: #fff; }
.evd-amt em { font-style: normal; font-size: 13.5px; font-weight: 800; color: #1E1450; }
.evd-kv { display: grid; grid-template-columns: 1fr 1fr; }
.evd-r { display: flex; align-items: baseline; gap: 10px; padding: 7px 14px; border-bottom: 1px dashed #E2DAFF; min-width: 0; }
.evd-r:nth-child(odd):not(.w) { border-inline-end: 1px dashed #E2DAFF; }
.evd-r.w { grid-column: 1 / -1; }
.evd-r span { flex: none; min-width: 110px; font-size: 12px; font-weight: 800; color: var(--text-3); }
.evd-r b { font-size: 13.5px; font-weight: 800; color: #1E1450; min-width: 0; }
.evd-tw { padding: 0; }
.evd-tbl { margin: 0 !important; }
.evd-tbl th, .evd-tbl td { border: 0 !important; text-align: right; }
.evd-tbl tbody td { border-top: 1px solid #E9E4FF !important; font-weight: 700; color: #1E1450; }
.evd-tbl tfoot td { font-weight: 900; background: linear-gradient(90deg, #EEE8FF, #F7F4FF); border-top: 2px solid var(--violet) !important; color: #1E1450; }
.evd .vp-approve { margin: 0; padding: 7px 14px; background: #F0FDF4; color: #166534; font-weight: 800; border-bottom: 1px solid #BBF7D0; }
.evd-signs { display: flex; gap: 14px; padding: 18px 16px 10px; }
.evd-signs > div { flex: 1; text-align: center; }
.evd-signs span { font-size: 12px; font-weight: 800; color: var(--text-2); }
.evd-signs i { display: block; height: 34px; border-bottom: 1px solid #8B7FD1; margin: 0 8px; }
.ev-print .evd-r { padding: 5px 10px; }
.ev-co .evd-ids b { font-family: inherit; font-size: 12px; font-weight: 800; white-space: normal; }

/* ================= البيانات الأساسية: القائمة بشكل التقارير + السجل الجديد صفحة واحدة ================= */
.md .stp-kp .md-kv { font-size: 16px; font-weight: 900; color: #1E1450; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.md .stp-kp .md-kv small { font-size: 12px; font-weight: 800; color: var(--text-2); }
.md-note { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 10px; padding: 8px 14px; border-radius: 12px; background: #F5F3FF; border: 1px solid #E2DAFF; color: #3B2A86; font-size: 13px; font-weight: 600; }
.md-note > i { font-size: 18px; color: var(--violet); flex: none; margin-top: 1px; }
.md-note > div { flex: 1; min-width: 0; }
.md-tbl thead th { white-space: nowrap; }
.md-tbl tbody td { vertical-align: middle; }
.md-code { display: inline-block; min-width: 38px; padding: 2px 10px; border-radius: 8px; background: var(--violet-50); color: var(--violet-d); font-weight: 900; text-align: center; border: 1px solid #E2DAFF; }
.md-name { font-weight: 900; color: #1E1450; }
.md-tbl tr.md-off td { color: var(--text-3); }
.md-tbl tr.md-off .md-name { text-decoration: line-through; text-decoration-color: rgba(220, 38, 38, .5); }
.md-tbl tr.sel td { background: #EEF2FF !important; box-shadow: inset 0 1px 0 #C7D2FE, inset 0 -1px 0 #C7D2FE; }
.md-tbl tr.md-flash td { animation: mdFlash 2.2s ease-out; }
@keyframes mdFlash { 0%, 35% { background: #DCFCE7; } 100% { background: transparent; } }
.md-act-h { width: 150px; }
.md-act { text-align: end; white-space: nowrap; }
.md-act .btn { margin-inline-start: 6px; }
.md-ed { opacity: .85; }
.md-tbl tr:hover .md-ed { opacity: 1; background: var(--violet-50); border-color: #D6CCFF; color: var(--violet-d); }
.md-empty { text-align: center; padding: 34px 10px !important; color: var(--text-3); }
.md-empty i { display: block; font-size: 34px; color: #C4B5FD; margin-bottom: 6px; }
.md-empty b { display: block; font-size: 15px; color: var(--text-2); }
.md-empty span { font-size: 12.5px; }
.md .stp-hint { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.md .stp-hint kbd, .mf kbd { font-family: inherit; font-size: 10.5px; font-weight: 800; padding: 1px 6px; border-radius: 5px; background: rgba(0, 0, 0, .06); border: 1px solid rgba(0, 0, 0, .12); margin-inline-start: 4px; }
.md-old { margin-inline-start: auto; }

/* صفحة السجل */
.mf { display: flex; flex-direction: column; gap: 10px; }
.mf-top { display: flex; align-items: center; gap: 14px; padding: 10px 16px; background: linear-gradient(100deg, #FBFAFF, #EFE9FF); border: 1px solid #E2DAFF; }
.mf-ic { width: 48px; height: 48px; flex: none; border-radius: 13px; display: grid; place-items: center; font-size: 24px; color: #fff; background: linear-gradient(135deg, #2A1B6E, #6A44E8); box-shadow: 0 6px 14px -6px rgba(60, 30, 160, .55); }
.mf-ic.new { background: linear-gradient(135deg, #1D4ED8, #60A5FA); }
.mf-tt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.mf-tt b { font-family: var(--display); font-size: 20px; font-weight: 900; color: #1E1450; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mf-tt span { font-size: 12.5px; font-weight: 800; color: var(--violet-d); }
.mf-meta { display: flex; flex-direction: column; gap: 2px; font-size: 12px; font-weight: 700; color: var(--text-2); }
.mf-meta i { color: var(--text-3); margin-inline-end: 4px; }
.mf-meta b { color: #1E1450; }
.mf-no b { font-size: 26px; }
.mf-body { display: grid; grid-template-columns: repeat(12, 1fr); gap: 10px; }
.mf-sec { grid-column: 1 / -1; padding: 0; overflow: hidden; }
.mf-body > .mf-status { grid-column: span 4; }
.mf-body > .mf-print { grid-column: span 8; }
.mf-body > .mf-print:last-child, .mf-body > .mf-print:nth-last-child(1) { grid-column: 1 / -1; }
.mf-body > .mf-print + .mf-status { grid-column: span 4; }
.mf-st { display: flex; align-items: center; gap: 7px; margin: 0; padding: 7px 14px; font-size: 13.5px; font-weight: 900; color: #fff; background: linear-gradient(90deg, #2A1F6B, #5B4BC4); }
.mf-st i { font-size: 16px; opacity: .9; }
.mf-acc .mf-st { background: linear-gradient(90deg, #0F766E, #14B8A6); }
.mf-print .mf-st { background: linear-gradient(90deg, #9A3412, #F97316); }
.mf-status .mf-st { background: linear-gradient(90deg, #334155, #64748B); }
.mf-multi .mf-st { background: linear-gradient(90deg, #1E40AF, #3B82F6); }
.mf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px 10px; padding: 10px 12px 12px; }
.mf-status .mf-grid { grid-template-columns: 1fr; }
.mf-grid > .mf-wide { grid-column: span 2; }
.mf-grid > .mf-full { grid-column: 1 / -1; }
/* العنوان جوه الخانة (زي فلاتر التقارير) */
.mf-grid > .field:not(.chk) { display: flex; flex-direction: row; align-items: stretch; gap: 0; min-height: 36px; border: 1px solid var(--line); border-radius: 10px; background: #F8F9FC; transition: border-color .12s, box-shadow .12s; position: relative; }
.mf-grid > .field:not(.chk):focus-within { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(132, 94, 255, .15); background: var(--surface); }
.mf-grid > .field:not(.chk) > label { flex: none; display: flex; align-items: center; gap: 3px; margin: 0; padding: 0 10px; max-width: 48%; font-size: 12px; font-weight: 800; color: var(--violet-d); background: var(--violet-50); border-inline-end: 1px solid #E2DAFF; border-radius: 0 9px 9px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[dir="ltr"] .mf-grid > .field:not(.chk) > label { border-radius: 9px 0 0 9px; }
.mf-grid > .field:not(.chk) > .input, .mf-grid > .field:not(.chk) > .select { flex: 1; min-width: 0; height: 34px !important; min-height: 34px !important; border: 0 !important; box-shadow: none !important; background: transparent !important; font-weight: 800; color: #1E1450; }
.mf-grid > .field:not(.chk) > textarea.input { height: auto !important; min-height: 60px !important; padding-top: 8px !important; }
.mf-grid > .field:not(.chk):has(textarea) > label { align-items: flex-start; padding-top: 9px; }
.mf-grid > .field:not(.chk) > .input[readonly] { color: var(--text-2); }
.mf-grid > .field:not(.chk) > .faint { position: absolute; inset-inline-end: 8px; bottom: -15px; font-size: 10.5px !important; white-space: nowrap; }
.mf-grid > .field:not(.chk):has(> .faint) { margin-bottom: 8px; }
.mf-grid > .field.chk { display: flex; align-items: center; min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #F8F9FC; font-size: 13px; font-weight: 800; color: #1E1450; }
.mf-grid > .field.chk input { width: 18px; height: 18px; accent-color: var(--violet); vertical-align: -4px; margin-inline-end: 6px; }
.mf-grid > .field.chk:has(input:checked) { background: #F0FDF4; border-color: #86EFAC; color: #166534; }
.mf-bar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(6px); border: 1px solid #E2DAFF; box-shadow: 0 -6px 18px -12px rgba(60, 30, 160, .35); }
.mf-save { min-width: 130px; font-size: 15px; }
:root[data-theme="dark"] .mf-top { background: var(--surface-2); border-color: var(--line); }
:root[data-theme="dark"] .mf-tt b, :root[data-theme="dark"] .md-name, :root[data-theme="dark"] .md .stp-kp .md-kv { color: #EDE9FF; }
:root[data-theme="dark"] .mf-grid > .field:not(.chk), :root[data-theme="dark"] .mf-grid > .field.chk { background: var(--surface-2); }
:root[data-theme="dark"] .mf-grid > .field:not(.chk) > .input, :root[data-theme="dark"] .mf-grid > .field:not(.chk) > .select, :root[data-theme="dark"] .mf-grid > .field.chk { color: #EDE9FF; }
:root[data-theme="dark"] .mf-bar { background: rgba(20, 16, 40, .9); border-color: var(--line); }
:root[data-theme="dark"] .md-note { background: var(--surface-2); border-color: var(--line); color: var(--text); }
@media screen and (max-width: 900px) {
  .mf-body > .mf-status, .mf-body > .mf-print, .mf-body > .mf-print + .mf-status { grid-column: 1 / -1; }
}
@media screen and (max-width: 760px) {
  .mf-top { flex-wrap: wrap; } .mf-meta { order: 5; flex-basis: 100%; flex-direction: row; gap: 12px; }
  .mf-grid { grid-template-columns: 1fr; } .mf-grid > .mf-wide { grid-column: 1 / -1; }
  .md-act-h { width: auto; } .md-ed { display: none; }
}
/* السجل في صفحة واحدة: 4 خانات في السطر، الملاحظات سطر واحد بيكبر، والعناوين خانتين جنب بعض */
.mf-grid { grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 7px 9px; padding: 8px 10px 10px; }
.mf-grid > .mf-full { grid-column: span 2; }
.mf-grid > .field:not(.chk) > textarea.input { min-height: 34px !important; padding-top: 7px !important; resize: vertical; }
.mf-grid > .field:not(.chk):has(textarea) > label { padding-top: 0; align-items: center; }
.mf-print .mf-grid { grid-template-columns: 1fr 1fr; }
.mf-print .mf-grid > .field { grid-column: auto !important; }
.mf-top { padding: 8px 14px; }
.mf-st { padding: 6px 12px; font-size: 13px; }
@media screen and (max-width: 760px) { .mf-grid > .mf-full { grid-column: 1 / -1; } .mf-print .mf-grid { grid-template-columns: 1fr; } }
.mf-grid { align-items: start; }
.mf-grid > .field:not(.chk) > textarea.input { height: 34px !important; }
/* شاشات تحديد صفة / فئة الحسابات بنفس الشكل */
.ag-flt { align-items: center; }
.ag-flt .ag-bbtn { height: 34px; white-space: nowrap; }
.ag-saved { font-size: 12px; font-weight: 800; color: var(--ok); }
.ag-tbl td .select, .ag-tbl td .input { height: 32px !important; font-weight: 700; border-radius: 8px; }
.ag-tbl td { padding-top: 4px; padding-bottom: 4px; }
.ag-flt > .field > .select { max-width: 230px; }
.ag-flt > .field { flex: 0 1 auto !important; }
/* الحسابات المساعدة: أقسام ملونة، كل قسم بعرض الصفحة */
.mf-c1 .mf-st { background: linear-gradient(90deg, #1E40AF, #3B82F6); }
.mf-c2 .mf-st { background: linear-gradient(90deg, #9A3412, #F97316); }
.mf-c3 .mf-st { background: linear-gradient(90deg, #0F766E, #14B8A6); }
.mf-c4 .mf-st { background: linear-gradient(90deg, #334155, #64748B); }
.mf-c5 .mf-st { background: linear-gradient(90deg, #86198F, #D946EF); }
/* خانات الحسابات (رقم — اسم) محتاجة عرض أكبر */
#sf .mf-grid, .mf-acc .mf-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.mf-grid > .field:not(.chk):has(> input[list]) > label { max-width: 42%; }
/* لو مفيش غير «البيانات الأساسية» و«الحالة»: جنب بعض */
.mf-body > .mf-main:has(+ .mf-status:last-child) { grid-column: span 9; }
.mf-body > .mf-main + .mf-status:last-child { grid-column: span 3; }
@media screen and (max-width: 900px) { .mf-body > .mf-main:has(+ .mf-status:last-child), .mf-body > .mf-main + .mf-status:last-child { grid-column: 1 / -1; } }
.mf-body > .mf-main:has(+ .mf-status:last-child) { grid-column: span 8; }
.mf-body > .mf-main + .mf-status:last-child { grid-column: span 4; }
.mf-status .mf-grid > .field:not(.chk) > label { max-width: 40%; }

/* ===== مثال «الخط الأكبر» على تعريف مراكز التكلفة فقط (cfg.big) — لو اتوافق عليه يتعمم على باقي البيانات الأساسية ===== */
.md-big .stp-acc .stp-name { font-size: 19px; }
.md-big .stp-acc .stp-path, .md-big .stp-acc .stp-tag { font-size: 13.5px; }
.md-big .stp-q-in .input { font-size: 14.5px !important; height: 36px !important; }
.md-big .stp-kp .k .kl { font-size: 14px; font-weight: 800; color: #3B3366; }
.md-big .stp-kp .md-kv { font-size: 19px; }
.md-big .stp-kp .md-kv small { font-size: 14px; }
.md-big .stp-kp .k i { font-size: 19px; }
.md-big .md-tbl thead th { font-size: 14.5px; font-weight: 800; padding-top: 11px; padding-bottom: 11px; }
.md-big .md-tbl tbody td { font-size: 15.5px; font-weight: 700; color: #1E1450; padding-top: 9px; padding-bottom: 9px; }
.md-big .md-code { font-size: 15px; padding: 3px 12px; min-width: 44px; }
.md-big .md-name { font-size: 16px; }
.md-big .md-tbl .badge { font-size: 13.5px; padding: 3px 12px; font-weight: 800; }
.md-big .md-act .btn { font-size: 14px; height: 34px; padding-inline: 12px; }
.md-big .stp-hint { font-size: 13.5px; }
.md-big .md-note { font-size: 14.5px; }
.md-big .ag-tbl td .select, .md-big .ag-tbl td .input { font-size: 14.5px !important; height: 36px !important; }
.md-big .filters > .field:not(.chk) > label { font-size: 13.5px; }
.md-big .filters > .field:not(.chk) .input, .md-big .filters > .field:not(.chk) .select { font-size: 14.5px; }
.mf-big .mf-top { padding: 12px 18px; }
.mf-big .mf-ic { width: 56px; height: 56px; font-size: 28px; }
.mf-big .mf-tt b { font-size: 25px; }
.mf-big .mf-tt span { font-size: 14.5px; }
.mf-big .mf-meta { font-size: 14px; gap: 4px; }
.mf-big .mf-no span { font-size: 13px; }
.mf-big .mf-no b { font-size: 30px; }
.mf-big .mf-top .ev-pill { font-size: 14px; padding: 6px 14px; }
.mf-big .mf-st { font-size: 15.5px; padding: 9px 14px; }
.mf-big .mf-st i { font-size: 19px; }
.mf-big .mf-grid { gap: 10px 12px; padding: 12px 14px 14px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.mf-big #sf .mf-grid, .mf-big .mf-acc .mf-grid { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.mf-big .mf-grid > .field:not(.chk) { min-height: 44px; border-radius: 11px; border-color: #CFC6F5; background: #fff; }
.mf-big .mf-grid > .field:not(.chk) > label { font-size: 14.5px; font-weight: 800; color: #2A1B6E; padding: 0 12px; background: #EDE8FF; }
.mf-big .mf-grid > .field:not(.chk) > .input, .mf-big .mf-grid > .field:not(.chk) > .select { height: 42px !important; min-height: 42px !important; font-size: 16px !important; font-weight: 800; color: #111 !important; padding-inline: 10px !important; }
.mf-big .mf-grid > .field:not(.chk) > textarea.input { height: 42px !important; min-height: 42px !important; padding-top: 10px !important; }
.mf-big .mf-grid > .field:not(.chk) > .input::placeholder { color: #8A84A8; font-weight: 600; }
.mf-big .mf-grid > .field.chk { min-height: 44px; font-size: 15px; background: #fff; border-color: #CFC6F5; }
.mf-big .mf-grid > .field.chk input { width: 20px; height: 20px; }
.mf-big .mf-grid > .field:not(.chk) > .faint { font-size: 12px !important; bottom: -17px; }
.mf-big .mf-bar { padding: 12px 16px; gap: 12px; }
.mf-big .mf-bar .btn { font-size: 15.5px; height: 44px; padding-inline: 18px; }
.mf-big .mf-save { min-width: 150px; font-size: 17px !important; }
.mf-big kbd { font-size: 12px; }
/* تنبيه حجم الشاشة لو مش 100% */
#zoom-badge { position: fixed; bottom: 48px; inset-inline-start: 10px; z-index: 9999; display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid #FB923C; background: #FFF7ED; color: #9A3412; font: 800 13px/1.2 var(--font, inherit); cursor: pointer; box-shadow: 0 6px 16px -8px rgba(154, 52, 18, .5); }
#zoom-badge b { font-size: 14px; }
#zoom-badge:hover { background: #FFEDD5; }
@media print { #zoom-badge { display: none; } }

/* حجم البرنامج (أزرار − / + في الرئيسية) بيتعمل بـ zoom على الصفحة، و100vh بيتصغّر معاه —
   فالقايمة الجانبية والصفحة نفسها لازم يتقسموا على النسبة (--zf) علشان يوصلوا لآخر الشاشة */
.app { min-height: calc(100vh / var(--zf, 1)); }
@media (min-width: 1025px) { .sidebar { height: calc(100vh / var(--zf, 1)); } }
.modal .mb { max-height: calc(60vh / var(--zf, 1)); }
/* نسبة تكبير المتصفح جنب نسبة البرنامج (الرئيسية) */
.zoom-lbl { font-size: 12px; font-weight: 800; color: var(--text-2); margin-inline-end: 4px; align-self: center; }
.bz-chip { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 12px; border-radius: 10px; font-size: 13px; font-weight: 800; border: 1px solid; white-space: nowrap; cursor: help; }
.bz-chip i { font-size: 16px; }
.bz-chip b { font-size: 14px; }
.bz-chip.ok { background: #F0FDF4; border-color: #86EFAC; color: #166534; }
.bz-chip.off { background: #FFF7ED; border-color: #FB923C; color: #9A3412; }
.bz-chip em { font-style: normal; font-size: 11px; font-weight: 900; padding: 1px 6px; border-radius: 6px; background: #FFEDD5; border: 1px solid #FDBA74; }
@media (max-width: 720px) { .zoom-lbl { display: none; } }
.bz-chip { cursor: pointer; }
.bz-chip em.mine { background: #DCFCE7; border-color: #86EFAC; color: #166534; }

/* ===== شاشة الإدخال الاحترافية (cfg.layout) — مثال على تعريف مراكز التكلفة ===== */
.mfp { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; align-items: start; }
.mfp-main, .mfp-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.mfp-sec { padding: 0; overflow: hidden; border: 1px solid #E4E0F5; border-top: 3px solid var(--a); border-radius: 14px; background: #fff; box-shadow: 0 1px 2px rgba(30, 20, 80, .04), 0 10px 24px -18px rgba(30, 20, 80, .35); }
.mfp-sh { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid #EEEBF8; background: #FCFBFF; }
.mfp-si { width: 38px; height: 38px; flex: none; border-radius: 11px; display: grid; place-items: center; font-size: 20px; color: var(--a); background: color-mix(in srgb, var(--a) 12%, #fff); }
.mfp-sh b { display: block; font-family: var(--display); font-size: 17px; font-weight: 900; color: #1E1450; line-height: 1.25; }
.mfp-sh span { display: block; font-size: 13px; font-weight: 600; color: #6B6489; }
.mfp-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px 18px; padding: 18px; }
.mfp-cell { grid-column: span var(--sp, 6); min-width: 0; }
.mfp-cell[hidden] { display: none; }
.mfp .field { display: flex; flex-direction: column; gap: 7px; margin: 0; }
.mfp .field > label { font-size: 14.5px; font-weight: 800; color: #2A2550; margin: 0; display: flex; align-items: center; gap: 4px; }
.mfp .field > .input, .mfp .field > .select { height: 46px !important; min-height: 46px; font-size: 16px; font-weight: 700; color: #111; border: 1.5px solid #D5D0EC; border-radius: 11px; background: #fff; padding: 0 14px; box-shadow: none; transition: border-color .12s, box-shadow .12s; }
.mfp .field > .input:hover, .mfp .field > .select:hover { border-color: #B9B0E6; }
.mfp .field > .input:focus, .mfp .field > .select:focus { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(132, 94, 255, .16); outline: none; }
.mfp .field > .input::placeholder { color: #A29DBA; font-weight: 500; }
.mfp .field > .input[readonly] { background: #F5F3FF; color: var(--violet-d); font-weight: 900; border-style: dashed; }
.mfp .field > .faint { font-size: 12.5px !important; color: #7C7699; }
.mfp .field > textarea.input { height: 90px !important; padding-top: 10px; }
.mfp .field.chk { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 14px; border: 1.5px solid #D5D0EC; border-radius: 11px; background: #fff; cursor: pointer; }
.mfp .field.chk > span { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 800; color: #2A2550; }
.mfp .field.chk input { width: 22px; height: 22px; accent-color: #DC2626; margin: 0; }
.mfp .field.chk:has(input:checked) { border-color: #FCA5A5; background: #FEF2F2; }
.mfp .field.chk:has(input:checked) > span { color: #B91C1C; }
.mfp-kv { display: flex; flex-direction: column; padding: 6px 18px 12px; }
.mfp-kv > div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 9px 0; border-bottom: 1px dashed #E7E3F6; }
.mfp-kv > div:last-child { border-bottom: 0; }
.mfp-kv span { font-size: 13.5px; font-weight: 700; color: #6B6489; }
.mfp-kv b { font-size: 15px; font-weight: 900; color: #1E1450; }
.mf:has(.mfp) .mf-top { padding: 12px 18px; }
.mf:has(.mfp) .mf-tt b { font-size: 24px; }
.mf:has(.mfp) .mf-tt span { font-size: 14px; }
.mf:has(.mfp) .mf-no b { font-size: 30px; }
.mf:has(.mfp) .mf-bar .btn { height: 46px; font-size: 16px; padding-inline: 20px; }
.mf:has(.mfp) .mf-save { min-width: 160px; }
:root[data-theme="dark"] .mfp-sec, :root[data-theme="dark"] .mfp .field > .input, :root[data-theme="dark"] .mfp .field > .select, :root[data-theme="dark"] .mfp .field.chk { background: var(--surface); border-color: var(--line); color: var(--text); }
:root[data-theme="dark"] .mfp-sh { background: var(--surface-2); border-color: var(--line); }
:root[data-theme="dark"] .mfp-sh b, :root[data-theme="dark"] .mfp .field > label, :root[data-theme="dark"] .mfp-kv b { color: #EDE9FF; }
@media screen and (max-width: 1100px) { .mfp { grid-template-columns: 1fr; } }
@media screen and (max-width: 760px) { .mfp-cell { grid-column: 1 / -1; } .mfp-grid { padding: 14px; gap: 12px; } }
.mfp-sh { padding: 10px 16px; }
.mfp-grid { gap: 14px 16px; padding: 14px 16px 16px; }
/* عناوين الخانات أوضح وأتقل (طلب المالك) + لون أيقونة القسم */
.mfp .field > label { font-family: var(--display); font-size: 16px; font-weight: 900; color: #1E1450; letter-spacing: 0; }
.mfp .field > label span[style*="bad"] { font-size: 17px; }
.mfp .field > .input, .mfp .field > .select { font-size: 17px; font-weight: 800; }
.mfp .field.chk > span { font-family: var(--display); font-size: 16px; font-weight: 900; }
.mfp-sh .mfp-si { display: grid; color: var(--a); font-size: 20px; }
.mfp-sh b { font-size: 18px; }
.mfp-sh > div > span { font-size: 13.5px; }
.mfp-kv span { font-size: 14.5px; font-weight: 800; }
.mfp-kv b { font-size: 16px; }
.mfp .field > label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* شاشة إدخال من غير عمود جانبي (مفيش حالة ولا بيانات تسجيل) */
.mfp.mfp-one { grid-template-columns: minmax(0, 1fr); max-width: 1100px; }
.mfp.mfp-sys { max-width: none; }
.mfp-sys .mfp-cell { min-width: 0; }
@media screen and (max-width: 1300px) { .mfp-sys .mfp-cell { grid-column: span 4; } }
@media screen and (max-width: 900px) { .mfp-sys .mfp-cell { grid-column: span 6; } }
@media screen and (max-width: 760px) { .mfp-sys .mfp-cell { grid-column: 1 / -1; } }
.mfp .field.chk > span { line-height: 1.45; padding: 8px 0; font-size: 15px; }

/* ===== إشعار مدين / دائن بالشكل المعتمد (mfp) ===== */
.vch-pro-head { margin-bottom: 14px; }
.vch-pro-head > .card-head { border-radius: 14px; }
.mfp.vch-pro { margin-bottom: 14px; }
.vch-pro .field.chk { margin-top: 29px; }
.vch-pro .field.chk input { accent-color: #16A34A; }
.vch-pro .field.chk:has(input:checked) { border-color: #86EFAC; background: #F0FDF4; }
.vch-pro .field.chk:has(input:checked) > span { color: #15803D; }
.vch-sum .vch-totals { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 6px 18px 12px; border: 0; border-radius: 0; background: none; }
.vch-sum .vch-totals .t { flex-direction: row; justify-content: space-between; align-items: baseline; gap: 10px; padding: 10px 0; border-bottom: 1px dashed #E7E3F6; }
.vch-sum .vch-totals .t:last-child { border-bottom: 0; }
.vch-sum .vch-totals .t .l { font-size: 14px; font-weight: 800; color: #6B6489; }
.vch-sum .vch-totals .t .v { font-size: 19px; font-weight: 900; color: #1E1450; font-family: var(--display); }
.vch-sum .vch-totals .t:nth-child(3) { margin: 4px -10px 0; padding: 12px 10px; border: 0; border-radius: 11px; background: #F0FDF4; }
.vch-sum .vch-totals .t:nth-child(3) .l { color: #15803D; font-size: 15px; }
.vch-sum .vch-totals .t:nth-child(3) .v { color: #15803D; font-size: 24px; }
.vch-sum .vch-totals .t .faint { font-size: 13px; font-weight: 600; text-align: left; }
.vch-sum .vch-words { margin: 0 18px 14px; padding: 10px 12px; border-radius: 11px; background: #F5F3FF; color: var(--violet-d); font-size: 14px; font-weight: 800; line-height: 1.6; }
:root[data-theme="dark"] .vch-sum .vch-totals .t .v { color: #EDE9FF; }
@media screen and (max-width: 760px) { .vch-pro .field.chk { margin-top: 0; } }

/* إجمالي السند في الملخص الجانبي + السطور في سندات المذكورين */
.vch-sum .vch-totals .t:nth-child(3):not(.tot) { margin: 0; padding: 10px 0; border-radius: 0; background: none; border-bottom: 1px dashed #E7E3F6; }
.vch-sum .vch-totals .t:nth-child(3):not(.tot) .l { color: #6B6489; font-size: 14px; }
.vch-sum .vch-totals .t:nth-child(3):not(.tot) .v { color: #1E1450; font-size: 19px; }
.vch-sum .vch-totals .t.tot { margin: 4px -10px; padding: 12px 10px; border: 0; border-radius: 11px; background: #F0FDF4; }
.vch-sum .vch-totals .t.tot .l { color: #15803D; font-size: 15px; }
.vch-sum .vch-totals .t.tot .v { color: #15803D; font-size: 24px; }
.mfp-sh > .btn { margin-inline-start: auto; }
.vch-lsec { margin-bottom: 14px; }
.vch-lsec .vch-lines { padding: 14px 18px; gap: 12px; }
.vch-lsec .vch-line { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px 14px; padding: 14px; border: 1.5px solid #E4E0F5; border-radius: 12px; background: #FCFBFF; padding-left: 50px; }
.vch-lsec .vch-line > .field { grid-column: span 3; display: flex; flex-direction: column; gap: 6px; margin: 0; }
.vch-lsec .vch-line > .vl-acc { grid-column: span 5; }
.vch-lsec .vch-line > .vl-wide { grid-column: span 6; }
.vch-lsec .vch-line > .vl-sm { grid-column: span 2; }
.vch-lsec .vch-line > .field > label { font-size: 14px; font-weight: 800; color: #2A2550; }
.vch-lsec .vch-line > .field > .input { height: 44px !important; font-size: 15.5px; font-weight: 700; border: 1.5px solid #D5D0EC; border-radius: 10px; background: #fff; }
.vch-lsec .vch-line > .field > .input:focus { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(132, 94, 255, .16); outline: none; }
.vch-lsec .vch-line > .field > .vl-calc { background: #F0FDF4; color: #15803D; font-weight: 900; }
.vch-lsec .vch-line .vl-del { position: absolute; top: 8px; left: 8px; color: #DC2626; }
@media screen and (max-width: 760px) { .vch-lsec .vch-line > .field { grid-column: 1 / -1 !important; } }

/* علامة الاختيار في شاشات الإدخال: إطار واحد بس (كان فيه إطار جوه إطار) */
.mfp .field.chk > span { height: auto; padding: 0; border: 0; background: none !important; }
/* ===== السندات مضغوطة: كل السند في صفحة مرئية واحدة ===== */
.vch-pro-head { margin-bottom: 8px; }
.vch-pro-head > .card-head { padding: 6px 14px; min-height: 0; }
.vch-pro-head > .card-head .card-title { font-size: 16px; }
.mfp.vch-pro { gap: 10px; margin-bottom: 10px; }
.vch-pro .mfp-main, .vch-pro .mfp-side { gap: 8px; }
.vch-pro .mfp-sec, .vch-lsec { border-radius: 12px; }
.vch-pro .mfp-sh, .vch-lsec .mfp-sh { padding: 6px 14px; gap: 10px; }
.vch-pro .mfp-sh > div, .vch-lsec .mfp-sh > div { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.vch-pro .mfp-si, .vch-lsec .mfp-si { width: 28px; height: 28px; border-radius: 8px; font-size: 16px; }
.vch-pro .mfp-sh b, .vch-lsec .mfp-sh b { font-size: 15.5px; }
.vch-pro .mfp-sh span:not(.mfp-si), .vch-lsec .mfp-sh span:not(.mfp-si) { font-size: 12px; }
.vch-pro .mfp-grid { gap: 6px 12px; padding: 8px 14px 10px; }
.vch-pro .field { gap: 3px; }
.vch-pro .field > label { font-size: 13.5px; }
.mfp.vch-pro .field > .input, .mfp.vch-pro .field > .select { height: 38px !important; min-height: 38px; font-size: 15px; border-radius: 9px; padding: 0 12px; }
.mfp.vch-pro .field > textarea.input { height: 60px !important; }
.vch-pro .field.chk { min-height: 38px; margin-top: 22px; padding: 0 12px; border-radius: 9px; }
.vch-pro .field.chk > span { font-size: 14px; }
.vch-pro .field.chk input { width: 19px; height: 19px; }
.vch-pro .vs-more .field > label { display: none; }
.vch-pro .vch-sum .vch-totals { padding: 2px 14px 8px; }
.vch-pro .vch-sum .vch-totals .t { padding: 7px 0; }
.vch-pro .vch-sum .vch-totals .t .v { font-size: 17px; }
.vch-pro .vch-sum .vch-totals .t.tot { margin: 3px -8px; padding: 8px; }
.vch-pro .vch-sum .vch-totals .t.tot .v { font-size: 21px; }
.vch-pro .vch-sum .vch-words { margin: 0 14px 10px; padding: 7px 10px; font-size: 13px; }
.vch-pro .mfp-kv { padding: 2px 14px 8px; }
.vch-pro .mfp-kv > div { padding: 6px 0; }
.vch-lsec { margin-bottom: 10px; }
.vch-lsec .vch-lines { padding: 8px 14px; gap: 8px; }
.vch-lsec .vch-line { gap: 6px 12px; padding: 8px 10px; padding-left: 46px; }
.vch-lsec .vch-line > .field { gap: 3px; }
.vch-lsec .vch-line > .field > label { font-size: 13px; }
.vch-lsec .vch-line > .field > .input { height: 36px !important; font-size: 14.5px; border-radius: 9px; }
.vch-lsec .vch-line + .vch-line > .field > label { display: none; }
@media screen and (max-width: 760px) { .vch-pro .field.chk { margin-top: 0; } .vch-lsec .vch-line + .vch-line > .field > label { display: block; } }
.vch-pro .field.chk > span { white-space: nowrap; }

/* خانة البيان في السندات: سطر لوحده بعرض الصفحة، بتكبر مع الكلام، وعداد 200 حرف */
.mfp.vch-pro .vch-byn .field > textarea.input { height: 64px !important; min-height: 64px; resize: none; overflow: hidden; padding: 9px 14px; line-height: 1.6; font-size: 15.5px; font-weight: 700; background: #FDFCFF; border-color: #CFC7EE; }
.mfp.vch-pro .vch-byn .field > textarea.input:focus { background: #fff; }
.vch-byn .field > label { justify-content: space-between; }
.vch-cnt { margin-inline-start: auto; font-size: 12px; font-weight: 700; color: #8D87A8; background: #F3F1FA; padding: 1px 8px; border-radius: 999px; }
.vch-cnt.full { color: #B91C1C; background: #FEE2E2; }

/* ===== عرض السند (زي البرنامج القديم): لوحة يمين + السند في النص + المرفق شمال ===== */
.vd { display: grid; grid-template-columns: 260px minmax(0, 1fr) 330px; gap: 12px; align-items: start; }
.vd-side, .vd-att { position: sticky; top: 8px; padding: 0; overflow: hidden; border: 1px solid #E4E0F5; border-radius: 14px; }
.vd-side { display: flex; flex-direction: column; gap: 8px; padding-bottom: 12px; }
.vd-title { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: linear-gradient(135deg, var(--sh1-a, #3B1F8F), var(--sh1-b, #6D4AE8)); color: #fff; }
.vd-title i { font-size: 20px; } .vd-title b { font-family: var(--display); font-size: 16px; font-weight: 900; }
.vd-no { display: flex; align-items: center; gap: 6px; padding: 4px 12px 0; }
.vd-no .input { flex: 1; min-width: 0; height: 46px !important; text-align: center; font-size: 22px; font-weight: 900; color: var(--violet-d); border: 2px solid #CFC7EE; border-radius: 11px; }
.vd-no .input:focus { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(132, 94, 255, .16); outline: none; }
.vd-arr { flex: none; width: 40px; height: 46px; border: 1px solid #BBF7D0; border-radius: 11px; background: #F0FDF4; color: #16A34A; font-size: 22px; cursor: pointer; display: grid; place-items: center; }
.vd-arr:hover { background: #DCFCE7; }
.vd-hint { padding: 0 14px; font-size: 12.5px; font-weight: 700; color: #DC2626; text-align: center; }
.vd-kd { margin: 0 12px; height: 38px; justify-content: center; font-weight: 800; }
.vd-kd.on { background: var(--violet-50); border-color: var(--violet); color: var(--violet-d); }
.vd-st { margin: 0 12px; border: 1px solid #E7E3F6; border-radius: 11px; overflow: hidden; }
.vd-sr { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 12px; border-bottom: 1px dashed #E7E3F6; }
.vd-sr:last-child { border-bottom: 0; }
.vd-sr span { font-size: 13.5px; font-weight: 800; color: #6B6489; }
.vd-sr b { font-size: 16px; font-weight: 900; color: #1E1450; }
.vd-sr.ok { background: #F0FDF4; } .vd-sr.ok b, .vd-sr.ok span { color: #15803D; }
.vd-sr.bad { background: #FEF2F2; } .vd-sr.bad b, .vd-sr.bad span { color: #B91C1C; }
.vd-sr.go { cursor: pointer; } .vd-sr.go:hover { background: #F5F3FF; } .vd-sr.go b { color: var(--violet-d); text-decoration: underline dotted; }
.vd-sr.cnt b { font-size: 14px; color: #6B6489; }
.vd-sh { display: flex; align-items: center; gap: 6px; padding: 4px 14px 0; font-size: 14px; color: #2A2550; } .vd-sh b { font-weight: 900; } .vd-sh span { color: #6B6489; font-weight: 700; }
.vd-al { margin: 0 12px; display: flex; flex-direction: column; gap: 4px; max-height: 190px; overflow: auto; }
.vd-ai { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid #E7E3F6; border-radius: 9px; background: #fff; cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 800; color: #2A2550; text-align: right; }
.vd-ai em { margin-inline-start: auto; font-style: normal; font-size: 11.5px; color: #8D87A8; }
.vd-ai.on, .vd-ai:hover { border-color: var(--violet); background: var(--violet-50); color: var(--violet-d); }
.vd-none { font-size: 12.5px; color: #8D87A8; padding: 2px 2px 0; }
.vd-up { margin: 0 12px; } .vd-up .btn { width: 100%; justify-content: center; height: 36px; }
.vd-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 4px 12px 0; } .vd-acts .btn { justify-content: center; height: 38px; }
.vd-rp { margin: 0 12px; height: 40px; justify-content: center; font-weight: 900; background: #FFF7ED; border-color: #FDBA74; color: #C2410C; }
.vd-rp:hover { background: #FFEDD5; }
.vd-doc { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.vd-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.vd-paper { margin: 0 auto; width: 100%; max-width: 860px; padding: 18px 22px; border-radius: 6px; background: #fff; box-shadow: 0 1px 3px rgba(30, 20, 80, .08), 0 18px 40px -24px rgba(30, 20, 80, .45); border: 1px solid #ECE9F6; }
.vd-missing { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 70px 20px; color: #8D87A8; text-align: center; }
.vd-missing i { font-size: 48px; color: #C4BEE0; } .vd-missing h2 { margin: 0; font-size: 18px; color: #4B4570; }
.vd-kdbox { width: 100%; max-width: 860px; margin: 0 auto; }
.vd-ah { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-bottom: 1px solid #EEEBF8; background: #FCFBFF; color: #2A2550; }
.vd-ah b { font-weight: 900; font-size: 14px; } .vd-ah .btn:first-of-type { margin-inline-start: auto; }
.vd-pv { padding: 8px; background: #F6F5FB; min-height: 420px; max-height: calc(100vh / var(--zf, 1) - 150px); overflow: auto; display: flex; align-items: flex-start; justify-content: center; }
.vd-pv img { max-width: 100%; height: auto; border-radius: 6px; box-shadow: 0 4px 14px rgba(0, 0, 0, .12); background: #fff; }
.vd-frame { width: 100%; height: calc(100vh / var(--zf, 1) - 170px); min-height: 420px; border: 0; background: #fff; }
.vd-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 420px; color: #A29DBA; font-weight: 700; }
.vd-empty i { font-size: 46px; color: #D6D1EA; }
:root[data-theme="dark"] .vd-side, :root[data-theme="dark"] .vd-att { background: var(--surface); border-color: var(--line); }
@media screen and (max-width: 1350px) { .vd { grid-template-columns: 250px minmax(0, 1fr); } .vd-att { grid-column: 1 / -1; position: static; } }
@media screen and (max-width: 900px) { .vd { grid-template-columns: 1fr; } .vd-side { position: static; } .vd-paper { padding: 12px; } }
.vd-up .arc-n { display: none; }

/* المرفقات في شاشة تحرير السند */
.vch-attb { padding: 10px 14px 12px; }
.vch-attb .btn { width: 100%; justify-content: center; height: 40px; font-weight: 800; }
.vch-attb .btn.has { border-color: #93C5FD; background: #EFF6FF; color: #1D4ED8; }
.vch-attb p { margin: 6px 0 0; font-size: 12.5px; font-weight: 700; color: #8D87A8; text-align: center; }

/* المرفقات على الجنب في شاشة السند (قبل وبعد الحفظ) */
.vch-attb .vch-attadd { width: 100%; justify-content: center; height: 40px; font-weight: 800; cursor: pointer; border-color: #93C5FD; background: #EFF6FF; color: #1D4ED8; }
.vch-attb .vch-attadd:hover { background: #DBEAFE; }
.vch-thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.vch-th { position: relative; aspect-ratio: 3 / 4; border: 1.5px solid #E4E0F5; border-radius: 10px; overflow: hidden; background: #F6F5FB; cursor: zoom-in; display: grid; place-items: center; }
.vch-th:hover { border-color: var(--violet); }
.vch-th img { width: 100%; height: 100%; object-fit: cover; }
.vch-th.wait { border-style: dashed; border-color: #93C5FD; }
.vch-th em { position: absolute; inset: auto 0 0 0; padding: 2px 4px; font-style: normal; font-size: 10.5px; font-weight: 800; text-align: center; color: #1D4ED8; background: rgba(239, 246, 255, .92); }
.vch-pdf { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; font-weight: 900; color: #B91C1C; } .vch-pdf i { font-size: 30px; }
.vch-thx { position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: rgba(220, 38, 38, .92); color: #fff; display: grid; place-items: center; cursor: pointer; font-size: 14px; }

/* «آخر المستندات» تحت السند: عناوين الأعمدة برتقالي (نفس شريط التحديث) وخط أكبر — يكسر حدة البنفسجي/الأزرق */
#vrecent .vch-card > .card-head { background: linear-gradient(120deg, #FFF7ED, #FFEDD5) !important; border-bottom: 1px solid #FED7AA !important; }
#vrecent .vch-card > .card-head .card-title { color: #9A3412 !important; font-size: 19px; }
#vrecent .tbl thead th { background: #F97316 !important; color: #fff !important; font-size: 15px !important; font-weight: 900 !important; padding-block: 10px !important; border-color: #FB923C !important; }
#vrecent .tbl tbody td { font-size: 14.5px; font-weight: 700; padding-block: 9px; }
#vrecent .tbl tbody tr.clickable:hover td { background: #FFF7ED; }

/* عرض السند: كل المرفقات تحت بعض في كروت بشكل 3D */
.vd-att { max-height: calc(100vh / var(--zf, 1) - 24px); display: flex; flex-direction: column; }
.vd-ah .vd-cnt { margin-inline-start: auto; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--violet); color: #fff; font-size: 12.5px; font-weight: 900; display: grid; place-items: center; }
.vd-cards { flex: 1; overflow: auto; padding: 14px 14px 18px; display: flex; flex-direction: column; gap: 18px; background: radial-gradient(circle at 50% 0, #F3F0FF, #EEF0F7 70%); perspective: 1100px; }
.vd-card { margin: 0; flex: none; border-radius: 14px; background: #fff; border: 1px solid #E4E0F5; overflow: hidden; transform: rotateX(4deg); transform-origin: 50% 0; transition: transform .25s ease, box-shadow .25s ease, border-color .2s;
  box-shadow: 0 2px 4px rgba(30, 20, 80, .06), 0 14px 28px -12px rgba(30, 20, 80, .35), 0 30px 50px -30px rgba(30, 20, 80, .45); }
.vd-card:hover, .vd-card.on { transform: rotateX(0) translateY(-3px) scale(1.01); border-color: var(--violet); box-shadow: 0 0 0 3px rgba(132, 94, 255, .18), 0 22px 40px -14px rgba(60, 30, 160, .45); }
.vd-card figcaption { display: flex; align-items: center; gap: 6px; padding: 7px 10px; background: linear-gradient(120deg, #FCFBFF, #F3F0FF); border-bottom: 1px solid #EEEBF8; }
.vd-card figcaption b { font-size: 13.5px; font-weight: 900; color: #2A2550; }
.vd-card figcaption em { font-style: normal; font-size: 11.5px; color: #8D87A8; margin-inline-start: auto; }
.vd-badge { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: linear-gradient(135deg, #6D4AE8, #A855F7); color: #fff; font-size: 12px; font-weight: 900; box-shadow: 0 3px 8px -2px rgba(109, 74, 232, .6); }
.vd-ib { width: 28px; height: 28px; border: 1px solid #E4E0F5; border-radius: 8px; background: #fff; color: #4B4570; display: grid; place-items: center; cursor: pointer; text-decoration: none; }
.vd-ib:hover { border-color: var(--violet); color: var(--violet-d); background: var(--violet-50); }
.vd-shot { padding: 10px; background: repeating-conic-gradient(#F7F6FB 0 25%, #FFFFFF 0 50%) 0 0 / 18px 18px; cursor: zoom-in; display: flex; justify-content: center; }
.vd-shot img { display: block; width: 100%; height: auto; max-height: 520px; object-fit: contain; border-radius: 6px; background: #fff; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .25); }
.vd-shot .vd-frame { height: 480px; min-height: 0; }

/* تصميم الميزانية: التعديل في الجدول نفسه */
.bsd-tbl td { padding-top: 5px; padding-bottom: 5px; }
.bsd-tbl .bsd-in { height: 34px; min-height: 0; padding: 0 10px; font-weight: 800; width: 100%; min-width: 120px; }
.bsd-tbl .bsd-n { width: 90px; min-width: 0; text-align: center; }
.bsd-tbl tr.bsd-dirty td:first-child { box-shadow: inset -5px 0 0 #F97316; }
.bsd-tbl tr.bsd-dirty .md-name::after { content: '  • متعدّل'; color: #EA580C; font-size: 12px; }
/* ألوان شاشة البوربيلدر (dw_adel_mezania_new): البيان أبيض/أخضر · مرفق والتصنيف أصفر · الترتيب أزرق · المجموعة بمبي */
.bsd-tbl thead th { vertical-align: middle; text-align: center; color: #1F1A3D !important; font-weight: 900; line-height: 1.25; }
.bsd-tbl thead th small { display: block; font-size: 11px; font-weight: 700; opacity: .8; }
.bsd-tbl thead th.bsd-h-name { background: linear-gradient(180deg, #23B936, #11A624) !important; color: #fff !important; }
.bsd-tbl thead th.bsd-h-att, .bsd-tbl thead th.bsd-h-cls { background: #FADA7A !important; }
.bsd-tbl thead th.bsd-h-ser { background: #AAC2FD !important; }
.bsd-tbl thead th.bsd-h-grp { background: #EFAFE9 !important; }
.bsd-tbl td.bsd-c-code, .bsd-tbl td.bsd-c-name { background: linear-gradient(180deg, #FFFFFF 55%, #E6F6E8) !important; }
.bsd-tbl td.bsd-c-att, .bsd-tbl td.bsd-c-cls { background: #FADA7A !important; }
.bsd-tbl td.bsd-c-ser { background: #AAC2FD !important; }
.bsd-tbl td.bsd-c-grp { background: #EFAFE9 !important; }
.bsd-tbl td { border-color: rgba(31, 26, 61, .12) !important; }
.bsd-tbl td .bsd-in { background: rgba(255, 255, 255, .55); border-color: rgba(31, 26, 61, .18); color: #1F1A3D; }
.bsd-tbl td .bsd-in:focus { background: #fff; }
.bsd-tbl tbody tr:hover td { filter: brightness(.97); }
.bsd-warn { color: #DC2626; margin-inline-start: 6px; font-size: 16px; vertical-align: -2px; }
.bsd-tbl tr.bsd-nomez td.bsd-c-code, .bsd-tbl tr.bsd-nomez td.bsd-c-name { background: #FEE2E2 !important; }
/* صندوق حالة MEZ */
.bsd-mez { display: flex; align-items: flex-start; gap: 12px; padding: 10px 14px; border-radius: 12px; border: 1px solid; margin-bottom: 10px; }
.bsd-mez > i { font-size: 22px; margin-top: 2px; }
.bsd-mez > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.bsd-mez > div > b { font-size: 14px; font-weight: 900; }
.bsd-mez.ok { background: #F0FDF4; border-color: #BBF7D0; color: #166534; }
.bsd-mez.bad { background: #FEF2F2; border-color: #FECACA; color: #991B1B; }
.bsd-mez .btn { flex: none; align-self: center; }
.bsd-mez-l { display: flex; flex-wrap: wrap; gap: 5px; max-height: 64px; overflow: auto; }
.bsd-mez-l span { padding: 1px 8px; border-radius: 999px; background: #fff; border: 1px solid #FECACA; font-size: 12px; font-weight: 800; }
.bsd-mez-l em { font-style: normal; font-weight: 600; color: #7F1D1D; }
.bsd-cnt:empty { display: none; }

/* تعريف الحسابات: «المستويات الأعلى» غير محددة */
.acc-nofath { color: #DC2626; font-weight: 900; }
.acc-list td.c-lvl select { min-width: 150px; height: 32px; }

.bsd-cls { display: inline-flex; flex-direction: column; font-weight: 900; color: #1F1A3D; padding: 2px 6px; }
.bsd-cls em { font-style: normal; font-size: 11.5px; font-weight: 700; color: #6B5A1E; }

/* تعريف الحسابات 1: الاسم بنسبة من العرض (مش كل الباقي)، والرقم الضريبي يكفي 15 رقم، وصفة الحساب أعرض، وأزرار السطر جوه الشاشة */
table.acc-list { min-width: 1100px; }
table.acc-list th:nth-child(1) { width: 6.5%; }
table.acc-list th:nth-child(2) { width: 20%; min-width: 0; }
table.acc-list th:nth-child(3) { width: 15%; }
table.acc-list th:nth-child(4) { width: 8.5%; }
table.acc-list th:nth-child(5) { width: 13%; }
table.acc-list th:nth-child(6) { width: 9%; }
table.acc-list th:nth-child(7), table.acc-list th:nth-child(8), table.acc-list th:nth-child(9) { width: 4.2%; }
table.acc-list th:nth-child(10) { width: 3.6%; }
table.acc-list th:nth-child(11) { width: 5.5% !important; }
table.acc-list th:nth-child(12) { width: 128px !important; }
table.acc-list td.c-tax { max-width: none; }
table.acc-list tr.acc-edit #nt, table.acc-list tr.acc-new #nt { font-family: inherit; letter-spacing: .3px; direction: ltr; text-align: center; }
table.acc-list tr.acc-edit .acc-act, table.acc-list tr.acc-new .acc-act { padding-inline: 2px; }
table.acc-list tr.acc-edit .acc-act .btn, table.acc-list tr.acc-new .acc-act .btn { padding-inline: 7px; min-width: 0; }
table.acc-list thead th { white-space: normal; line-height: 1.2; text-overflow: clip; vertical-align: middle; }
table.acc-list td.c-name { font-size: 16.5px; font-weight: 800; }
table.acc-list td.c-par { color: var(--text); font-size: 14px; font-weight: 700; white-space: nowrap; }
table.acc-list td.c-par b { color: var(--violet-d); margin-inline-end: 4px; }

/* تعريف الحسابات 2: الشجرة أعرض وفيها عمودين «الحساب الأب» و«المستويات الأعلى» */
.t01-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr); gap: 14px; align-items: start; }
@media (max-width: 1000px) { .t01-grid { grid-template-columns: 1fr; } }
.t01-head { display: flex; gap: 6px; padding: 7px 12px; background: var(--violet-50); border-bottom: 1px solid var(--line-soft); font-size: 12.5px; font-weight: 900; color: var(--text-2); }
.t01-head span:first-child { flex: 1; }
.t01-head span:nth-child(2), .t-row .t01-par { width: 210px; flex: none; }
.t01-head span:nth-child(3), .t-row .t01-fath { width: 120px; flex: none; }
.t-row .t01-par, .t-row .t01-fath { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-row .t01-par b { color: var(--violet-d); margin-inline-end: 3px; }
.t-row.lv-g1 .t01-par b { color: inherit; }

/* تصميم الميزانية: التصنيف بنفس عرض المجموعة، والترتيب في النص، والباقي للبيان (الاسم أسود بولد أكبر) */
.bsd-tbl { table-layout: fixed; width: 100%; }
.bsd-tbl col.bsd-w-code { width: 78px; }
.bsd-tbl col.bsd-w-att { width: 100px; }
.bsd-tbl col.bsd-w-cls, .bsd-tbl col.bsd-w-grp { width: 21%; }
.bsd-tbl col.bsd-w-ser { width: 120px; }
.bsd-tbl td.bsd-c-name .md-name { font-size: 16.5px; font-weight: 900; color: #111 !important; }
.bsd-tbl td.bsd-c-ser, .bsd-tbl td.bsd-c-att { text-align: center !important; }
.bsd-tbl td.bsd-c-ser .bsd-n, .bsd-tbl td.bsd-c-att .bsd-n { margin-inline: auto; display: block; }
.bsd-tbl td.bsd-c-cls { text-align: center; }
.bsd-tbl .bsd-cls { align-items: center; }
.bsd-tbl thead th, .bsd-tbl thead th small { white-space: normal; overflow: visible; text-overflow: clip; }
/* تصميم الميزانية: عمود «مرفق» بلون خوخي غير أصفر التصنيف، وكلام التصنيف أكبر وبولد */
.bsd-tbl thead th.bsd-h-att { background: #FFC9A3 !important; }
.bsd-tbl td.bsd-c-att { background: #FFDCC2 !important; }
.bsd-tbl td.bsd-c-att .bsd-in { background: rgba(255, 255, 255, .7); border-color: #F2A877; }
.bsd-tbl .bsd-cls { font-size: 15.5px; font-weight: 900; color: #111; line-height: 1.3; }
.bsd-tbl .bsd-cls em { font-size: 13.5px; font-weight: 800; color: #5C4A0E; }
/* صندوق «MEZ سليم»: سطر واحد رفيع (العنوان والشرح جنب بعض) */
.bsd-mez.ok { align-items: center; padding: 5px 12px; gap: 8px; }
.bsd-mez.ok > i { font-size: 17px; margin-top: 0; }
.bsd-mez.ok > div { flex-direction: row; align-items: baseline; gap: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; }
.bsd-mez.ok > div > b { font-size: 13px; flex: none; }
.bsd-mez.ok > div > span { overflow: hidden; text-overflow: ellipsis; }

/* القوائم المالية (تقارير الميزانية العمومية): مستويات واضحة ومقروءة
   fs-hl المستوى الأعلى (الموجودات…) · fs-l1 المستوى الأول · fs-l2 البنود · fs-tot إجمالي القسم · fs-net صافي الربح · fs-grand الإجمالي النهائي */
table.tbl.fs-tbl thead th { font-size: 15.5px; font-weight: 900; padding-top: 12px; padding-bottom: 12px; }
table.tbl.fs-tbl tbody td { padding-top: 10px; padding-bottom: 10px; }
table.tbl.fs-tbl tr.fs-hl td { background: #DBEAFE !important; color: #1E3A8A !important; font-size: 20px; font-weight: 900; padding-top: 12px; padding-bottom: 12px; border-top: 2px solid #93C5FD; }
table.tbl.fs-tbl tr.fs-hl td * { color: #1E3A8A !important; font-weight: 900 !important; }
table.tbl.fs-tbl tr.fs-l1 td, table.tbl.fs-tbl tr.fs-l1 td * { color: #111 !important; font-size: 16.5px; font-weight: 900 !important; }
table.tbl.fs-tbl tr.fs-l2 td, table.tbl.fs-tbl tr.fs-l2 td * { color: #1F1F1F !important; font-size: 15.5px; font-weight: 800 !important; }
table.tbl.fs-tbl tr.fs-l3 td, table.tbl.fs-tbl tr.fs-l3 td * { font-size: 14.5px; font-weight: 700; }
table.tbl.fs-tbl tr.fs-tot td { background: #FFE3C4 !important; border-top: 2px solid #FDBA74; }
table.tbl.fs-tbl tr.fs-tot td, table.tbl.fs-tbl tr.fs-tot td * { color: #7C2D12 !important; font-size: 17px; font-weight: 900 !important; }
table.tbl.fs-tbl tr.fs-net td, table.tbl.fs-tbl tr.fs-net td * { color: #065F46 !important; font-size: 16px; font-weight: 900 !important; }
table.tbl.fs-tbl tr.fs-net td { background: #ECFDF5 !important; }
table.tbl.fs-tbl tr.fs-grand td { background: #FDBA74 !important; border-top: 3px double #C2410C; border-bottom: 3px double #C2410C; }
table.tbl.fs-tbl tr.fs-grand td, table.tbl.fs-tbl tr.fs-grand td * { color: #431407 !important; font-size: 18px; font-weight: 900 !important; }
table.tbl.fs-tbl tr.group-row td { font-size: 16px; font-weight: 900; }
/* هايلايت السطر في كل الجداول (قاعدة المالك): السطر المختار خطين لايم + شريط أول السطر + لون خفيف فوق لونه، والماوس لون أخف */
table tbody tr.row-sel td, table tbody tr.sel td { box-shadow: inset 0 3px 0 var(--lime), inset 0 -3px 0 var(--lime) !important; background-image: linear-gradient(rgba(174, 237, 22, .16), rgba(174, 237, 22, .16)) !important; }
table tbody tr.row-sel td:first-child, table tbody tr.sel td:first-child { box-shadow: inset 0 3px 0 var(--lime), inset 0 -3px 0 var(--lime), inset -6px 0 0 #65A30D !important; }
table tbody tr.row-sel td { position: relative; }
table.tbl tbody tr:not(.group-row):hover td { background-image: linear-gradient(rgba(132, 94, 255, .07), rgba(132, 94, 255, .07)); }
/* تعريف شركة / سنة جديدة و الخيارات (dalel.js) */
.dl-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 12px; border: 2px solid #16A34A; }
.dl-code { display: flex; align-items: center; gap: 8px; font-weight: 900; color: #14532D; }
.dl-code .input { width: 150px; height: 42px; font-size: 20px; font-weight: 900; text-align: center; border: 2px solid #16A34A; }
.dl-state { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-weight: 800; font-size: 13px; }
.dl-state.old { background: #EFF6FF; color: #1D4ED8; } .dl-state.new { background: #F0FDF4; color: #15803D; }
.dl-hint { flex: 1; min-width: 260px; display: flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1.5px solid #FCA5A5; border-radius: 10px; background: #fff; color: #DC2626; font-weight: 800; font-size: 13px; }
.dl-form .mfp-cell.dl-f .dl-lb { display: block; font-size: 12.5px; font-weight: 800; color: var(--text-2); margin-bottom: 4px; }
.dl-form .mfp-cell.dl-f .input, .dl-form .mfp-cell.dl-f .select { width: 100%; height: 38px; }
.dl-chk { --sp: 6; display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line-soft); background: var(--surface); font-weight: 800; font-size: 13.5px; cursor: pointer; }
.dl-chk input { width: 18px; height: 18px; flex: none; accent-color: #EA580C; }
.dl-chk.red span { color: #DC2626; } .dl-chk.blue span { color: #2563EB; } .dl-chk.purple span { color: #7E22CE; }
.dl-chk:has(input:checked) { background: #FFF7ED; border-color: #FDBA74; }
.dl-radio > div { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 6px 10px; border: 1px dashed var(--line); border-radius: 10px; }
.dl-radio label { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 13.5px; cursor: pointer; }
.dl-sub { font-weight: 900; color: #DC2626; padding-top: 6px; }
.dl-color { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dl-color input[type=color] { width: 54px; height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 2px; background: #fff; }
.dl-sw { padding: 6px 12px; border-radius: 8px; font-size: 12.5px; color: #111; border: 1px solid rgba(0, 0, 0, .1); }
.dl-seed { margin: 8px 16px 6px; padding-inline-start: 18px; font-size: 13px; font-weight: 700; line-height: 1.9; }
.dl-note { margin: 0 16px 12px; font-size: 12.5px; color: var(--text-3); font-weight: 700; }
.dl-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 14px; align-items: start; }

/* 6-4 / 6-6 compact (owner 2026-11-15: «استغل المساحات قدر الإمكان») — label sits on the field border, sections side by side, 24-col grid */
.dl-top { padding: 6px 12px; margin-bottom: 10px; gap: 10px; }
.dl-code .input { height: 36px; font-size: 19px; }
.dl-hint { padding: 5px 10px; }
.dl-flow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
.dl-flow > .dl-wide { grid-column: 1 / -1; }
@media screen and (max-width: 1100px) { .dl-flow { grid-template-columns: minmax(0, 1fr); } }
.dl-form .mfp-sh { padding: 5px 12px; gap: 10px; }
.dl-form .mfp-sh > div { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.dl-form .mfp-sh .mfp-si { width: 28px; height: 28px; border-radius: 8px; font-size: 16px; }
.dl-form .mfp-sh b { font-size: 16px; }
.dl-form .mfp-sh > div > span { font-size: 12px; }
.dl-form .mfp-grid { gap: 13px 10px; padding: 14px 12px 10px; }
.dl-form .mfp-grid.dl-g24 { grid-template-columns: repeat(24, minmax(0, 1fr)); }
.dl-form .mfp-cell.dl-f { position: relative; }
.dl-form .mfp-cell.dl-f .dl-lb { position: absolute; top: -8px; inset-inline-start: 9px; z-index: 1; max-width: calc(100% - 18px); margin: 0; padding: 0 5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; background: #fff; border-radius: 4px; font-size: 11.5px; line-height: 15px; font-weight: 900; color: #4C1D95; pointer-events: none; }
.dl-form .mfp-cell.dl-f .dl-lb.red { background: #DC2626; color: #fff; }
.dl-form .mfp-cell.dl-f .dl-lb.purple { background: #7C3AED; color: #fff; }
.dl-form .mfp-cell.dl-f .input, .dl-form .mfp-cell.dl-f .select { height: 34px; padding-top: 4px; }
.dl-form .mfp-cell.dl-f:focus-within .dl-lb:not(.red):not(.purple) { color: #EA580C; }
.dl-form .dl-color input[type=color] { height: 34px; }
.dl-form .dl-color { min-height: 34px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 10px; }
.dl-form .dl-color .num { min-width: 64px; font-weight: 800; }
.dl-chk { padding: 4px 8px; font-size: 13px; line-height: 1.35; }
.dl-radio > div { padding: 4px 10px; gap: 4px 18px; }
.dl-sub { padding: 0; margin-bottom: -4px; font-size: 13px; }
.dl-seed { margin: 6px 12px 8px; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; line-height: 1.5; }
.dl-seed li { padding: 2px 10px; border-radius: 999px; background: #F0FDF4; border: 1px solid #BBF7D0; color: #14532D; font-size: 12.5px; }
.dl-two { gap: 10px; }
:root[data-theme="dark"] .dl-form .mfp-cell.dl-f .dl-lb:not(.red):not(.purple) { background: var(--surface); color: #DDD6FE; }
/* input fields follow the shared field shade (--field-bg / --field-line), never plain white (owner rule) */
.dl-form .mfp-cell.dl-f .input, .dl-form .mfp-cell.dl-f .select, .dl-form .dl-color { background-color: var(--field-bg); border: 1.5px solid var(--field-line); color: var(--field-ink); font-weight: 700; }
.dl-form .mfp-cell.dl-f .input:hover:not(:focus):not([readonly]), .dl-form .mfp-cell.dl-f .select:hover:not(:focus) { border-color: var(--field-hover); }
.dl-form .mfp-cell.dl-f .input:focus, .dl-form .mfp-cell.dl-f .select:focus { background-color: var(--surface); border-color: var(--violet); box-shadow: 0 0 0 3px rgba(124, 92, 255, .15); outline: none; }
.dl-form .mfp-cell.dl-f .input[readonly] { background-color: var(--line-soft); color: var(--text-2); }
.dl-form .mfp-cell.dl-f .dl-lb:not(.red):not(.purple) { background: linear-gradient(to bottom, #fff 50%, var(--field-bg) 50%); }
.dl-form .mfp-cell.dl-f:focus-within .dl-lb:not(.red):not(.purple) { background: #fff; }
.dl-chk, .dl-radio > div { background: var(--field-bg); border-color: var(--field-line); }
:root[data-theme="dark"] .dl-form .mfp-cell.dl-f .dl-lb:not(.red):not(.purple) { background: linear-gradient(to bottom, var(--surface) 50%, var(--field-bg) 50%); }

/* ===== Owner rule (2026-11-15): every input field in every screen is a bit darker than the card — shared tokens --field-bg / --field-line ===== */
.input, .select, textarea.input { background-color: var(--field-bg); border-color: var(--field-line); color: var(--field-ink); }
.input:hover:not(:focus):not([readonly]):not(:disabled), .select:hover:not(:focus):not(:disabled) { border-color: var(--field-hover); }
.input:focus, .select:focus { background-color: var(--surface); border-color: var(--violet); }
.input[readonly], .input:disabled, .select:disabled { background-color: var(--line-soft); color: var(--text-2); }
/* entry forms (basic data / vouchers) were white */
.mfp .field > .input, .mfp .field > .select, .vch-lsec .vch-line > .field > .input { background-color: var(--field-bg); border-color: var(--field-line); }
.mfp .field > .input:hover:not(:focus):not([readonly]), .mfp .field > .select:hover:not(:focus) { border-color: var(--field-hover); }
.mfp .field > .input:focus, .mfp .field > .select:focus, .vch-lsec .vch-line > .field > .input:focus { background-color: var(--surface); }
.mfp .field > .input[readonly] { background-color: #EEEBFB; }
.mfp .field.chk { background-color: var(--field-bg); border-color: var(--field-line); }
.stp-q .input { background: var(--field-bg); }
/* fields with the label inside the box (report filters, strips, master forms) — the box itself carries the shade */
.stp-f, .filters > .field:not(.chk), .filters > .field.chk, .mf-grid > .field:not(.chk), .mf-grid > .field.chk { background-color: var(--field-bg); border-color: var(--field-line); }
.stp-f:hover:not(:focus-within), .filters > .field:not(.chk):hover:not(:focus-within), .mf-grid > .field:not(.chk):hover:not(:focus-within) { border-color: var(--field-hover); }
.stp-f:focus-within, .filters > .field:not(.chk):focus-within, .mf-grid > .field:not(.chk):focus-within { background-color: var(--surface); border-color: var(--violet); }
.filters > .field:has(.flt-val) { background: #FFF7ED; border-color: #FB923C; }
:root[data-theme="dark"] .mfp .field > .input, :root[data-theme="dark"] .mfp .field > .select, :root[data-theme="dark"] .mfp .field.chk { background-color: var(--field-bg); border-color: var(--field-line); color: var(--field-ink); }
:root[data-theme="dark"] .mfp .field > .input[readonly] { background-color: var(--line-soft); }
:root[data-theme="dark"] .filters > .field:has(.flt-val) { background: #2A1A0E; }
/* 6-4 / 6-6: title + book number bar stay pinned at the top while scrolling */
.dl-pin { position: sticky; top: 0; z-index: 20; margin-top: -10px; padding-top: 10px; background: var(--bg); }
.dl-pin .page-head { margin-bottom: 8px; }
.dl-pin .dl-top { margin-bottom: 8px; box-shadow: 0 8px 14px -12px rgba(30, 20, 80, .45); }
@media (max-width: 1024px) { .dl-pin { top: 56px; } }
/* Owner rule (2026-11-15, all screens): the screen head (title + buttons) and the bar right under it (report filters / list tools) stay pinned while scrolling — js/standards.js marks the bar .pin-bar and sets --ph-h */
@media screen and (min-width: 1025px) {
  .main > .page-head { position: sticky; top: 0; z-index: 20; background: var(--bg); padding-top: 8px; margin-top: -8px; }
  .main .pin-bar { position: sticky; top: var(--ph-h, 0px); z-index: 19; box-shadow: 0 calc(-1 * var(--ph-gap, 10px) - 1px) 0 0 var(--bg), 0 10px 16px -14px rgba(30, 20, 80, .5); }
}
/* Monthly income statement / monthly balance sheet (2-1-4, 2-1-11, 2-1-5): whole numbers and tight columns so the whole year fits one page */
/* the table is only as wide as its columns (starts right after the name, no empty stretch when few months have values) */
table.tbl.fs-tbl.fs-mon { width: auto !important; min-width: 0 !important; max-width: 100%; table-layout: auto; }
table.tbl.fs-tbl.fs-mon td.n, table.tbl.fs-tbl.fs-mon th.n { min-width: 56px; }
table.tbl.fs-tbl.fs-mon:not(.fs-mon-n1):not(:has(thead th:nth-child(10))) td:nth-child(2), table.tbl.fs-tbl.fs-mon.fs-mon-n1:not(:has(thead th:nth-child(9))) td:first-child { min-width: 300px; }
table.tbl.fs-tbl.fs-mon:not(.fs-mon-n1) td:nth-child(2), table.tbl.fs-tbl.fs-mon.fs-mon-n1 td:first-child { max-width: 380px; }
table.tbl.fs-tbl.fs-mon th, table.tbl.fs-tbl.fs-mon td { padding-inline: 4px !important; }
table.tbl.fs-tbl.fs-mon thead th { font-size: 13.5px; padding-top: 8px; padding-bottom: 8px; white-space: nowrap; }
table.tbl.fs-tbl.fs-mon tbody td { padding-top: 6px; padding-bottom: 6px; }
table.tbl.fs-tbl.fs-mon td.n, table.tbl.fs-tbl.fs-mon td.n * { white-space: nowrap; font-size: 12.5px !important; letter-spacing: -.3px; }
table.tbl.fs-tbl.fs-mon tr.fs-l1 td.n, table.tbl.fs-tbl.fs-mon tr.fs-tot td.n, table.tbl.fs-tbl.fs-mon tr.fs-grand td.n, table.tbl.fs-tbl.fs-mon tr.fs-net td.n { font-size: 13px !important; }
table.tbl.fs-tbl.fs-mon:not(.fs-mon-n1) td:first-child { white-space: nowrap; font-size: 13px !important; }
table.tbl.fs-tbl.fs-mon:not(.fs-mon-n1) td:nth-child(2), table.tbl.fs-tbl.fs-mon.fs-mon-n1 td:first-child { min-width: 150px; font-size: 14px !important; line-height: 1.3; }
table.tbl.fs-tbl.fs-mon tr.fs-hl td { font-size: 17px !important; padding-top: 8px; padding-bottom: 8px; }
table.tbl.fs-tbl.fs-mon td.n:last-child, table.tbl.fs-tbl.fs-mon th.n:last-child { font-weight: 900; background-image: linear-gradient(rgba(124, 92, 255, .06), rgba(124, 92, 255, .06)); }
/* print: very wide tables (14+ columns, e.g. the monthly statements) shrink so the whole year fits one landscape page */
.ev-print .evr-tbl:has(thead th:nth-child(14)) td, .ev-print .evr-tbl:has(thead th:nth-child(14)) th,
.evr-tbl:has(thead th:nth-child(14)) td, .evr-tbl:has(thead th:nth-child(14)) th { font-size: 10px !important; padding: 3px 3px !important; letter-spacing: -.2px; }
.evr-tbl:has(thead th:nth-child(14)) td:nth-child(2) { min-width: 120px; }
table.tbl.fs-tbl.fs-mon:not(.fs-mon-n1):has(thead th:nth-child(10)), table.tbl.fs-tbl.fs-mon.fs-mon-n1:has(thead th:nth-child(9)) { width: 100% !important; }
/* report total rows (cost-centre reports and others): light orange like the statements' totals */
table.tbl tr.rp-tot td { background: #FFE3C4 !important; color: #7C2D12; font-weight: 900; border-top: 2px solid #FDBA74; }
table.tbl tr.rp-tot td * { color: #7C2D12 !important; }
/* comparison reports (3-6): the credit line of each account is beige like the PB report */
table.tbl tr.cmp-cr td { background: #F2E2D0 !important; }
table.tbl tr.cmp-cr + tr:not(.cmp-cr) td { border-top: 2px solid #E7D3BC; }
/* Report tables with account levels (trial balances, statements of levels …) — owner 2026-11-15:
   level 1 (dark highlight) bigger and boldest, level 2 a bit smaller, details as they are; numbers follow the same sizes */
.stp-card table.tbl:not(.fs-tbl) tr.lv-g1 td, .stp-card table.tbl:not(.fs-tbl) tr.lv-g1 td * { font-size: 16px !important; font-weight: 900 !important; }
.stp-card table.tbl:not(.fs-tbl) tr.lv-g1 td { padding-top: 11px; padding-bottom: 11px; }
.stp-card table.tbl:not(.fs-tbl) tr.lv-g2 td, .stp-card table.tbl:not(.fs-tbl) tr.lv-g2 td * { font-size: 14.5px !important; font-weight: 800 !important; }
.stp-card table.tbl:not(.fs-tbl) tr.lv-g2 td { padding-top: 9px; padding-bottom: 9px; }
.evr-tbl tr.lv-g1 td, .evr-tbl tr.lv-g1 td * { font-size: 13px !important; font-weight: 900 !important; }
.evr-tbl tr.lv-g2 td, .evr-tbl tr.lv-g2 td * { font-size: 12px !important; font-weight: 800 !important; }

/* two-row report headers (column.group): group title spans its columns, short مدين / دائن under it — the account name gets the room */
table.tbl:has(tr.th-grp) thead { position: sticky; top: 0; z-index: 3; }
table.tbl:has(tr.th-grp) thead th { position: static; }
table.tbl tr.th-grp th { padding-top: 8px; padding-bottom: 4px; }
table.tbl tr.th-grp th.th-g { text-align: center !important; border-bottom: 1px solid rgba(255, 255, 255, .35); border-inline: 1px solid rgba(255, 255, 255, .18); }
table.tbl tr.th-grp th.th-gap { border-bottom: 0 !important; }
table.tbl tr.th-grp + tr th { padding-top: 4px; }
table.tbl tr.th-grp + tr th.th-sub { text-align: center !important; }
.stp-card table.tbl:has(tr.th-grp) tbody td:nth-child(2) { min-width: 240px; }
.stp-card table.tbl:has(tr.th-grp) td, .stp-card table.tbl:has(tr.th-grp) th { padding-inline: 7px; }
.stp-card table.tbl:has(tr.th-grp) td.n { white-space: nowrap; }
.stp-card table.tbl:has(tr.th-grp) th.th-sub { min-width: 70px; }

/* activity chip (النشاط) under the book chip + the chooser grouped by holding company */
.dalel.act-chip { margin-top: -4px; }
.dalel.act-chip .lb { font-size: 11px; font-weight: 800; opacity: .75; flex: none; }
.dalel.act-chip .co { font-weight: 800; }
.dalel.act-chip.need { outline: 2px solid #F59E0B; animation: actPulse 1.4s ease-in-out infinite; }
.dalel.act-chip.need .co { color: #F59E0B; }
@keyframes actPulse { 50% { outline-color: transparent; } }
.act-list .act-grp { padding: 8px 12px 4px; font-size: 12px; font-weight: 900; color: var(--violet-d, #5B21B6); border-top: 1px solid var(--line-soft); }
.act-list .act-grp:first-child { border-top: 0; }

/* activity chooser — like PB w_all_dalel_for_first_l_o_b */
.act-gate { position: fixed; inset: 0; z-index: 3000; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(20, 12, 50, .55); backdrop-filter: blur(3px); }
.act-gate.show { display: flex; }
.act-gate .ag-card { width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: #FFFEF0; border-radius: 16px; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .5); overflow: hidden; border-inline-start: 10px solid; border-image: linear-gradient(180deg, #F97316, #16A34A) 1; }
.act-gate .ag-head { display: flex; align-items: center; gap: 16px; padding: 16px 18px 10px; }
.act-gate .ag-logo { flex: none; max-width: 150px; }
.act-gate .ag-logo img { max-width: 150px; max-height: 90px; object-fit: contain; }
.act-gate .ag-who { flex: 1; display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center; }
.act-gate .ag-co { color: #F59E0B; font-weight: 800; font-size: 14px; }
.act-gate .ag-user { display: block; width: 100%; padding: 6px 10px; background: linear-gradient(90deg, transparent, #FBD5B5, transparent); font-size: 19px; font-weight: 900; color: #111; }
.act-gate .ag-n { font-size: 14px; color: #333; }
.act-gate .ag-x { flex: none; align-self: flex-start; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 17px; }
.act-gate .ag-tbl { width: calc(100% - 36px); margin: 4px 18px 0; border-collapse: separate; border-spacing: 0 6px; }
.act-gate .ag-tbl thead th { background: #FEF9C3; border: 1px solid #111; padding: 4px 8px; font-size: 13px; font-weight: 900; color: #111; text-align: center; }
.act-gate .ag-tbl td { border: 1px solid #111; padding: 6px 10px; font-size: 15px; font-weight: 800; text-align: center; background: #fff; }
.act-gate .ag-tbl tr.ag-row:nth-child(even) td { background: #FFFDE7; }
.act-gate .ag-tbl .ag-c { width: 56px; }
.act-gate .ag-tbl tr.ag-grp td { border: 0; border-bottom: 2px solid #EF4444; background: transparent !important; color: #DC2626; font-weight: 900; padding-top: 10px; }
.act-gate .ag-tbl tr.ag-row { cursor: pointer; }
.act-gate .ag-tbl tr.ag-row:hover td { background: #EEF2FF; }
.act-gate .ag-tbl tr.ag-row.sel td { background: #0B6FD6 !important; color: #fff; border-color: #0B4E99; }
.act-gate .ag-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 18px; color: #B91C1C; }
.act-gate .ag-empty i { font-size: 30px; }
.act-gate .ag-hint { padding: 12px 18px 16px; text-align: center; color: #BE185D; font-size: 14px; font-weight: 700; }
.act-gate .ag-tbl tbody { display: table-row-group; }
.act-gate .ag-list { flex: 1; min-height: 0; overflow: auto; }
.ver-stamp { font-size: 14px; } .ver-stamp b { font-size: 15.5px; font-weight: 900; } .ver-stamp span span { background: #FEF3C7; color: #92400E; border-radius: 6px; padding: 0 5px; font-size: 11.5px; }
/* report filters in ONE line (owner 2026-11-15): every box has a comfortable minimum and grows into the free space
   (dates 190-225, lists up to their longest choice + room, activity the most), so nothing is cut and the row stays one line */
.filters { gap: 6px !important; }
.filters > .field:not(.chk):has(input[type=date]), .filters > .field:not(.chk):has(.dt-in) { flex: 1 1 182px !important; min-width: 182px; max-width: 225px; }
.filters > .field:not(.chk) > label { padding: 0 8px !important; }
.filters > .field:not(.chk):has(select[name="_act"]) { flex: 2 1 220px !important; min-width: 200px; max-width: 360px !important; }
.filters > .field:not(.chk):has(select[name="_act"]) select { width: 100% !important; min-width: 0 !important; text-overflow: ellipsis; }
.filters > .field.chk { flex: 0 0 auto !important; padding: 0 10px !important; }
.filters > .btn, .filters > label.btn { flex: 0 0 auto !important; padding-inline: 12px !important; gap: 6px; }

/* report title strip: «الشركة القابضة — النشاط» in its own colour after the title (no repetition in the summary) */
.stp-acc .stp-act { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px; background: rgba(198, 244, 50, .14); border: 1px solid rgba(198, 244, 50, .45); font-weight: 800; font-size: 14px; white-space: nowrap; }
.stp-acc .stp-act .m { color: #FDE68A; }
.stp-acc .stp-act .sep { color: rgba(255, 255, 255, .55); }
.stp-acc .stp-act .a { color: var(--lime, #C6F432); font-weight: 900; }
.stp-acc .stp-name { font-size: 17px !important; }
/* «تغيير النشاط» in every screen head (multi-activity books) */
.head-actions .btn.act-head { background: linear-gradient(135deg, #FEF9C3, #ECFCCB); border: 1.5px solid #A3E635; color: #365314; font-weight: 800; gap: 6px; max-width: 320px; }
.head-actions .btn.act-head b { font-weight: 900; color: #14532D; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 190px; padding-inline-start: 6px; border-inline-start: 1px solid #A3E635; }
.head-actions .btn.act-head:hover { border-color: #65A30D; }
@media (max-width: 760px) { .head-actions .btn.act-head .lbl { display: none; } }

/* ===== 8-13 استيراد قيود الفنادق (kd_group_to_acc_new) ===== */
.ht-top { display: flex; align-items: center; gap: 14px; padding: 8px 14px; flex-wrap: wrap; }
.ht-act { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.ht-act .select { min-width: 260px; background: var(--field-bg, #EEF0F6); font-weight: 800; }
.ht-name { font-size: 18px; font-weight: 900; color: #0F766E; }
.ht-cnt { margin-inline-start: auto; color: var(--muted); }
.ht-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 470px; gap: 12px; margin-top: 10px; align-items: start; }
.ht-grid { padding: 0; min-height: 420px; overflow: hidden; }
.ht-grid .table-wrap { max-height: calc(100vh - 290px); overflow: auto; }
.ht-tbl tfoot td { font-weight: 900; background: #F1F5F9; position: sticky; bottom: 0; }
.ht-empty { display: grid; place-items: center; align-content: center; gap: 6px; min-height: 420px; color: var(--muted); text-align: center; }
.ht-empty i { font-size: 42px; color: #94A3B8; }
.ht-empty b { color: var(--ink); font-size: 16px; }
.ht-side { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px; }
.ht-colA, .ht-colB, .ht-lower { display: flex; flex-direction: column; gap: 10px; position: relative; }
.ht-pair { display: flex; flex-direction: column; gap: 3px; padding: 6px; border: 1px solid var(--line, #E5E7EB); border-radius: 10px; background: var(--card-2, #FAFAFC); }
.ht-pair small { font-size: 11px; color: var(--muted); text-align: center; }
.ht-btn { --c: #2563EB; border: 0; border-radius: 8px; padding: 9px 8px; font: inherit; font-weight: 800; font-size: 13.5px; cursor: pointer;
  background: var(--c); color: #fff; box-shadow: 0 2px 0 rgba(0,0,0,.18); text-shadow: 0 1px 1px rgba(0,0,0,.25); }
.ht-btn[style*="#FACC15"] { color: #422006; text-shadow: none; }
.ht-btn:hover { filter: brightness(1.08); }
.ht-btn:active { transform: translateY(1px); box-shadow: none; }
.ht-btn.mk { background: color-mix(in srgb, var(--c) 78%, #000); }
.ht-btn.mk.dim { opacity: .45; }
.ht-btn.auto, .ht-btn.unlock { padding: 13px 8px; font-size: 14.5px; }
.ht-colA.covered, .ht-lower.covered { min-height: 120px; }
.ht-colA.covered > *, .ht-lower.covered > * { visibility: hidden; }
.ht-colA.covered::after, .ht-lower.covered::after { content: 'الاستيراد اليدوي من الملفات — اضغط «إنشاء قيود الليالي»'; position: absolute; inset: 0; display: grid; place-items: center;
  text-align: center; padding: 12px; border-radius: 10px; background: repeating-linear-gradient(135deg, #F1F5F9 0 10px, #E2E8F0 10px 20px); color: #475569; font-weight: 800; font-size: 13px; }
.ht-done { grid-column: 1 / -1; font-size: 12px; color: var(--muted); border-top: 1px dashed var(--line, #E5E7EB); padding-top: 8px; }
.ht-ok { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-top: 10px; background: #F0FDF4; border-color: #86EFAC; color: #14532D; font-weight: 700; }
.ht-ok i { font-size: 22px; color: #16A34A; }
.ht-ok .btn { margin-inline-start: auto; }
[data-theme="dark"] .ht-pair { background: rgba(255,255,255,.03); }
[data-theme="dark"] .ht-colA.covered::after, [data-theme="dark"] .ht-lower.covered::after { background: repeating-linear-gradient(135deg, #1E293B 0 10px, #0F172A 10px 20px); color: #CBD5E1; }
[data-theme="dark"] .ht-tbl tfoot td { background: #1E293B; }
@media (max-width: 1100px) { .ht-wrap { grid-template-columns: 1fr; } }
