/* الصفحة نفسها ماتتسحبش من الخارج: المحتوى هو اللي بيتسحب وشريطه على يمينه (جوه، جنب القائمة) — والقائمة شريطها زي ما هو */
.layout { display: flex; flex-wrap: wrap; height: 100vh; align-items: stretch; overflow: hidden; }
.side { flex: 0 0 196px; width: 196px; max-width: 100%; background: var(--primary-deep); color: #fff; padding: 16px 10px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; align-self: flex-start; max-height: 100vh; overflow-y: auto; direction: ltr; }
.side > * { direction: rtl; }
/* القائمة المطوية: شريط رفيع فيه زرار الفتح والعدادات بس */
.side .collapse { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 9px; border: 0; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; margin-inline-start: auto; font-size: 16px; }
.layout.collapsed .side { flex-basis: 52px; width: 52px; padding: 12px 6px; }
.layout.collapsed .side .brand { flex-direction: column; gap: 6px; padding: 0 0 10px; }
.layout.collapsed .side .brand > div, .layout.collapsed .side .who, .layout.collapsed .side .sep { display: none; }
.layout.collapsed .side .collapse { margin: 0; }
.layout.collapsed .side a { padding: 0; justify-content: center; min-height: 38px; position: relative; }
.layout.collapsed .side a .lbl { display: none; }
.layout.collapsed .side a .ic { width: 21px; height: 21px; }
.layout.collapsed .side a.on::before { display: none; }
.layout.collapsed .side a .n { position: absolute; top: 2px; inset-inline-end: 2px; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; margin: 0; }
.side .brand { display: flex; align-items: center; gap: 8px; padding: 0 4px 12px; color: var(--primary-deep); }
.side .brand b { color: #fff; font-family: var(--display); font-size: 17px; font-weight: 800; display: block; letter-spacing: .2px; }
.side .brand span.s { color: #CBEDEA; font-size: 12px; }
/* بنود القائمة: خط أسمك، أيقونة خطية، البند النشط بخلفية فاتحة وشريط لون على اليمين */
.side a { min-height: 40px; border-radius: 12px; color: #D6ECE9; display: flex; align-items: center; gap: 10px; padding: 0 12px; text-decoration: none; font-size: 14.5px; font-weight: 600; white-space: nowrap; position: relative; transition: background .15s, color .15s, transform .15s; }
.side a .ic { width: 19px; height: 19px; flex: 0 0 19px; opacity: .85; }
.side a:hover { background: rgba(255,255,255,.09); color: #fff; transform: translateX(-2px); }
.side a:hover .ic { opacity: 1; }
.side a.on { background: #fff; color: var(--primary-deep); font-weight: 700; box-shadow: 0 6px 16px rgba(0,0,0,.18); }
.side a.on::before { content: ''; position: absolute; inset-inline-start: 4px; top: 10px; bottom: 10px; width: 4px; border-radius: 4px; background: var(--accent); }
.side a.on { padding-inline-start: 16px; }
.side a.on .ic { opacity: 1; color: var(--primary); }
.side a.on .n { background: var(--primary); color: #fff; }
.side a .n { margin-inline-start: auto; min-width: 22px; height: 22px; border-radius: 11px; background: var(--accent); color: var(--ink); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 6px; }
.side .sep { height: 1px; background: rgba(255,255,255,.12); margin: 10px 8px; }
.side .who { margin-top: auto; padding: 14px 10px 0; font-size: 13px; color: #CBEDEA; }
.main { flex: 1 1 560px; min-width: 0; padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; height: 100vh; overflow-y: auto; direction: ltr; }
.main > * { direction: rtl; }
.split { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.split > .a { flex: 3 1 520px; min-width: 0; }
.split > .b { flex: 2 1 320px; min-width: 0; }
.menu-toggle { display: none; }

@media (max-width: 820px) {
  .main { padding: 18px 14px; }
  .layout { height: auto; overflow: visible; }
  .main { height: auto; overflow: visible; direction: rtl; }
  .side { flex-basis: 100%; width: 100%; padding: 12px; position: static; max-height: none; }
  .side .collapse { display: none; }
  .side nav { display: none; flex-direction: column; gap: 3px; }
  .side.open nav { display: flex; }
  .side .brand { padding-bottom: 0; }
  .menu-toggle { display: inline-flex; margin-inline-start: auto; background: rgba(255,255,255,.12); color: #fff; }
  .side .who { display: none; }
}

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 18px; }
.login-box { width: min(420px, 100%); background: #fff; border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 12px 40px rgba(15,27,45,.08); }

.perm-grid input { width: 22px; height: 22px; accent-color: var(--primary); }
.perm-grid td, .perm-grid th { text-align: center; }
.perm-grid td:first-child, .perm-grid th:first-child { text-align: right; }

.print-cert { page-break-after: always; border: 2px solid var(--primary-deep); border-radius: 14px; padding: 40px; margin: 0 0 20px; text-align: center; background: #fff; }
.print-cert h2 { font-size: 30px; margin-bottom: 12px; }
.print-cert .name { font-family: var(--display); font-size: 34px; margin: 18px 0; }

/* ===== البطولات: تنظيم مبسّط ===== */
.subnav { display: flex; gap: 8px; flex-wrap: wrap; }
.subnav a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 14px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-weight: 800; text-decoration: none; transition: .15s; }
.subnav a svg { width: 18px; height: 18px; opacity: .8; }
.subnav a:hover { border-color: var(--primary); color: var(--primary-deep); }
.subnav a.on { background: var(--primary-deep); border-color: var(--primary-deep); color: #fff; box-shadow: 0 8px 18px -10px var(--primary-deep); }
.govgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 12px; }
.govcard { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 18px; color: #fff; text-decoration: none; background: linear-gradient(140deg, var(--g1), var(--g2)); box-shadow: 0 12px 24px -14px var(--g2), inset 0 1px 0 rgba(255,255,255,.3); transition: transform .15s, box-shadow .15s; }
.govcard.g0, .govrow.g0 { --g1: #2BB5AA; --g2: #0B6E67; } .govcard.g1, .govrow.g1 { --g1: #4FA8F0; --g2: #1C5FB8; } .govcard.g2, .govrow.g2 { --g1: #A57CF2; --g2: #5B37B5; } .govcard.g3, .govrow.g3 { --g1: #FFA264; --g2: #D9552A; }
.govcard.g4, .govrow.g4 { --g1: #5FD39A; --g2: #1E8A55; } .govcard.g5, .govrow.g5 { --g1: #F7C65A; --g2: #C47A12; } .govcard.g6, .govrow.g6 { --g1: #F77FA3; --g2: #B8285B; } .govcard.g7, .govrow.g7 { --g1: #6AC7D6; --g2: #1E7A8C; }
.govcard.done { filter: grayscale(.6); opacity: .8; }
.govcard:hover { transform: translateY(-3px); box-shadow: 0 18px 30px -14px var(--g2); color: #fff; }
.gc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.gc-name { font-family: var(--display); font-size: 21px; font-weight: 800; text-shadow: 0 2px 8px rgba(0,0,0,.2); }
.gc-date { opacity: .9; font-weight: 600; }
.gc-nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; } .gc-nums.three { grid-template-columns: repeat(3, 1fr); }
.gc-nums > div { display: flex; flex-direction: column; align-items: center; padding: 6px 2px; border-radius: 10px; background: rgba(255,255,255,.18); backdrop-filter: blur(3px); }
.gc-nums b { font-family: var(--display); font-size: 17px; line-height: 1.1; } .gc-nums span { font-size: 11px; opacity: .9; font-weight: 600; }
.gc-nums .hot { background: rgba(255,255,255,.92); } .gc-nums .hot b { color: #B8285B; } .gc-nums .hot span { color: #B8285B; }
/* مفتاح تنشيط */
.gsw { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; font-size: 11px; font-weight: 700; user-select: none; flex: 0 0 auto; white-space: nowrap; line-height: 1; }
.gsw i { display: block; width: 40px; height: 22px; border-radius: 22px; background: rgba(0,0,0,.3); position: relative; transition: .2s; box-shadow: inset 0 2px 4px rgba(0,0,0,.35), 0 1px 0 rgba(255,255,255,.25); }
.gsw i::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: linear-gradient(180deg, #fff, #e6e6e6); transition: .2s; box-shadow: 0 2px 4px rgba(0,0,0,.35); }
.gsw.on i { background: linear-gradient(180deg, #34d399, #16a34a); box-shadow: inset 0 1px 2px rgba(255,255,255,.4), 0 2px 6px rgba(0,0,0,.25); }
.gsw.on i::after { inset-inline-start: 21px; }
.gsw span { opacity: .95; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--muted); }
.crumbs a { color: var(--primary-deep); font-weight: 700; } .crumbs b { color: var(--ink); }
.chead { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; background: #fff; border: 1px solid var(--line); border-radius: 18px; }
.cpage { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 16px; align-items: start; }
.cnav { position: sticky; top: 0; display: flex; flex-direction: column; gap: 4px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 18px; }
.cnav a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; color: var(--ink); font-weight: 700; text-decoration: none; }
.cnav a svg { width: 19px; height: 19px; opacity: .75; flex: 0 0 auto; }
.cnav a:hover { background: var(--bg); } .cnav a.on { background: var(--primary-deep); color: #fff; } .cnav a.on svg { opacity: 1; }
.cnav a.back { margin-top: 8px; border-top: 1px dashed var(--line); border-radius: 0; padding-top: 12px; color: var(--muted); font-size: 13px; }
.cbody { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.csec { display: flex; flex-direction: column; gap: 12px; }
.csec-h { margin: 4px 0 0; font-size: 17px; font-weight: 800; color: var(--primary-deep); display: flex; align-items: center; gap: 10px; }
.csec-h::after { content: ''; flex: 1; height: 1px; background: var(--line); }
@media (max-width: 900px) { .cpage { grid-template-columns: 1fr; } .cnav { position: static; flex-direction: row; flex-wrap: wrap; } .cnav a.back { margin: 0; border: 0; padding-top: 11px; } }
.subnav-sep { width: 1px; background: var(--line); margin: 4px 4px; }
.subnav a.more { background: transparent; border-style: dashed; color: var(--muted); font-weight: 700; }
.subnav a.more.on { background: var(--ink); border-color: var(--ink); color: #fff; border-style: solid; }
.gc-nums .feebox { cursor: pointer; background: rgba(255,255,255,.3); } .gc-nums .feebox:hover { background: rgba(255,255,255,.5); }
.szex { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.szbox { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 8px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.szbox.wide { grid-column: span 2; } .szbox .sz { font-family: var(--display); font-size: 18px; font-weight: 800; color: var(--primary-deep); } .szbox .in { text-align: center; width: 100%; }
.rktbl th { text-align: center; } .rktbl td .in { min-width: 76px; text-align: center; padding: 6px; min-height: 36px; }
.rktbl tbody tr:nth-child(even) td { background: #FAFCFC; }

/* ===== التيشرتات: كارت بلون واحد واضح لكل محافظة (مربعين في الصف) ===== */
.shgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.shcard { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; border-radius: 20px; color: #fff; text-decoration: none; background: var(--g2); box-shadow: 0 12px 24px -16px var(--g2); transition: transform .15s; }
.shcard:hover { transform: translateY(-2px); color: #fff; }
.shcard.g0 { --g2: #0E8079; } .shcard.g1 { --g2: #1F6FE0; } .shcard.g2 { --g2: #6D3BD8; } .shcard.g3 { --g2: #E8641F; }
.shcard.g4 { --g2: #1B9A5F; } .shcard.g5 { --g2: #D98E00; } .shcard.g6 { --g2: #D42A6A; } .shcard.g7 { --g2: #1593AE; }
.shcard.dim { opacity: .8; } .shcard.dim .sh-sizes span { opacity: .55; }
.shcard.total { --g2: #1B2740; margin-top: 4px; }
.sh-top { display: flex; justify-content: space-between; align-items: center; }
.sh-name { font-family: var(--display); font-size: 24px; font-weight: 800; }
.sh-total { display: flex; align-items: baseline; gap: 5px; padding: 6px 14px; border-radius: 14px; background: #fff; color: var(--g2); }
.sh-total b { font-family: var(--display); font-size: 26px; } .sh-total small { font-size: 12px; font-weight: 700; }
.sh-sizes { display: grid; grid-template-columns: repeat(11, 1fr); gap: 6px; }
.sh-sizes span { display: flex; flex-direction: column; align-items: center; padding: 6px 0 5px; border-radius: 12px; background: #fff; color: var(--g2); opacity: .55; }
.sh-sizes span.has { opacity: 1; box-shadow: 0 4px 10px -6px rgba(0,0,0,.5); }
.sh-sizes i { font-style: normal; font-size: 12px; font-weight: 800; color: #556; } .sh-sizes b { font-family: var(--display); font-size: 24px; line-height: 1.1; color: #111; }
.sh-note { font-size: 12.5px; opacity: .95; }
@media (max-width: 900px) { .shgrid { grid-template-columns: 1fr; } .sh-sizes { grid-template-columns: repeat(6, 1fr); } }
/* إدارة المقاسات */
.szmgr { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.szchip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border-radius: 14px; background: var(--primary-soft); color: var(--primary-deep); font-family: var(--display); font-size: 20px; font-weight: 800; border: 1px solid var(--line); }
.szchip .szdel { width: 26px; height: 26px; font-size: 16px; }
.szbox .sz { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.szdel { width: 20px; height: 20px; border: 0; border-radius: 50%; background: #FDE8E8; color: #B8285B; font-weight: 800; cursor: pointer; line-height: 1; padding: 0; }
.szdel:hover { background: #B8285B; color: #fff; }
.sh-sizes.items { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.sh-sizes.items i { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; padding: 0 4px; }
.itchip { font-size: 16px; gap: 6px; }

/* ===== درجات المراكز: جدول ملوّن بالفئة العمرية ===== */
.rk { width: 100%; border-collapse: separate; border-spacing: 4px 14px; }
.rk tbody tr td { border-top: 0; } .rk tbody td.rk-lvl { box-shadow: inset 4px 0 0 var(--line); }
.rk th, .rk td { padding: 8px 6px; text-align: center; vertical-align: middle; }
.rk th.band { font-size: 15px; font-weight: 800; border-radius: 12px 12px 0 0; color: #fff; background: var(--bt2); }
.rk th.sub { font-size: 12px; font-weight: 700; color: var(--bt2); background: var(--bt1); }
.rk td { background: var(--bt1); border-radius: 10px; }
.rk td.second { background: color-mix(in srgb, var(--bt1) 60%, #fff); }
.rk td .in { width: 92px; min-height: 40px; text-align: center; font-family: var(--display); font-size: 17px; font-weight: 800; border-color: transparent; background: #fff; }
.rk td .in:focus { border-color: var(--bt2); }
.rk .rk-lvl { text-align: start; background: #fff; border-radius: 10px; min-width: 150px; font-size: 15px; }
.rk thead .rk-lvl { background: transparent; }
.b-teal { --bt1: #DDF4F2; --bt2: #0E8079; } .b-blue { --bt1: #DCEBFC; --bt2: #1F6FE0; } .b-violet { --bt1: #EAE0FF; --bt2: #6D3BD8; } .b-orange { --bt1: #FFE6D4; --bt2: #E8641F; } .b-green { --bt1: #DDF6E9; --bt2: #1B9A5F; } .b-pink { --bt1: #FDE2EC; --bt2: #D42A6A; }
.lvchip { background: var(--bt1); color: var(--bt2); border-color: transparent; font-size: 16px; }

/* ===== أوردرات البطولة: التيشرتات والشحنات ===== */
.pk { padding: 0; overflow: hidden; }
.pk > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 16px; color: #fff; background: linear-gradient(135deg, var(--t1), var(--t2)); }
.pk > summary::-webkit-details-marker { display: none; }
.pk-name { font-family: var(--display); font-size: 20px; font-weight: 800; }
.pk-stats { font-size: 13.5px; opacity: .95; } .pk-stats b { font-size: 15px; }
.pk-sizes { display: flex; gap: 4px; margin-inline-start: auto; flex-wrap: wrap; }
.pk-sizes i { font-style: normal; display: inline-flex; flex-direction: column; align-items: center; min-width: 30px; padding: 3px 5px; border-radius: 8px; background: rgba(255,255,255,.92); color: var(--t2); font-size: 10px; font-weight: 800; line-height: 1.1; }
.pk-sizes i b { font-size: 14px; }
.pktbl th, .pktbl td { padding: 8px 6px; }
.pktbl th.pk-h { font-size: 11px; line-height: 1.2; min-width: 56px; } .pktbl th.pk-h div { font-weight: 700; color: var(--muted); }
.pktbl .sz { background: #F5FBFA; } .pktbl td.num b { display: inline-grid; place-items: center; min-width: 28px; height: 26px; padding: 0 6px; border-radius: 8px; background: var(--primary-soft); color: var(--primary-deep); font-weight: 800; }
.pktbl tr.shipped td { opacity: .65; } .pktbl tr.tot td { background: #FFF6DD; font-weight: 800; }

/* ===== الشحنات: محافظة ← كروت مدربين ===== */
.govcard.sel { outline: 3px solid #fff; box-shadow: 0 0 0 3px var(--g2), 0 12px 24px -14px var(--g2); }
.govcard .pk-sizes i { color: var(--g2); }
.pk-gov { padding: 14px 18px; border-radius: 18px; color: #fff; background: linear-gradient(135deg, var(--t1), var(--t2)); }
.pk-gov .pk-sizes i { color: var(--t2); }
.trgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.trcard { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 18px; background: #fff; border: 1px solid var(--line); box-shadow: 0 10px 24px -20px rgba(15,27,45,.4); }
.trcard.shipped { background: #F3FBF6; border-color: #BFE7CF; } .trcard.total { background: #FFF9E8; border-color: #F3DFA3; }
.tr-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.tr-name { font-family: var(--display); font-size: 19px; font-weight: 800; }
.tr-kids { display: flex; flex-direction: column; align-items: center; min-width: 64px; padding: 6px 10px; border-radius: 14px; background: var(--primary-deep); color: #fff; }
.tr-kids b { font-family: var(--display); font-size: 26px; line-height: 1; } .tr-kids span { font-size: 11px; font-weight: 700; }
.tr-sec { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; border-top: 1px dashed var(--line); }
.tr-lbl { font-size: 13px; font-weight: 800; color: var(--muted); }
.pk-sizes.dark i { background: var(--primary-soft); color: var(--primary-deep); min-width: 36px; font-size: 11px; } .pk-sizes.dark i b { font-size: 16px; }
.pk-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.pk-list > span { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; background: var(--bg); font-size: 13px; font-weight: 700; }
.pk-list > span em { font-style: normal; } .pk-list > span > span { flex: 1; } .pk-list > span b { font-family: var(--display); font-size: 17px; color: var(--primary-deep); }
.pk-list > span.off { opacity: .4; }
.tr-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 13.5px; }
@media (max-width: 900px) { .trgrid { grid-template-columns: 1fr; } }
.govcard.dim { opacity: .55; filter: saturate(.5); }

/* قائمة مدربين مضغوطة مع تفاصيل */
.trlist { display: flex; flex-direction: column; gap: 4px; }
.trrow { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.trrow.head, .trrow.tot, .trrow > summary { display: grid; grid-template-columns: minmax(180px, 2fr) repeat(9, minmax(56px, 1fr)) 90px; align-items: center; gap: 6px; padding: 8px 12px; }
.trrow.head { background: var(--primary-soft); color: var(--primary-deep); font-size: 12.5px; font-weight: 800; border-color: transparent; }
.trrow.tot { background: #FFF6DD; font-weight: 800; }
.trrow > summary { cursor: pointer; list-style: none; } .trrow > summary::-webkit-details-marker { display: none; }
.trrow .c { text-align: center; font-weight: 700; } .trrow .n { display: inline-grid; place-items: center; min-width: 32px; height: 28px; padding: 0 8px; border-radius: 8px; background: var(--primary-deep); color: #fff; }
.trrow.shipped > summary { background: #F3FBF6; }
.trrow[open] > summary { border-bottom: 1px dashed var(--line); background: var(--bg); }
.trbody { padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 900px) { .trrow.head { display: none; } .trrow.tot, .trrow > summary { grid-template-columns: 1fr 1fr 1fr; } }
.gc-nums.money b { font-size: 15px; }
.trrow.head, .trrow.tot, .trrow > summary { grid-template-columns: minmax(170px, 2fr) repeat(9, minmax(58px, 1fr)) 84px; }
.trrow .k1 { background: #E6F6F4; } .trrow .k2 { background: #EEE7FF; } .trrow .k3 { background: #FFF0E3; } .trrow .k4 { background: #FFF6DD; }
.trrow > summary .c, .trrow.tot .c, .trrow.head .c { border-radius: 8px; padding: 6px 2px; font-size: 14px; }
.trrow.head .c { font-size: 12px; } .trrow .act { display: flex; gap: 4px; justify-content: center; background: transparent; }
.trrow.head, .trrow.tot, .trrow > summary { gap: 4px; padding: 6px 10px; grid-template-columns: minmax(160px, 2fr) repeat(10, minmax(50px, 1fr)) 180px 80px; }
.trrow .act.st { flex-wrap: wrap; align-items: center; }
.trrow .k4.due { background: #FFF3C4; color: #7A5A00; font-weight: 700; }
.trrow .k4.paid { background: #DDF5E3; color: #1B6B3A; font-weight: 700; }
.trrow .k4.bal { background: #FFE1E1; color: #B42318; font-weight: 700; }
.trrow.head .k4.due, .trrow.head .k4.paid, .trrow.head .k4.bal { font-weight: 600; }
.trrow .k1.smp { background: #FFF0F6; color: #9D174D; } .trrow .k1.snd { background: #DBEAFE; color: #1E40AF; }
.tr-sec.smp .tr-lbl b { color: #9D174D; } .tr-sec.snd .tr-lbl b { color: #1E40AF; font-size: 15px; }
.tr-sec .tr-lbl .btn { margin-inline-start: 8px; }
.szgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.szgrid .f.sz span { display: block; font-size: 12px; font-weight: 700; margin-bottom: 2px; } .szgrid .f.sz small { font-weight: 500; }
.smp-bal { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px; border-radius: 12px; background: #FFF0F6; margin-bottom: 10px; } .smp-bal b { color: #9D174D; font-size: 18px; }
.smp-kinds { margin-bottom: 8px; flex-wrap: wrap; }
.smp-log { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow: auto; }
.smp-row { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.smp-row .up { color: #1B6B3A; font-weight: 700; } .smp-row .down { color: #B42318; font-weight: 700; }
.smk-issue { background: #DDF5E3; color: #1B6B3A; } .smk-return { background: #FFE1E1; color: #B42318; } .smk-exchange { background: #DBEAFE; color: #1E40AF; }
.smk-transfer_out { background: #FFF3C4; color: #7A5A00; } .smk-transfer_in { background: #EEE7FF; color: #5B21B6; } .smk-adjust { background: #F1F3F5; color: #374151; }
.trrow .smp em.pend { font-style: normal; font-size: 11px; margin-inline-start: 4px; background: #FDE68A; border-radius: 6px; padding: 0 4px; }
/* الحسابات في مستطيل واحد */
.trrow .acc { grid-column: span 3; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; margin: -4px 0; border-radius: 12px; background: #EEF2F7; border: 1.5px solid #CBD5E1; }
.trrow.head .acc { position: relative; padding-top: 4px; }
.trrow .acc .c { border-radius: 8px; }
@media (max-width: 900px) { .trrow .acc { grid-column: 1 / -1; } }
/* صفحة العينات */
.smp-send { border: 2px solid #F9A8D4; background: linear-gradient(180deg, #FFF5FA, #fff); }
.smp-pick { position: relative; max-width: 460px; }
.smp-res { position: absolute; inset-inline: 0; top: 100%; z-index: 20; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 24px rgba(0,0,0,.12); overflow: hidden; }
.smp-res:empty { display: none; }
.smp-res button { display: block; width: 100%; text-align: start; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--line); background: #fff; font: inherit; cursor: pointer; }
.smp-res button:hover { background: #FFF0F6; }
.smp-tbl { display: flex; flex-direction: column; gap: 6px; }
.smp-tr { display: grid; grid-template-columns: minmax(170px, 2fr) 110px 80px minmax(160px, 2fr) 100px 100px 70px; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; }
.smp-tr.head { background: #E6F2F1; font-size: 12px; font-weight: 700; border: 0; }
.smp-tr .c { text-align: center; } .smp-tr .pk-sizes { margin: 0; }
.smp-tr .smpn { font-weight: 800; font-size: 18px; color: #9D174D; } .smp-tr .sndn { font-weight: 800; color: #1E40AF; }
.smp-tr em.pend { font-style: normal; font-size: 11px; margin-inline-start: 4px; background: #FDE68A; border-radius: 6px; padding: 0 4px; }
@media (max-width: 900px) { .smp-tr { grid-template-columns: 1fr 1fr; } .smp-tr.head { display: none; } }
/* العينات ويجب إرساله في مستطيل واحد */
.trrow .shp { grid-column: span 2; display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; padding: 4px; margin: -4px 0; border-radius: 12px; background: #F5F0FF; border: 1.5px solid #C4B5FD; }
.trrow .shp .c { border-radius: 8px; }
@media (max-width: 900px) { .trrow .shp { grid-column: 1 / -1; } }
/* جدول التيشرتات داخل التفاصيل */
.shtw { overflow-x: auto; margin-top: 6px; border-radius: 12px; border: 1px solid #CBD5E1; }
.sht { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.sht th, .sht td { padding: 7px 8px; text-align: center; border-bottom: 1px solid #E2E8F0; border-inline-start: 1px solid #E2E8F0; min-width: 44px; }
.sht thead th { background: #0F766E; color: #fff; font-weight: 800; position: sticky; top: 0; }
.sht thead th:first-child { border-start-start-radius: 11px; } .sht thead th:last-child { border-start-end-radius: 11px; }
.sht td.lb, .sht th.lb { text-align: start; white-space: nowrap; font-weight: 700; min-width: 120px; }
.sht .z { color: #CBD5E1; }
.sht tr.r-req td { background: #F8FAFC; color: #111827; font-weight: 700; }
.sht tr.r-smp td { background: #FDF2F8; color: #9D174D; font-weight: 700; }
.sht tr.r-snd td { background: #DBEAFE; color: #1E3A8A; font-weight: 800; font-size: 15px; }
.sht tr.r-sent td { background: #DCFCE7; color: #14532D; font-weight: 700; }
.sht td.tt, .sht th.tt { background: #FEF3C7 !important; color: #111 !important; font-weight: 800; }
.sht thead th.tt { background: #B45309 !important; color: #fff !important; }
.sht tr:last-child td { border-bottom: 0; }
.sht td.lb small { font-weight: 500; font-size: 11px; opacity: .8; }
.shtot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: #FEF3C7; border: 1.5px solid #F59E0B; font-size: 14px; }
.shtot .lbl { font-weight: 800; background: #B45309; color: #fff; padding: 3px 12px; border-radius: 8px; }
.shtot span b { font-size: 17px; margin-inline-start: 4px; }
.shtot .smp b { color: #9D174D; } .shtot .req b { color: #111; } .shtot .snd { background: #DBEAFE; padding: 2px 10px; border-radius: 8px; } .shtot .snd b { color: #1E3A8A; }
.shtot .sent b { color: #14532D; } .shtot .eq { color: #6B7280; font-weight: 700; direction: ltr; unicode-bidi: plaintext; }
.shtot .xtra { color: #9D174D; font-size: 12px; }
/* عينات زيادة بالسالب */
.neg { font-style: normal; display: inline-block; margin-inline-start: 4px; color: #fff; background: #DC2626; border-radius: 6px; padding: 0 5px; font-size: 12px; font-weight: 800; line-height: 1.5; }
.shsur { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; padding: 9px 12px; border-radius: 12px; background: #FEE2E2; border: 1.5px solid #F87171; color: #991B1B; font-weight: 700; font-size: 13px; }
.shsur b { font-size: 16px; } .shsur span { background: #fff; border: 1px solid #FCA5A5; border-radius: 8px; padding: 1px 8px; }
.neg { direction: ltr; unicode-bidi: isolate; }
.shipbtn { background: #1E40AF !important; color: #fff !important; }
.shipbox { padding: 10px 12px; border-radius: 12px; background: #DBEAFE; border: 1.5px solid #93C5FD; margin: 8px 0; } .shipbox .big { font-size: 22px; color: #1E3A8A; }
.shst { display: inline-block; padding: 3px 8px; border-radius: 8px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.shst.ok { background: #DCFCE7; color: #14532D; } .shst.wait { background: #FEF3C7; color: #92400E; } .shst.no { background: #F1F5F9; color: #64748B; font-weight: 600; font-size: 11px; }
.trrow .act.st { flex-wrap: nowrap; gap: 4px; }
.trrow .act.st .btn.sm { padding: 4px 8px; }
.chgbtn { background: #B91C1C !important; color: #fff !important; margin-inline-start: auto; }
.chgtot { padding: 10px 12px; border-radius: 12px; background: #FEF3C7; border: 1.5px solid #F59E0B; font-weight: 700; } .chgtot b { font-size: 20px; color: #92400E; }
.smk-sold { background: #FEE2E2; color: #991B1B; }
.surcard { border: 2px solid #F87171; background: #FFF5F5; }
.surrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: #fff; border: 1px solid #FECACA; }
.surrow .szx { display: inline-block; margin-inline-end: 4px; background: #FEE2E2; color: #991B1B; border-radius: 8px; padding: 1px 8px; font-size: 12px; font-weight: 700; }
.surrow .negN { color: #fff; background: #DC2626; border-radius: 8px; padding: 2px 8px; direction: ltr; unicode-bidi: isolate; }
/* تمييز اللي اتشحن واللي لسه */
details.trrow { border-inline-start: 6px solid #F59E0B; }
details.trrow.shipped { border: 1.5px solid #4ADE80; border-inline-start: 6px solid #16A34A; background: #F0FDF4; }
details.trrow.shipped > summary { background: #DCFCE7; border-radius: 10px; }
details.trrow.shipped > summary > span:first-child > b { color: #14532D; }
.shlegend { display: flex; gap: 12px; font-size: 12px; font-weight: 700; margin: 4px 0; }
.shlegend span { display: inline-flex; align-items: center; gap: 6px; } .shlegend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.chgtbl { width: 100%; border-collapse: collapse; } .chgtbl th { background: #F1F5F9; font-size: 12px; padding: 6px; } .chgtbl td { padding: 4px 6px; text-align: center; border-bottom: 1px solid var(--line); }
.chgtbl .in { padding: 6px 8px; min-width: 70px; } .chgtbl td.lt { font-weight: 800; color: #92400E; }
.spcard summary { cursor: pointer; } .spcard { border: 1.5px solid #F59E0B; background: #FFFBEB; }
.sht tr.r-sold td { background: #FEE2E2; color: #991B1B; font-weight: 800; }
.shtot .sold { background: #FEE2E2; color: #991B1B; padding: 2px 10px; border-radius: 8px; font-weight: 700; } .shtot .sold b { color: #991B1B; }
/* حضانة / مدرسة داخل كارت المحافظة */
.gc-stage { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 6px; }
.gc-stage div { display: flex; align-items: center; justify-content: space-between; gap: 6px; background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.35); border-radius: 10px; padding: 3px 10px; }
.gc-stage span { font-size: 12px; font-weight: 700; white-space: nowrap; } .gc-stage b { font-size: 18px; font-weight: 900; }
.govcard.dim .gc-stage div { background: rgba(0,0,0,.04); border-color: rgba(0,0,0,.08); }
/* حسابات المحافظات — كروت زجاجية */
.acard .sh-top { display: flex; justify-content: space-between; align-items: center; } .acard .sh-name { font-size: 20px; font-weight: 900; }
.acard .ac-sub { font-size: 12px; font-weight: 700; opacity: .9; }
.ac-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ac-nums div { background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35); border-radius: 14px; padding: 8px 6px; text-align: center; backdrop-filter: blur(6px); box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
.ac-nums span { display: block; font-size: 12px; font-weight: 700; opacity: .92; } .ac-nums b { font-size: 21px; font-weight: 900; letter-spacing: -.3px; }
.ac-nums div.owe { background: rgba(255,255,255,.92); color: #B91C1C; border-color: #fff; } .ac-nums div.owe span { color: #7F1D1D; }
.ac-bar { position: relative; height: 18px; border-radius: 999px; background: rgba(255,255,255,.22); overflow: hidden; }
.ac-bar i { position: absolute; inset-block: 0; inset-inline-start: 0; background: rgba(255,255,255,.85); border-radius: 999px; }
.ac-bar em { position: relative; display: block; text-align: center; font-style: normal; font-size: 11px; font-weight: 800; line-height: 18px; color: #0F172A; }

/* ملف المحافظة / ملف المدرب — كروت زجاجية صغيرة */
.gf-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; margin-bottom: 12px; }
.gfs { position: relative; overflow: hidden; border-radius: 16px; padding: 10px 12px; color: #fff; box-shadow: 0 8px 20px -10px rgba(15,23,42,.45), inset 0 1px 0 rgba(255,255,255,.4); }
.gfs::after { content: ''; position: absolute; inset: 0 0 55% 0; background: linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,0)); pointer-events: none; }
.gfs span { display: block; font-size: 12px; font-weight: 700; opacity: .95; } .gfs b { font-size: 24px; font-weight: 900; letter-spacing: -.3px; }
.g-blue { background: linear-gradient(135deg,#3B82F6,#1D4ED8); } .g-sky { background: linear-gradient(135deg,#38BDF8,#0284C7); } .g-pink { background: linear-gradient(135deg,#F472B6,#DB2777); }
.g-indigo { background: linear-gradient(135deg,#818CF8,#4338CA); } .g-violet { background: linear-gradient(135deg,#A78BFA,#6D28D9); } .g-amber { background: linear-gradient(135deg,#FBBF24,#D97706); }
.g-teal { background: linear-gradient(135deg,#2DD4BF,#0F766E); } .g-red { background: linear-gradient(135deg,#F87171,#B91C1C); } .g-slate { background: linear-gradient(135deg,#94A3B8,#475569); }
.g-rose { background: linear-gradient(135deg,#FB7185,#BE123C); } .g-navy { background: linear-gradient(135deg,#60A5FA,#1E3A8A); } .g-green { background: linear-gradient(135deg,#4ADE80,#15803D); }
.gf-acc { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 8px; margin-bottom: 12px; border-radius: 16px; background: #F1F5F9; border: 1.5px solid #CBD5E1; }
.gf-acc div { border-radius: 12px; padding: 8px; text-align: center; border: 2px solid; } .gf-acc span { display: block; font-size: 13px; font-weight: 700; } .gf-acc b { font-size: 22px; font-weight: 900; }
.gf-acc .gm-due { background: #FEF9C3; border-color: #EAB308; color: #713F12; } .gf-acc .gm-paid { background: #DCFCE7; border-color: #22C55E; color: #14532D; } .gf-acc .gm-bal { background: #FEE2E2; border-color: #EF4444; color: #7F1D1D; }
.gf-tbl td, .gf-tbl th { white-space: nowrap; } .gf-tbl tr.gf-shipped td { background: #F0FDF4; }
.gf-sz { display: inline-flex; gap: 3px; align-items: center; background: #EEF2FF; color: #3730A3; border-radius: 8px; padding: 1px 6px; margin: 1px; font-size: 12px; } .gf-sz b { background: #fff; border-radius: 6px; padding: 0 5px; }
.gf-neg { color: #B91C1C !important; font-weight: 800; direction: ltr; unicode-bidi: isolate; }
.tf-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; margin-bottom: 12px; border-radius: 18px; color: #fff; background: linear-gradient(135deg,#1D4ED8,#7C3AED); }
.tf-head h1 { margin: 0; color: #fff; } .tf-head .badge { background: rgba(255,255,255,.2); color: #fff; } .tf-head .btn.ghost { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.4); }
.tf-sz tr.r-smp td { background: #FFFBEB; } .tf-sz tr.r-snd td { background: #F0FDFA; font-weight: 800; } .tf-sz tr.r-diff td { background: #F8FAFC; } .tf-sz tr.r-sold td { background: #FEE2E2; }
.tf-sz .neg { color: #B91C1C; direction: ltr; unicode-bidi: isolate; }
@media (max-width: 700px) { .gf-acc b { font-size: 17px; } .gfs b { font-size: 20px; } }
.tf-gov { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 14px 0 8px; padding: 8px 14px; border-radius: 12px; background: #F5F3FF; border-inline-start: 5px solid #7C3AED; font-size: 17px; }

.ta-box { border: 2px solid #A5B4FC; background: linear-gradient(180deg,#EEF2FF,#fff 120px); }
.ta-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; } .ta-bar .f { min-width: 240px; } .ta-bar .grow { flex: 1; }
.ta-bar #taq { font-size: 16px; padding: 12px 14px; }

.ta-list { display: flex; flex-direction: column; gap: 8px; }
.ta-row { border: 1.5px solid #E2E8F0; border-radius: 14px; background: #fff; }
.ta-row[open] { border-color: #818CF8; box-shadow: 0 6px 18px -10px rgba(79,70,229,.5); }
.ta-row summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; }
.ta-row summary::-webkit-details-marker { display: none; }
.ta-n { display: flex; flex-direction: column; } .ta-n b { font-size: 16px; }
.ta-m { display: flex; gap: 6px; } .ta-m span { display: flex; flex-direction: column; align-items: center; min-width: 92px; padding: 4px 10px; border-radius: 10px; font-size: 11.5px; font-weight: 700; border: 1.5px solid; }
.ta-m b { font-size: 16px; } .ta-m .d { background: #FEF9C3; border-color: #EAB308; color: #713F12; } .ta-m .p { background: #DCFCE7; border-color: #22C55E; color: #14532D; } .ta-m .b { background: #F1F5F9; border-color: #CBD5E1; color: #334155; } .ta-m .b.owe { background: #FEE2E2; border-color: #EF4444; color: #7F1D1D; }
.ta-st { padding: 0 14px 12px; }

/* جدول حساب المدرب */
.acct{border-radius:16px;overflow:hidden;border:2px solid #C7D2FE;background:#fff;box-shadow:0 8px 22px -14px rgba(79,70,229,.55)}
.acct table{width:100%;border-collapse:collapse;margin:0}
.acct thead th{background:linear-gradient(135deg,#4F46E5,#7C3AED);color:#fff;font-weight:800;font-size:13px;padding:9px 12px;text-align:right;border:0}
.acct thead th:not(:first-child){text-align:center;width:22%}
.acct tbody td{padding:8px 12px;border:0;border-bottom:1px solid #EEF2FF;font-size:14px;text-align:right}
.acct tbody td.num{text-align:center;font-weight:800}
.acct tbody tr:nth-child(even) td{background:#FAFAFF}
.acct .ic{display:inline-block;width:26px;text-align:center}
.acct .dt{font-size:11.5px;color:#64748B;margin-inline-start:26px}
.acct .gv{font-size:11px;background:#EEF2FF;color:#4338CA;border-radius:6px;padding:0 6px}
.acct .minus{color:#15803D}
.acct tr.k-surplus td{background:#FFF1F2 !important} .acct tr.k-siblings td{background:#F0FDF4 !important} .acct tr.k-other td{background:#F8FAFC !important}
.acct tfoot td{padding:9px 12px;font-weight:900;font-size:15px;border:0;text-align:right}
.acct tfoot td.num{text-align:center;font-size:17px}
.acct .t-due td{background:#FEF9C3;color:#713F12;border-top:2px solid #EAB308}
.acct .t-paid td{background:#DCFCE7;color:#14532D}
.acct .t-bal td{background:#F1F5F9;color:#334155} .acct .t-bal.owe td{background:#FEE2E2;color:#7F1D1D}
.acct .t-pend td{background:#FFF7ED;color:#9A3412;font-size:13px}

/* حساب المدرب: مربعات طولية */
.acct2{display:grid;grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:8px}
.acct2 .ab{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:4px;text-align:center;min-height:150px;padding:10px 6px;border-radius:16px;border:2px solid #C7D2FE;background:linear-gradient(180deg,#EEF2FF,#fff)}
.acct2 .ab .ic{font-size:24px;line-height:1}
.acct2 .ab .lb{font-weight:800;font-size:13px;color:#1E1B4B;line-height:1.3}
.acct2 .ab .gv{font-size:10.5px;background:#E0E7FF;color:#4338CA;border-radius:6px;padding:0 6px}
.acct2 .ab .q{font-size:11.5px;color:#475569;font-weight:700}
.acct2 .ab .q b{font-size:15px;color:#0F172A}
.acct2 .ab .am{font-size:19px;font-weight:900;color:#1E1B4B;border-top:1.5px dashed #C7D2FE;padding-top:4px;width:100%}
.acct2 .ab .dt{font-size:10.5px;color:#64748B;line-height:1.35}
.acct2 .ab.k-siblings{border-color:#86EFAC;background:linear-gradient(180deg,#DCFCE7,#fff)} .acct2 .ab.k-siblings .am{color:#15803D}
.acct2 .ab.k-surplus{border-color:#FDA4AF;background:linear-gradient(180deg,#FFE4E6,#fff)} .acct2 .ab.k-shirts{border-color:#A5B4FC}
.acct2 .ab.k-items{border-color:#F9A8D4;background:linear-gradient(180deg,#FCE7F3,#fff)} .acct2 .ab.k-companions{border-color:#99F6E4;background:linear-gradient(180deg,#CCFBF1,#fff)}
.acct2 .ab.k-card_trainer,.acct2 .ab.k-card_assistant{border-color:#CBD5E1;background:linear-gradient(180deg,#F1F5F9,#fff)} .acct2 .ab.k-other{border-color:#E2E8F0;background:#F8FAFC}
.acct3{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:10px}
.acct3 div{border-radius:16px;padding:10px 6px;text-align:center;border:2px solid;min-height:84px;display:flex;flex-direction:column;justify-content:center} .acct3 span{font-size:13px;font-weight:800} .acct3 b{font-size:22px;font-weight:900}
.acct3 .t-due{background:#FEF9C3;border-color:#EAB308;color:#713F12} .acct3 .t-paid{background:#DCFCE7;border-color:#22C55E;color:#14532D} .acct3 .t-bal{background:#F1F5F9;border-color:#CBD5E1;color:#334155} .acct3 .t-bal.owe{background:#FEE2E2;border-color:#EF4444;color:#7F1D1D}
.acct-pend{margin-top:6px;text-align:center;font-size:12.5px;font-weight:700;color:#9A3412;background:#FFF7ED;border-radius:10px;padding:5px}

/* الكارنيهات والشهادات */
.dz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.dz { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 16px; border: 2px dashed #C7D2FE; background: linear-gradient(180deg,#F5F3FF,#fff); }
.dz-h { display: flex; align-items: center; gap: 8px; font-size: 16px; } .dz-h span:first-child { font-size: 22px; } .dz-h .badge { margin-inline-start: auto; }
.dz-prev { width: 220px; margin: 0 auto; overflow: hidden; border-radius: 8px; box-shadow: 0 6px 16px -8px rgba(15,23,42,.45); background: #fff; }
.dz-empty { display: grid; place-items: center; height: 120px; border-radius: 10px; background: #F1F5F9; color: #64748B; font-size: 13px; }
.dz-prev { position: relative; direction: ltr; } .dz-prev > div { position: absolute; left: 0; top: 0; }

/* صفحة الاختبار */
.ex-demo { display: flex; flex-direction: column; max-width: 360px; border: 2px solid #CBD5E1; border-radius: 12px; overflow: hidden; font-size: 13px; }
.ex-demo > div { display: flex; flex-direction: column; gap: 4px; padding: 14px; min-height: 120px; } .ex-demo .t { background: #EFF6FF; border-bottom: 2px dashed #94A3B8; } .ex-demo .b { background: #F5F3FF; } .ex-demo span { color: #475569; }
.ex-logo { display: flex; gap: 12px; align-items: center; } .ex-logo .lgbox { width: 110px; height: 74px; border: 2px dashed #CBD5E1; border-radius: 12px; display: grid; place-items: center; background: #fff; overflow: hidden; } .ex-logo .lgbox img { max-width: 100%; max-height: 100%; object-fit: contain; } .ex-logo .lgbox span { font-size: 12px; color: #64748B; }

.cpr { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin: 10px 0; }
.cpr div { border-radius: 12px; padding: 8px; text-align: center; background: #F1F5F9; border: 1.5px solid #CBD5E1; } .cpr span { display: block; font-size: 12px; color: #475569; font-weight: 700; } .cpr b { font-size: 18px; }
.cpr .fee { background: #FFF7ED; border-color: #FDBA74; color: #9A3412; } .cpr .net { background: #DCFCE7; border-color: #22C55E; color: #14532D; }
.cpt td { vertical-align: middle; } .cp-eye { font-size: 18px; padding: 4px 10px; }

/* أقسام المصنع */
.fx-secs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 14px; }
.fx-sec { display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: 20px; color: #fff; text-decoration: none; box-shadow: 0 12px 26px -16px rgba(15,23,42,.6), inset 0 1px 0 rgba(255,255,255,.35); transition: transform .15s; }
.fx-sec:hover { transform: translateY(-3px); } .fx-sec .ic { font-size: 34px; } .fx-sec b { font-size: 22px; } .fx-sec .small { opacity: .9; }
.fx-sec .nums { display: flex; gap: 8px; margin-top: 6px; } .fx-sec .nums span { background: rgba(255,255,255,.2); border-radius: 10px; padding: 2px 10px; font-size: 13px; font-weight: 700; }
.fx-sec.t-sky, .fx-shead.t-sky { background: linear-gradient(135deg,#38BDF8,#1D4ED8); } .fx-sec.t-rose, .fx-shead.t-rose { background: linear-gradient(135deg,#FB7185,#BE123C); } .fx-sec.t-violet, .fx-shead.t-violet { background: linear-gradient(135deg,#A78BFA,#5B21B6); }
.fx-shead { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-radius: 20px; color: #fff; margin-bottom: 12px; } .fx-shead .ic { font-size: 40px; } .fx-shead h1 { margin: 0; color: #fff; }
.fx-sech { display: flex; align-items: center; gap: 10px; margin: 16px 0 8px; padding: 6px 14px; border-radius: 12px; background: #F1F5F9; border-inline-start: 5px solid #1D4ED8; }
.fx-branches { border: 2px dashed #CBD5E1; background: #F8FAFC; }
@media (max-width: 800px) { .fx-secs { grid-template-columns: 1fr; } }
.fx-secs .fx-sec { min-height: 190px; justify-content: center; }

.fx-parts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 12px; }
.fx-part { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px; border-radius: 16px; border: 2px solid #E2E8F0; background: #fff; text-decoration: none; color: #0F172A; font-weight: 800; text-align: center; transition: .15s; }
.fx-part b { font-size: 20px; color: #1D4ED8; } .fx-part:hover { border-color: #93C5FD; }
.fx-part.on { background: linear-gradient(135deg,#1D4ED8,#7C3AED); color: #fff; border-color: transparent; box-shadow: 0 10px 22px -14px rgba(29,78,216,.8); } .fx-part.on b { color: #fff; }
@media (max-width: 900px) { .fx-parts { grid-template-columns: repeat(2, 1fr); } }
.rent-sum { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-radius: 14px; background: #FFFBEB; border: 2px solid #FCD34D; color: #78350F; } .rent-sum b { font-size: 22px; } .rent-sum small { color: #92400E; }
.fx-parts { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 900px) { .fx-parts { grid-template-columns: repeat(2, 1fr); } }
.gr { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; } .gr-pure { background: #DCFCE7; color: #166534; border: 1px solid #86EFAC; } .gr-burnt { background: #FFEDD5; color: #9A3412; border: 1px solid #FDBA74; }

/* كل خامة في جدول لوحدها */
.mat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); gap: 14px; margin-top: 12px; }
.mat-card { background: #fff; border-radius: 18px; border: 1.5px solid #E2E8F0; overflow: hidden; box-shadow: 0 8px 20px -16px rgba(15,23,42,.5); }
.mat-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 16px; background: linear-gradient(135deg,#EFF6FF,#F5F3FF); border-bottom: 1.5px solid #E2E8F0; }
.mat-h b { font-size: 18px; display: block; } .mat-h span { font-size: 12.5px; color: #475569; font-weight: 700; }
.mat-card .t { margin: 0; } .mat-card .t td, .mat-card .t th { padding: 8px 12px; }
@media (max-width: 700px) { .mat-grid { grid-template-columns: 1fr; } }
.mat-grid { grid-template-columns: 1fr; }
.mat-card .t .btn { white-space: nowrap; }
.mat-card .t td:first-child { width: 120px; } .mat-card .t td:last-child { width: 1%; white-space: nowrap; }

.fx-parts { grid-template-columns: repeat(4, 1fr); } .fx-part .n { background: #F59E0B; color: #fff; border-radius: 999px; padding: 0 7px; font-size: 12px; }
.req-box { border: 2px solid #FCD34D; background: #FFFBEB; }
.out-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.out-card { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 14px; border: 1.5px solid #C7D2FE; background: linear-gradient(180deg,#EEF2FF,#fff); } .out-card.off { opacity: .55; } .out-card b { font-size: 16px; } .out-card span { font-size: 13px; color: #475569; } .out-card .pr { color: #1D4ED8; font-weight: 800; font-size: 15px; }
.rc-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; } .rc-sum div { border-radius: 12px; padding: 8px; text-align: center; background: #F1F5F9; border: 1.5px solid #CBD5E1; } .rc-sum span { display: block; font-size: 12px; color: #475569; font-weight: 700; } .rc-sum b { font-size: 18px; }
.pl { display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; border: 2px solid #E2E8F0; max-width: 640px; }
.pl-row { display: flex; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid #E2E8F0; font-size: 15px; } .pl-row b { font-size: 16px; }
.pl-row.rev { background: #DCFCE7; color: #14532D; font-weight: 800; } .pl-row.cost { background: #F1F5F9; font-weight: 800; } .pl-row.win { background: #16A34A; color: #fff; font-size: 18px; } .pl-row.loss { background: #DC2626; color: #fff; font-size: 18px; }
@media (max-width: 900px) { .fx-parts { grid-template-columns: repeat(2, 1fr); } }
.fx-part b, .pl-row b { direction: ltr; unicode-bidi: isolate; }

.rc-mini { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 6px; padding: 10px 16px; } .rc-mini div { border-radius: 10px; padding: 6px; text-align: center; background: #F8FAFC; border: 1px solid #E2E8F0; } .rc-mini span { display: block; font-size: 11.5px; color: #64748B; font-weight: 700; } .rc-mini b { font-size: 16px; direction: ltr; unicode-bidi: isolate; }
.out-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 16px 12px; font-size: 12.5px; color: #475569; } .out-list span { background: #EEF2FF; border-radius: 8px; padding: 2px 8px; } .out-list a { cursor: pointer; color: #1D4ED8; }
.rc-mini b { direction: rtl; unicode-bidi: normal; }

/* الاسطمبات */
.mold-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-top: 12px; }
.mold { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 18px; background: #fff; border: 1.5px solid #E2E8F0; box-shadow: 0 8px 20px -16px rgba(15,23,42,.5); } .mold.off { opacity: .55; }
.mold-h { display: flex; justify-content: space-between; } .mold-h b { font-size: 17px; display: block; } .mold-h span { font-size: 13px; color: #475569; }
.mold-mats { display: flex; flex-direction: column; gap: 6px; } .mold-mats > div { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; border-radius: 10px; background: #F8FAFC; border: 1px solid #E2E8F0; } .mold-mats b { color: #1D4ED8; } .mold-mats small { color: #64748B; font-weight: 600; }
.fx-parts { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 900px) { .fx-parts { grid-template-columns: repeat(2, 1fr); } }
/* أجزاء القسم متقسمة 3 مجموعات */
.fx-grp { background: #fff; border: 1px solid #E2E8F0; border-radius: 16px; padding: 10px 12px 2px; margin-bottom: 12px; }
.fx-grp-h { font-weight: 800; font-size: 14px; color: #475569; margin: 0 4px 8px; }
.fx-grp .fx-parts { grid-template-columns: repeat(5, 1fr); margin-bottom: 10px; }
@media (max-width: 760px) { .fx-grp .fx-parts { grid-template-columns: repeat(2, 1fr); } }
/* النظام الشهري للمصنع */
.fx-month { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff; border: 1px solid #E2E8F0; border-radius: 16px; padding: 10px 12px; margin-bottom: 12px; }
.fx-month-c { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.fx-month-c b { font-size: 17px; } .fx-month-c .in { width: 160px; }
@media (max-width: 760px) { .fx-month { flex-wrap: wrap; } .fx-month-c { order: -1; width: 100%; } }
/* الخامات: تصميم جديد */
.mt2-sum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 12px; }
.mt2-sum > div { border-radius: 18px; padding: 14px 16px; color: #fff; display: flex; flex-direction: column; gap: 2px; box-shadow: 0 10px 22px -16px rgba(15,23,42,.7); }
.mt2-sum span { font-size: 13px; font-weight: 700; opacity: .92; } .mt2-sum b { font-size: 26px; font-weight: 900; direction: ltr; unicode-bidi: isolate; text-align: right; } .mt2-sum small { font-size: 12px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt2-sum .s1 { background: linear-gradient(135deg,#6366F1,#8B5CF6); } .mt2-sum .s2 { background: linear-gradient(135deg,#0EA5E9,#06B6D4); } .mt2-sum .s3 { background: linear-gradient(135deg,#10B981,#059669); } .mt2-sum .s4 { background: linear-gradient(135deg,#94A3B8,#64748B); } .mt2-sum .s4.warn { background: linear-gradient(135deg,#F97316,#EF4444); }
.mt2-bar-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; margin-bottom: 12px; } .mt2-bar-top .in { max-width: 280px; } .mt2-bar-top .chips { flex: 1; } .mt2-bar-top .chip { cursor: pointer; }
.mt2-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; }
.mt2 { background: #fff; border-radius: 20px; border: 1.5px solid var(--bg); overflow: hidden; box-shadow: 0 10px 24px -18px rgba(15,23,42,.55); }
.mt2-h { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: linear-gradient(135deg, var(--bg), #fff); border-bottom: 3px solid var(--c); }
.mt2-ic { width: 42px; height: 42px; border-radius: 14px; background: var(--c); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 15px; flex: none; box-shadow: 0 6px 14px -8px var(--c); }
.mt2-h b { font-size: 18px; display: block; color: #0F172A; } .mt2-h span { font-size: 12.5px; color: #475569; font-weight: 700; }
.mt2-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; padding: 12px; }
.mt2-g { border-radius: 16px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; border: 1.5px solid #E2E8F0; background: #F8FAFC; }
.mt2-g.g-pure { background: linear-gradient(180deg,#F0FDF4,#fff); border-color: #BBF7D0; } .mt2-g.g-burnt { background: linear-gradient(180deg,#FFF7ED,#fff); border-color: #FED7AA; } .mt2-g.off { opacity: .55; }
.mt2-gh { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .mt2-low { font-size: 11.5px; font-weight: 800; color: #B91C1C; background: #FEE2E2; border-radius: 999px; padding: 1px 8px; }
.mt2-kg { display: flex; align-items: baseline; gap: 6px; } .mt2-kg b { font-size: 28px; font-weight: 900; color: #0F172A; direction: ltr; unicode-bidi: isolate; } .mt2-kg span { color: #64748B; font-weight: 700; }
.mt2-bar { height: 7px; background: #E2E8F0; border-radius: 999px; overflow: hidden; } .mt2-bar i { display: block; height: 100%; border-radius: 999px; }
.mt2-kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; } .mt2-kv div { display: flex; flex-direction: column; } .mt2-kv span { font-size: 11px; color: #64748B; font-weight: 700; } .mt2-kv b { font-size: 13.5px; direction: ltr; unicode-bidi: isolate; text-align: right; }
.mt2-act { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; } .mt2-act .btn.icon { padding-inline: 9px; }
.mt2-hist summary { cursor: pointer; font-weight: 800; color: #334155; padding: 4px 2px; } .mt2-hist[open] summary { margin-bottom: 8px; }
@media (max-width: 760px) { .mt2-sum { grid-template-columns: repeat(2, 1fr); } .mt2-grid { grid-template-columns: 1fr; } .mt2-bar-top .in { max-width: none; } }
.gr-none { background: #F1F5F9; color: #475569; border: 1px solid #CBD5E1; }
@media (max-width: 760px) { .mt2-bar-top .chips { flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; } .mt2-bar-top .chip { white-space: nowrap; } .mt2-bar-top #addmat { width: 100%; } }
/* الخامات — كروت زجاجية زي البطولات (--c فاتح، --bg غامق) */
.mt2-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.mt2 { background: linear-gradient(140deg, var(--c), var(--bg)); border: 0; color: #fff; box-shadow: 0 14px 28px -16px var(--bg), inset 0 1px 0 rgba(255,255,255,.3); transition: transform .15s, box-shadow .15s; }
.mt2:hover { transform: translateY(-3px); box-shadow: 0 20px 34px -16px var(--bg); }
.mt2-h { background: transparent; border-bottom: 1px solid rgba(255,255,255,.28); }
.mt2-h b { color: #fff; font-family: var(--display); font-size: 21px; text-shadow: 0 2px 8px rgba(0,0,0,.2); } .mt2-h span { color: rgba(255,255,255,.92); }
.mt2-ic { background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.45); backdrop-filter: blur(6px); box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
.mt2-h .btn { background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.45); color: #fff; }
.mt2-g, .mt2-g.g-pure, .mt2-g.g-burnt, .mt2-g.g-none { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35); backdrop-filter: blur(6px); box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
.mt2-kg b, .mt2-kv b { color: #fff; } .mt2-kg span, .mt2-kv span { color: rgba(255,255,255,.85); }
.mt2-kv div { background: rgba(255,255,255,.14); border-radius: 10px; padding: 4px 8px; }
.mt2-bar { background: rgba(255,255,255,.25); } .mt2-bar i { background: rgba(255,255,255,.9); }
.mt2-g .gr { background: rgba(255,255,255,.92); border: 0; } .mt2-g .gr-pure { color: #166534; } .mt2-g .gr-burnt { color: #9A3412; } .mt2-g .gr-none { color: #334155; }
.mt2-low { background: #fff; }
.mt2-act .btn { background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.45); color: #fff; box-shadow: none; }
.mt2-act .btn[data-matb] { background: #fff; color: var(--bg); border-color: #fff; font-weight: 800; }
.mt2-act .btn.danger { color: #fff; }
.mt2-grid { align-items: start; }
.rc2-stock { margin-inline-start: auto; font-size: 11.5px; font-weight: 700; opacity: .9; }
.rc2-molds { display: flex; flex-wrap: wrap; gap: 4px; } .rc2-molds span { font-size: 11.5px; font-weight: 700; background: rgba(255,255,255,.14); border-radius: 999px; padding: 2px 8px; }
.mt2-kg b span { font-size: 22px; }
.mt2-act .btn.wbtn { background: #fff; color: var(--bg); border-color: #fff; font-weight: 800; }
.mt2-kv b.u, .mt2-kg b { direction: rtl; text-align: start; } .mt2-sum b span { color: #fff; }
.mt2-kg b span { color: #fff !important; font-size: 24px; }
/* كل خامة بعرض الصفحة: البيور والمحروق جنب بعض جوه الكارت */
.mt2-grid { grid-template-columns: 1fr; }
.mt2-body { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 14px 16px; }
.mt2-h { padding: 14px 18px; }
.mt2-kv { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
@media (max-width: 760px) { .mt2-body { grid-template-columns: 1fr; } }
/* خزنة المصنع */
.cs-home { display: flex; align-items: center; gap: 14px; padding: 16px 20px; margin: 0 0 14px; border-radius: 20px; color: #fff; text-decoration: none; background: linear-gradient(135deg, #0F766E, #064E3B); box-shadow: 0 14px 28px -16px #064E3B; }
.cs-home .ic { font-size: 30px; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35); }
.cs-home b { display: block; font-size: 19px; } .cs-home span { font-size: 13px; opacity: .9; } .cs-home .v { font-size: 26px; font-weight: 900; direction: ltr; unicode-bidi: isolate; }
.cs-secs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 12px; }
.cs-secs > div { background: #fff; border: 1px solid #E2E8F0; border-radius: 14px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; } .cs-secs i { font-style: normal; font-weight: 800; }
.cs-tag { display: inline-block; font-size: 12.5px; font-weight: 800; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.cs-pay { background: #DBEAFE; color: #1E40AF; } .cs-ext { background: #D1FAE5; color: #065F46; } .cs-man { background: #EDE9FE; color: #5B21B6; } .cs-tag.cs-out { background: #FEE2E2; color: #991B1B; }
.btn.danger-soft { background: #DC2626; border-color: #DC2626; color: #fff; }
.cs-fin { background: #FEF3C7; color: #92400E; }
.cs-acts { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; } .cs-acts .btn { flex: 1 1 160px; }
.btn.cs-buy { background: #7C3AED; border-color: #7C3AED; color: #fff; }
.cs-buyt { background: #EDE9FE; color: #5B21B6; }
.cs-home2 { background: linear-gradient(135deg, #7C3AED, #4C1D95); box-shadow: 0 14px 28px -16px #4C1D95; }
/* المستخدمين والصلاحيات */
.uc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.uc { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid #E2E8F0; border-radius: 18px; padding: 14px; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.uc:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -16px rgba(15,23,42,.5); } .uc.off { opacity: .6; }
.uc-av { width: 46px; height: 46px; border-radius: 14px; background: linear-gradient(135deg, var(--primary, #0E8079), #34D399); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 20px; flex: none; }
.uc b { display: block; font-size: 16px; } .uc .num { font-size: 12.5px; color: #64748B; direction: ltr; display: inline-block; }
.uc-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; } .uc-tags span { font-size: 11.5px; font-weight: 800; border-radius: 999px; padding: 2px 9px; }
.uc-role { background: #E0F2FE; color: #075985; } .uc-cust { background: #FEF3C7; color: #92400E; } .uc-n { background: #F1F5F9; color: #475569; } .uc-off { background: #FEE2E2; color: #991B1B; }
.pg { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.pg-g { border: 1px solid #E2E8F0; border-radius: 16px; background: #fff; overflow: hidden; }
.pg-h { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #F8FAFC; border-bottom: 1px solid #E2E8F0; } .pg-h b { flex: 1; font-size: 15px; }
.pg-ic { font-size: 20px; } .pg-all { font-size: 12.5px; font-weight: 700; color: #475569; display: flex; gap: 4px; align-items: center; cursor: pointer; }
.pg-m { padding: 8px 12px; border-bottom: 1px dashed #E2E8F0; } .pg-m:last-child { border-bottom: 0; } .pg-ml { font-weight: 800; font-size: 13.5px; margin-bottom: 6px; color: #0F172A; }
.pg-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.pg-a { font-size: 12.5px; font-weight: 700; border: 1.5px solid #E2E8F0; background: #fff; color: #64748B; border-radius: 999px; padding: 4px 10px; cursor: pointer; user-select: none; transition: all .12s; }
.pg-a.on { background: #ECFDF5; border-color: #34D399; color: #065F46; } .pg-a:has(input:disabled) { cursor: default; opacity: .85; }
@media (max-width: 760px) { .pg { grid-template-columns: 1fr; } }
.tier2 { display: grid; grid-template-columns: 70px 1fr 1fr 1fr auto; gap: 8px; align-items: end; background: #fff; border: 1px solid #E2E8F0; border-radius: 12px; padding: 8px 10px; }
.tier2 .tn { font-size: 13px; color: var(--primary, #0E8079); padding-bottom: 10px; } .tier2 label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 700; color: #475569; }
@media (max-width: 560px) { .tier2 { grid-template-columns: 1fr 1fr 1fr auto; } .tier2 .tn { grid-column: 1 / -1; padding: 0; } }
/* سلة المحذوفات */
.bin-list { display: flex; flex-direction: column; gap: 10px; }
.bin-it { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #E2E8F0; border-radius: 16px; padding: 12px 14px; }
.bin-ic { width: 42px; height: 42px; border-radius: 12px; background: #FEF2F2; display: grid; place-items: center; font-size: 20px; flex: none; }
.bin-k { font-size: 12px; font-weight: 800; background: #F1F5F9; color: #334155; border-radius: 999px; padding: 2px 9px; }
.bin-fs { display: flex; flex-wrap: wrap; gap: 6px; } .bin-f { font-size: 12px; background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 8px; padding: 2px 8px; } .bin-f i { font-style: normal; color: #64748B; }
@media (max-width: 640px) { .bin-it { flex-wrap: wrap; } .bin-it > .row { width: 100%; justify-content: flex-end; } }
.pg-x { background: #F8FAFC; }

/* المخزن العام للمصنع */
.cs-home3 { background: linear-gradient(135deg, #0369A1, #0C4A6E); box-shadow: 0 14px 28px -16px #0C4A6E; }
.wh-head { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; padding: 18px 20px; margin-bottom: 12px; border-radius: 20px; color: #fff; background: linear-gradient(135deg, #0369A1, #0C4A6E); }
.wh-head h2 { color: #fff; margin: 0 0 2px; } .wh-head span { font-size: 13px; opacity: .9; }
.wh-stats { display: flex; flex-wrap: wrap; gap: 10px; } .wh-stats > div { min-width: 96px; padding: 10px 14px; border-radius: 14px; text-align: center; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); }
.wh-stats b { display: block; font-size: 22px; font-weight: 900; direction: ltr; unicode-bidi: isolate; } .wh-stats .bad { background: rgba(239,68,68,.45); }
.gr-other { background: #EEF2FF; color: #3730A3; }

/* صفحة الجزء جوه قسم المصنع: عنوان مضغوط + شريط تنقل بيتسحب — المحتوى يظهر على طول من غير نزول */
.fxd-top { gap: 12px; padding: 12px 14px; margin-bottom: 0; border-radius: 20px 20px 0 0; }
.fxd-back { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.35); color: #fff; font-size: 22px; font-weight: 900; text-decoration: none; }
.fxd-ttl { flex: 1; min-width: 0; } .fxd-ttl span { font-size: 12.5px; opacity: .9; } .fxd-top .fxd-ttl h1 { font-size: 21px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fxd-m { flex: none; display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 14px; background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.35); }
.fxd-m a, .fxd-m i { width: 30px; height: 34px; display: grid; place-items: center; color: #fff; font-size: 22px; font-weight: 900; text-decoration: none; font-style: normal; }
.fxd-m label { position: relative; padding: 0 4px; font-size: 13.5px; white-space: nowrap; cursor: pointer; } .fxd-m label input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.fxd-tabs { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 8px 10px; margin-bottom: 14px; background: #fff; border: 1px solid #E2E8F0; border-top: 0; border-radius: 0 0 20px 20px; box-shadow: 0 10px 20px -18px rgba(15,23,42,.6); }
.fxd-tabs::-webkit-scrollbar { display: none; }
.fxd-tabs a { flex: none; padding: 8px 14px; border-radius: 999px; font-weight: 800; font-size: 14px; color: #334155; text-decoration: none; white-space: nowrap; background: #F1F5F9; }
.fxd-tabs a.on { background: #0F172A; color: #fff; } .fxd-tabs a:focus-visible, .fxd-back:focus-visible { outline: 3px solid #93C5FD; outline-offset: 2px; }
.fxd-tabs .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #F59E0B; vertical-align: middle; } .fxd-tabs .sep { flex: none; width: 1px; height: 22px; background: #CBD5E1; margin: 0 2px; }
@media (max-width: 520px) { .fxd-top .fxd-ttl h1 { font-size: 18px; } .fxd-m label { font-size: 12.5px; } }
/* شريط التنقل: لمسة واحدة كفاية */
.fxd-tabs { overscroll-behavior-x: contain; } .fxd-tabs a { padding: 12px 16px; font-size: 15px; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.fxd-tabs a.busy { opacity: .75; } .fx-part { -webkit-tap-highlight-color: transparent; } .fx-part:active { transform: scale(.97); }

/* بيانات الشحن في أوردر مبيعات 2: الراسل والمرسل إليه */
.shipaddr { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .sa-box { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid #E2E8F0; border-radius: 14px; background: #F8FAFC; }
@media (max-width: 640px) { .shipaddr { grid-template-columns: 1fr; } }

/* ملخص الشحن في أوردر مبيعات 2 */
.shipsum { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: stretch; padding: 12px; border: 1px solid #E2E8F0; border-radius: 16px; background: #F8FAFC; }
.shipsum > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .shipsum span { font-size: 12.5px; color: #64748B; font-weight: 700; } .shipsum small { color: #334155; overflow-wrap: anywhere; }
.shipsum .paid { grid-column: 1 / -1; text-align: center; font-weight: 900; color: #065F46; background: #D1FAE5; border: 2px solid #34D399; border-radius: 12px; padding: 6px; }
.shipsum #editaddr { grid-column: 1 / -1; justify-self: start; }
@media (max-width: 560px) { .shipsum { grid-template-columns: 1fr; } }

/* ألوان جدول الطلبات في الإعدادات */
.tc-prev { display: grid; grid-template-columns: 1.2fr 1.4fr .7fr 1fr 1.1fr; gap: 3px; padding: 4px; border-radius: 14px; background: #E2E8F0; }
.tc-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border: 0; border-radius: 10px; cursor: pointer; font: inherit; outline-offset: 2px; }
.tc-cell small { font-size: 11.5px; opacity: .8; } .tc-cell b { font-size: 15px; } .tc-cell.on { outline: 3px solid #0F172A; }
.tc-pal { display: flex; flex-direction: column; gap: 6px; }
.tc-row { display: grid; grid-template-columns: 64px repeat(5, 1fr); gap: 6px; align-items: center; } .tc-row span { font-size: 12.5px; font-weight: 700; color: #475569; }
.tc-sw { height: 30px; border-radius: 9px; border: 1px solid rgba(15,23,42,.12); cursor: pointer; } .tc-sw.on { outline: 3px solid #0F172A; outline-offset: 2px; }
.tc-sw:focus-visible, .tc-cell:focus-visible { outline: 3px solid #93C5FD; }

/* تعديل الطلب: السطر المتغير والزرار بيستناك تحفظ */
td.lt-chg { color: #B45309 !important; font-weight: 900; background: #FFFBEB !important; }
.btn.btn-hot { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(14,128,121,.18); }

/* فاتورة بمقابل */
.codbox { width: 100%; display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px dashed #F59E0B; border-radius: 14px; background: #FFFBEB; }
.codrow { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; } .codrow > div { display: flex; flex-direction: column; } .codrow span { font-size: 12px; color: #92400E; font-weight: 700; } .codrow b { font-size: 18px; }
.codrow .op { font-size: 22px; font-weight: 900; color: #92400E; padding-bottom: 8px; } .codrow .tot b { font-size: 22px; color: #065F46; } .codrow .f { width: 150px; }
.shipsum .paid.cod { color: #92400E; background: #FEF3C7; border-color: #F59E0B; }

/* صلاحية تعديل الأسعار لمدربين محددين */
.pg-tr { width: 100%; display: flex; flex-direction: column; gap: 6px; margin-top: 8px; padding: 10px; border: 1px dashed #93C5FD; border-radius: 12px; background: #F8FBFF; }
.pg-trl { display: flex; flex-wrap: wrap; gap: 6px; max-height: 190px; overflow: auto; }
.pg-t { display: inline-flex; flex-direction: column; padding: 6px 10px; border-radius: 10px; border: 1px solid #E2E8F0; background: #fff; cursor: pointer; font-weight: 700; font-size: 13px; } .pg-t small { color: #64748B; font-weight: 400; font-size: 11px; }
.pg-t.on { background: #1D4ED8; color: #fff; border-color: #1D4ED8; } .pg-t.on small { color: #DBEAFE; }
.in.ro-price { background: #F1F5F9; color: #64748B; pointer-events: none; }

/* صفحة الاختبار: كورس · حضانة · مدرسة كل واحدة في خانة */
.ex-kinds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ex-k { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 16px; border: 2px solid #E2E8F0; background: #F8FAFC; } .ex-k h3 { margin: 0; font-size: 17px; }
.ex-k.ex-course { border-color: #BFDBFE; background: #EFF6FF; } .ex-k.ex-nursery { border-color: #FBCFE8; background: #FDF2F8; } .ex-k.ex-school { border-color: #BBF7D0; background: #F0FDF4; }
@media (max-width: 900px) { .ex-kinds { grid-template-columns: 1fr; } }
.gc-stage { grid-template-columns: 1fr 1fr 1fr; }

/* الحساب القديم للمدرب (الأبلكيشن القديم) */
.oldacc { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #FFFBEB; border: 1px dashed #F59E0B; }
.oldacc .oa-v { display: flex; flex-direction: column; align-items: center; min-width: 80px; } .oldacc .oa-v b { font-size: 17px; }
.tr-acts { white-space: nowrap; } .tr-acts .btn { margin: 1px; }

/* قائمة المحافظات: كل محافظة صف بعرض الشاشة */
.govlist { display: flex; flex-direction: column; gap: 10px; }
.govrow { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 18px; color: #fff; text-decoration: none; background: linear-gradient(140deg, var(--g1), var(--g2)); box-shadow: 0 10px 22px -14px var(--g2), inset 0 1px 0 rgba(255,255,255,.25); }
.govrow.done { opacity: .7; }
.govrow .gr-name { display: flex; align-items: center; gap: 10px; flex: 0 0 210px; min-width: 0; }
.govrow .gr-n { flex: none; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.25); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.govrow .gc-name { font-size: 19px; }
.govrow .gr-stats { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; }
.govrow .gr-stats > div { display: flex; flex-direction: column; align-items: center; min-width: 78px; padding: 6px 10px; border-radius: 10px; background: rgba(255,255,255,.18); }
.govrow .gr-stats b { font-family: var(--display); font-size: 18px; line-height: 1.1; } .govrow .gr-stats span { font-size: 11px; opacity: .92; font-weight: 600; white-space: nowrap; }
.govrow .gr-stats .feebox { cursor: pointer; background: rgba(255,255,255,.3); } .govrow .gr-stats .feebox:hover { background: rgba(255,255,255,.5); }
@media (max-width: 700px) { .govrow { flex-wrap: wrap; } .govrow .gr-name { flex: 1 1 auto; } .govrow .gr-stats { order: 3; flex: 1 1 100%; } .govrow .gr-stats > div { flex: 1 1 28%; min-width: 0; } }

.govcard .gc-nums span, .govrow .gr-stats span { text-align: center; }
.govcard .gc-nums > div { min-width: 0; } .govcard .gc-nums span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* الطلبات: آخر طلب اتفتح متعلّم، والتفاصيل لوحدها على الشاشات الأضيق */
.split.solo > .a { display: none; }
.olist tr.last > td { box-shadow: inset 0 3px 0 #0f172a, inset 0 -3px 0 #0f172a; }
.olist tr.last > td.c-id { box-shadow: inset 0 3px 0 #0f172a, inset 0 -3px 0 #0f172a, inset -7px 0 0 #0f172a; }

/* نموذج الدفعة: مضغوط عشان يبان كله على قد الشاشة من غير سحب */
.payform { gap: 9px; }
.payform .payboxes { gap: 6px; }
.payform .paybox { min-height: 36px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; }
.payform .pf-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.payform .pf-two > label:only-child, .payform .pf-two > label:first-child:has(+ label[style*="display: none"]), .payform .pf-two > label:first-child:has(+ label[style*="display:none"]) { grid-column: 1 / -1; }
.payform .in { padding-top: 8px; padding-bottom: 8px; }
.payform .note { padding: 7px 11px; }
.payform #feebox .check { margin: 0; }
.modal:has(.payform) { padding: 16px 20px; gap: 8px; max-height: 96vh; }
.payform #feetxt { display: none; }
.payform { gap: 7px; }

.payform #rcw.has { border-style: solid; border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); }
