/* ===== SSMS mobile shell: bottom bar + bottom sheet (لا يعتمد على gap) ===== */
.ssms-hdr { background:#fff; box-shadow:0 1px 10px rgba(0,0,0,.08); position:sticky; top:0; z-index:900;
  display:-webkit-box; display:flex; -webkit-box-align:center; align-items:center; -webkit-box-pack:justify; justify-content:space-between;
  height:58px; padding:0 12px; }
.ssms-hdr .h-left, .ssms-hdr .h-right { display:-webkit-box; display:flex; -webkit-box-align:center; align-items:center; }
.ssms-hdr .h-right > * + * { margin-right:10px; }
.ssms-hdr .h-left > * + * { margin-left:10px; }
.ssms-hdr .h-ic { border:0; background:transparent; color:#3c3c3c; font-size:19px; padding:4px 6px; }
.ssms-hdr .lang-btn { display:-webkit-box; display:flex; -webkit-box-align:center; align-items:center; border:0; background:#eceff3;
  border-radius:6px; padding:7px 10px; font-size:14px; color:#2f2f2f; }
.ssms-hdr .lang-btn .flag { margin-left:6px; }
.ssms-hdr .avatar { width:38px; height:38px; border-radius:50%; background:#e9edf3; display:-webkit-box; display:flex;
  -webkit-box-align:center; align-items:center; -webkit-box-pack:center; justify-content:center; color:#6b7a90; font-size:17px; }
.lang-menu { display:none; position:absolute; top:54px; right:12px; background:#fff; border-radius:4px; box-shadow:0 6px 24px rgba(0,0,0,.16);
  min-width:150px; z-index:1200; overflow:hidden; }
.lang-menu.on { display:block; }
.lang-menu a { display:block; padding:13px 18px; color:#2f2f2f; text-decoration:none; font-size:14.5px; }
.lang-menu a:hover { background:#f4f5f7; }

/* المحتوى فوق الشريط السفلي */
.content-wrapper { padding:14px 12px 96px !important; margin-right:0 !important; }

/* ===== الشريط السفلي ===== */
.bnav { position:fixed; left:0; right:0; bottom:0; height:62px; background:#fff; border-top:1px solid #ececec;
  box-shadow:0 -2px 12px rgba(0,0,0,.06); z-index:1000; display:-webkit-box; display:flex; }
.bnav a { -webkit-box-flex:1; flex:1; display:block; text-align:center; padding:8px 2px 6px; color:#8b93a1; text-decoration:none; }
.bnav a .bi { display:block; height:24px; line-height:24px; }
.bnav a .bi svg { width:23px; height:23px; display:inline-block; vertical-align:middle; }
.bnav a .bt { display:block; font-size:10.5px; margin-top:3px; }
.bnav a.on { color:#5d8a24; }
.bnav a.on .bi svg path, .bnav a.on .bi svg rect, .bnav a.on .bi svg circle { fill:#5d8a24; stroke:#5d8a24; }

/* ===== الشيت اللي بيطلع من تحت ===== */
.sheet-bd { position:fixed; left:0; right:0; top:0; bottom:0; background:rgba(0,0,0,.45); z-index:1100; opacity:0; visibility:hidden;
  -webkit-transition:opacity .22s linear, visibility 0s linear .22s; transition:opacity .22s linear, visibility 0s linear .22s; touch-action:none; }
.sheet-bd.on { opacity:1; visibility:visible; -webkit-transition:opacity .22s linear, visibility 0s; transition:opacity .22s linear, visibility 0s; }
.sheet { position:fixed; left:0; right:0; bottom:0; max-height:86%; background:#282a39; border-radius:16px 16px 0 0;
  z-index:1101; -webkit-transform:translate3d(0,105%,0); transform:translate3d(0,105%,0); visibility:hidden;
  -webkit-transition:-webkit-transform .24s cubic-bezier(.2,.8,.2,1), visibility 0s linear .24s; transition:transform .24s cubic-bezier(.2,.8,.2,1), visibility 0s linear .24s;
  will-change:transform; -webkit-backface-visibility:hidden; backface-visibility:hidden; overflow:hidden; display:-webkit-box; display:flex;
  -webkit-box-orient:vertical; flex-direction:column; contain:layout paint; }
.sheet.on { -webkit-transform:translate3d(0,0,0); transform:translate3d(0,0,0); visibility:visible;
  -webkit-transition:-webkit-transform .24s cubic-bezier(.2,.8,.2,1), visibility 0s; transition:transform .24s cubic-bezier(.2,.8,.2,1), visibility 0s; }
.sheet.drag { -webkit-transition:none !important; transition:none !important; }
.sheet .grab { padding:9px 0 4px; text-align:center; }
.sheet .grab i { display:inline-block; width:44px; height:4px; border-radius:3px; background:#4a4d5e; }
.sheet .sh-title { color:#fff; font-size:15px; font-weight:600; padding:6px 18px 10px; border-bottom:1px solid #33364a; }
.sheet .grab, .sheet .sh-title { touch-action:none; }
.sheet .sh-body { overflow-y:auto; -webkit-overflow-scrolling:touch; overscroll-behavior:contain; touch-action:pan-y; -webkit-flex:1 1 auto; flex:1 1 auto; min-height:0; padding:4px 0 24px; }
.nrow, .nsub a { -webkit-tap-highlight-color:rgba(255,255,255,.08); }
.nrow:active { background:#1f2130; }

/* صفوف القائمة — مسافات صريحة بدون gap */
.nrow { display:block; width:100%; box-sizing:border-box; min-height:52px; padding:14px 18px; color:#fff;
  text-decoration:none; border-bottom:1px solid #33364a; }
.nrow:last-child { border-bottom:0; }
.nrow .in { display:-webkit-box; display:flex; -webkit-box-align:center; align-items:center; }
.nrow .ico { width:26px; min-width:26px; text-align:center; line-height:0; }
.nrow .ico svg { width:20px; height:20px; }
.nrow .lb { -webkit-box-flex:1; flex:1; text-align:right; font-size:14.5px; margin-right:12px; }
.nrow .plus { color:#fff; font-size:16px; font-weight:300; min-width:16px; text-align:center; }
.nrow.on { background:#1b1c28; }
.nrow.on .lb { font-weight:600; }
.nsub { display:none; background:#23252f; }
.nsub.open { display:block; }
.nsub a { display:block; padding:12px 18px 12px 44px; color:#d8dae3; text-decoration:none; font-size:13.5px;
  border-bottom:1px solid #2c2f3d; }
.nsub a:last-child { border-bottom:0; }
.ntitle { padding:14px 18px 6px; color:#8a8fa3; font-size:12.5px; }

/* ===== كارت العنصر — نفس _table-cards.css بتاع المنصة ===== */
.xcard { border:2px solid #84ba3f; border-radius:12px; box-shadow:0 3px 6px rgba(0,0,0,.1); background:#fff; overflow:hidden; margin-bottom:16px; }
.xcard .xh { background:#84ba3f; padding:10px 15px; color:#fff; font-weight:600; font-size:16px; }
.xcard .xb { padding:15px 18px; }
.xcard .badge-n { display:inline-block; background:#84ba3f; color:#fff; border-radius:4px; padding:6px 10px; font-size:13px; margin-bottom:8px; }
.xcard .r { margin-bottom:6px; font-size:15px; line-height:1.7; color:#3a3a3a; }
.xcard .r b { color:#84ba3f; font-weight:600; }
.xcard .xa-wrap { border-top:1px solid #e5e5e5; padding:12px 15px 15px; }
.xcard .xa { display:block; width:100%; box-sizing:border-box; background:#84ba3f; color:#fff; text-align:center;
  padding:12px; border-radius:6px; text-decoration:none; font-size:14px; font-weight:600; border:0; }
.xcard .xa.ghost { background:#fff; color:#6aa832; border:1px solid #84ba3f; }

/* فلتر المنصة: بيللات رمادية + تصفية كحلي + صندوق بحث بحدود */
.fbox { background:#fff; border-radius:10px; padding:14px; margin-bottom:14px; box-shadow:0 2px 10px rgba(0,0,0,.05); }
.fbox::after { content:''; display:block; clear:both; }
.fbox label { display:block; font-size:13px; color:#6aa832; margin-bottom:6px; }
.fbox select { width:100%; box-sizing:border-box; border:0; border-radius:28px; padding:16px 20px; font-size:15px; color:#3a3a3a;
  background:#f4f4f6; margin-bottom:12px; -webkit-appearance:none; appearance:none;
  background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23888' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:left 20px center; }
.fbox input[type=text], .fbox input[type=date] { width:100%; box-sizing:border-box; background:#fff; border:1px solid #cfd4da;
  border-radius:6px; padding:14px 16px; font-size:14.5px; margin-bottom:12px; color:#333; }
.fbox .fbtn { display:block; float:left; min-width:112px; background:#1d2733; color:#fff; border:1px solid #84ba3f;
  border-radius:5px; padding:12px 22px; font-size:15px; margin-bottom:12px; }
.fbox .sbtn { display:block; width:100%; box-sizing:border-box; margin-top:10px; background:#84ba3f; color:#fff; border:0;
  border-radius:8px; padding:12px; font-size:14.5px; }

/* أزرار داخل الكارت + زر الإضافة + الحالة الفاضية */
.xcard .xbtns { display:-webkit-box; display:flex; margin:6px 16px 16px; }
.xcard .xbtns button { -webkit-box-flex:1; flex:1; border-radius:6px; padding:11px; font-size:14px; font-weight:600;
  border:0; background:#3b82f6; color:#fff; }
.xcard .xbtns button + button { margin-right:8px; }
.xcard .xbtns button.solid { background:#22c55e; color:#fff; }
.topbar-add { display:block; width:100%; box-sizing:border-box; background:#22c55e; color:#fff; border:0; border-radius:8px;
  padding:13px; font-size:14.5px; margin-bottom:14px; }
.empty-card { background:#fff; border:1px solid #e6e8ec; border-radius:10px; padding:24px; text-align:center;
  color:#8a8a8a; font-size:14px; margin-bottom:14px; }
.fbox label { display:block; font-size:13px; color:#6aa832; margin-bottom:6px; }

.xcard .badge-n.gray { background:#8a8fa3; }
.xcard .xbtns button.danger { background:#ef4444; color:#fff; }
.xcard .xbtns button.danger.solid { background:#ef4444; color:#fff; }

/* ===== الهيدر زي المنصة ===== */
.ssms-hdr { height:64px; padding:0 14px; box-shadow:0 1px 6px rgba(0,0,0,.07); }
.ssms-hdr .avatar { width:44px; height:44px; background:#f1efff; color:#6b5ce7; font-size:20px; }
.ssms-hdr .lang-btn { background:#f5f5f7; border-radius:6px; padding:9px 12px; font-size:15px; color:#2f2f2f; }
.ssms-hdr .lang-btn .flag { display:inline-block; width:22px; height:15px; border-radius:2px; overflow:hidden; line-height:0; }
.ssms-hdr .h-ic { font-size:22px; color:#2f2f2f; }
/* ===== المودال زي المنصة ===== */
.modal .modal-dialog { border-radius:18px; overflow:hidden; }
.modal .modal-head { background:#95d475; color:#222; font-weight:700; font-size:17px; text-align:center; padding:16px; }
.modal .modal-body { padding:18px 20px; }
.modal .modal-body input, .modal .modal-body select { border-radius:20px; text-align:center; font-size:15px; padding:12px 16px; border:1px solid #ccc; }
.modal .modal-foot { padding:14px; text-align:center; border-top:0; }
.modal .modal-foot .btn { border-radius:12px; min-width:100px; font-weight:600; }

.ssms-hdr { -webkit-box-direction:reverse; flex-direction:row-reverse; }
.ssms-hdr .avatar { background:transparent; }
.ssms-hdr .h-right > * + * { margin-right:0; margin-left:10px; }
.ssms-hdr .h-left > * + * { margin-left:0; margin-right:10px; }
.ssms-hdr .h-left { -webkit-box-direction:reverse; flex-direction:row-reverse; }
.ssms-hdr .h-right { -webkit-box-direction:reverse; flex-direction:row-reverse; }

/* ===== v3.4 مطابقة المنصة ===== */
.content-wrapper { padding:14px 14px 8px !important; }
.ssms-foot { margin:24px 20px 84px; background:#fff; box-shadow:0 2px 10px rgba(0,0,0,.08); padding:30px 10px; text-align:center; color:#6b6f76; font-size:16px; }
.page-title { margin:6px 4px 14px; }
.page-title h4 { font-size:24px; font-weight:600; color:#2b2b2b; margin:0 0 6px; }
.page-title .psub { margin:4px 0 6px; color:#6b6f76; font-size:14px; }
.crumb { font-size:15px; color:#6b6f76; }
.crumb a { color:#6b6f76; text-decoration:none; }
.crumb span { margin-right:10px; }
.xcard .badge-n { border-radius:4px; padding:1px 9px; font-size:14px; line-height:20px; margin-bottom:4px; }
.xcard .r { margin-bottom:2px; line-height:1.55; font-size:15.5px; color:#555; }
.xcard .r b { font-weight:400; }
.xcard .pill { display:inline-block; background:#84ba3f; color:#fff; border-radius:4px; padding:1px 12px; font-size:14px; line-height:22px; }
.xcard .gv { color:#28a745; }
.xcard.xred { border-color:#ef4444; } .xcard.xred .xh { background:#ef4444; } .xcard.xred .xb { background:#fde0e0; }
.xcard.xred .r, .xcard.xred .r b { color:#7a1c1c; } .xcard.xred .pill { background:#ef4444; }
.xcard.xred .xbtns { background:#fde0e0; margin:0; padding:10px 15px 15px; }
.xcard .xbtns button.dis { background:#7aaefb; }
.xcard .xbtns button { font-size:16px; font-weight:400; padding:10px; }
.badge-green { display:inline-block; background:#28a745; color:#fff; border-radius:4px; padding:1px 8px; font-size:13px; line-height:20px; }
.badge-red { display:inline-block; background:#dc3545; color:#fff; border-radius:4px; padding:1px 8px; font-size:13px; line-height:20px; }
.accw .acc-h { background:#f5f6f8; border-radius:4px; padding:20px 24px; margin:0 0 20px; font-size:19px; color:#2b2b2b; display:-webkit-box; display:flex; -webkit-box-pack:justify; justify-content:space-between; flex-direction:row-reverse; }
.accw .acc-h.open { background:#84ba3f; color:#fff; }
.accw .acc-h .pm { width:26px; height:26px; border-radius:50%; background:#222; color:#fff; text-align:center; line-height:24px; font-size:20px; font-weight:700; }
.accw .acc-h.open .pm { background:#fff; color:#84ba3f; }
.accw .acc-b { display:none; margin-bottom:20px; } .accw .acc-b.open { display:block; }
.accw .acc-t { background:#fff; box-shadow:0 2px 12px rgba(0,0,0,.1); padding:60px 35px 30px; overflow-x:auto; margin:0 20px; }
.fbox.ctl { background:#fff; padding:28px 0 0; }
.pillin { width:100%; box-sizing:border-box; background:#f5f6f8; border:4px solid #eceeed; border-radius:30px; padding:18px 22px; font-size:17px; color:#333; margin-bottom:20px; }
.sbtn.blue { background:#007bff; border-radius:8px; padding:20px; font-size:17px; margin-top:0; }
.ctl-empty { background:#e2e3e6; border:1px solid #b8bcc2; border-radius:5px; padding:20px; font-size:17px; color:#333; }
.modal .modal-body label { display:block; text-align:right; font-size:18px; color:#222; margin:14px 0 8px; }
.modal .modal-body input, .modal .modal-body select { text-align:right; background:#f5f6f8; border:4px solid #eceeed; border-radius:30px; padding:16px 22px; font-size:16px; width:100%; box-sizing:border-box; }
.modal .req, .req { color:#dc3545; }
.sec-h { background:#84ba3f; color:#fff; padding:28px 28px; font-size:19px; margin:4px 0 8px; text-align:right; }
.modal .modal-head { text-align:right; }
.xcard .xbtns button svg{display:inline-block!important;vertical-align:-2px;margin-right:6px}.xcard .xbtns button{white-space:nowrap}
/* v3.5.1 أزرار المودال */
.modal .modal-foot { display:block !important; padding:12px 35px 26px !important; border-top:0 !important; text-align:center; }
.modal .modal-foot .btn { display:block !important; width:100% !important; min-width:0 !important; box-sizing:border-box; float:none !important;
  border-radius:8px !important; padding:15px 10px !important; font-size:17px !important; font-weight:400 !important; line-height:1.3; margin:0 !important; border:0; white-space:nowrap; }
.modal .modal-foot .btn-green { background:#84ba3f !important; color:#fff !important; order:0; margin-bottom:12px !important; }
.modal .modal-foot .btn-light { background:#e9ecef !important; color:#333 !important; }
.modal .modal-foot { display:-webkit-box !important; display:flex !important; -webkit-box-orient:vertical; flex-direction:column-reverse; }
.modal .modal-foot .btn-green { margin-bottom:12px !important; }
.modal .modal-dialog { max-height:92vh; display:-webkit-box; display:flex; -webkit-box-orient:vertical; flex-direction:column; }
.modal .modal-body { overflow-y:auto; -webkit-overflow-scrolling:touch; -webkit-box-flex:1; flex:1; }

.rtitle { color:#84ba3f; font-size:25px; margin:0 4px 14px; text-align:right; display:-webkit-box; display:flex; flex-direction:row; }
.rtitle span { margin-left:10px; }
.rsub { color:#6b6f76; font-size:17px; line-height:1.9; margin:0 4px 34px; text-align:right; }
.rcard { background:#fff; border:2px solid #d9ebc8; border-radius:24px; padding:22px 26px 20px; margin:0 14px 26px; box-shadow:0 3px 8px rgba(0,0,0,.06); }
.rcard .rt { display:-webkit-box; display:flex; -webkit-box-pack:justify; justify-content:space-between; flex-direction:row; -webkit-box-align:center; align-items:center; font-size:18px; color:#2b2b2b; }
.rcard .rn svg { vertical-align:-5px; }
.rcard .rp { background:#f1f7ea; border-radius:20px; padding:6px 16px; font-size:14px; color:#6b6f76; }
.rcard .rnum { font-size:42px; font-weight:500; text-align:right; margin:14px 4px 4px; line-height:1.2; }
.rcard .rl { font-size:15px; color:#6b6f76; text-align:right; margin-right:4px; }
.rsec { font-size:21px; color:#2b2b2b; margin:34px 14px 18px; line-height:1.7; text-align:right; }
.topc { border-radius:22px; overflow:hidden; margin:0 14px 24px; background:#fff; box-shadow:0 3px 8px rgba(0,0,0,.06); }
.topc .toph { background:linear-gradient(#84ba3f,#6fa832); color:#fff; padding:20px 22px; font-size:19px; text-align:right; }
.topc .topr { display:-webkit-box; display:flex; flex-direction:row; padding:14px 22px; border-bottom:1px solid #eef0f2; font-size:16px; color:#333; }
.topc .topr .tn { width:28px; color:#84ba3f; } .topc .topr .tl { -webkit-box-flex:1; flex:1; text-align:right; } .topc .topr .tv { font-weight:600; }
.rcard .rn svg, .rtitle svg { display:inline-block !important; vertical-align:-5px; }
.rcard { margin:0 4px 22px; border-radius:22px; padding:16px 22px 16px; }
.rcard .rnum { font-size:40px; margin-top:10px; }
.rtitle { display:block !important; font-size:24px; }
.rtitle span { margin:0 0 0 10px; }
.rcard .rn svg { float:right; margin-left:8px; }
.rtitle > span { float:right; }
.rtitle { overflow:hidden; }
.rcard .rn { display:block; overflow:hidden; }
.rcard .rn { display:-webkit-box !important; display:flex !important; flex-direction:row; -webkit-box-align:center; align-items:center; overflow:visible; white-space:nowrap; }
.rcard .rn svg { float:none !important; margin:0 0 0 8px; }
/* v3.6.1 عنوان الصفحة زي المنصة */
.page-title { margin:10px 4px 18px; }
.page-title h4 { font-size:25px; font-weight:400; color:#343a40; margin:0 0 12px; line-height:1.35; }
.crumb { font-size:16.5px; color:#8a909c; font-weight:400; line-height:1.5; }
.crumb a { color:#8a909c; }
.topbar-add { line-height:1.4; white-space:nowrap; }
/* v3.6.2 */
.xcard .xbtns button { display:block !important; text-align:center !important; }
.xcard .xbtns button svg { display:inline-block !important; margin:0 6px 0 0; vertical-align:-3px; }
.xcard .xa { display:block !important; text-align:center !important; }
.xcard .xa svg { display:inline-block !important; vertical-align:-3px; }
.crumb { font-size:15.3px; color:#6b7280; }
.crumb a { color:#6b7280; }
.page-title h4 { font-size:24.5px; color:#2f3337; }
.xcard .xbtns button svg, .xcard .xa svg { width:16px !important; height:16px !important; max-width:16px; }

/* v3.6.4 header block */
.page-title { margin:13px 4px 33px !important; }
.page-title h4 { font-size:24.5px !important; font-weight:500 !important; color:#343a40 !important; margin:0 0 5px !important; }
.crumb, .crumb a, .crumb span { font-size:15.5px !important; font-weight:400 !important; color:#6c757d !important; }
/* v3.6.4 match real phone metrics */
.content-wrapper { padding:14px 18.5px 8px !important; }
.page-title { margin:13px 4px 20px !important; }
.page-title h4 { line-height:1.2 !important; margin:0 0 4px !important; color:#2b2e31 !important; }
.crumb { line-height:1.4 !important; }
.content-wrapper { padding:14px 19.5px 8px !important; }
.page-title { margin:13px 4px 21px !important; }
.page-title h4 { margin:0 0 0 !important; }
.page-title h4 { font-weight:600 !important; font-size:24px !important; color:#2b2b2b !important; }
.page-title h4 { font-weight:500 !important; font-size:24.3px !important; color:#222 !important; }
.page-title h4 { font-weight:700 !important; }
.page-title h4, .page-title h4 * { font-weight:700 !important; }
.crumb, .crumb a, .crumb span { font-weight:400 !important; }
/* v3.7 table cards + tools */
.xlist { display:block; }
.xcard .xh *, .xcard .r * { font-family:inherit; }
.xcard .xh { text-align:right; }
.accw .acc-t { background:transparent !important; box-shadow:none !important; padding:0 !important; margin:0 !important; overflow:visible !important; }
.xtool { background:#fff; border-radius:12px; padding:14px 16px 4px; margin-bottom:16px; box-shadow:0 1px 6px rgba(0,0,0,.05); }
.xtool input, .xtool select { display:block; width:100%; box-sizing:border-box; background:#f5f6f8; border:4px solid #eceeed; border-radius:30px; padding:12px 20px; font-size:16px; color:#333; margin-bottom:10px; text-align:right; }
.xcard .xbtns a { -webkit-box-flex:1; flex:1; display:block; text-align:center; border-radius:6px; padding:10px; font-size:16px; border:0; background:#3b82f6; color:#fff; text-decoration:none; }
.xcard .xbtns button.danger, .xcard .xbtns a.danger { background:#ef4444; color:#fff; }
.xcard .xbtns a + a, .xcard .xbtns a + button, .xcard .xbtns button + a { margin-right:8px; }
.xcard .xbtns button .fa { margin-left:6px; }
.xcard .r a { color:#2563eb; }

.fbox.xtool input, .fbox.xtool select { -webkit-appearance:none; appearance:none; height:auto !important; box-shadow:none !important; outline:0; background:#f5f6f8 !important; border:4px solid #eceeed !important; border-radius:30px !important; padding:14px 22px !important; font-size:16px !important; margin:0 0 12px !important; width:100% !important; box-sizing:border-box; text-align:right; color:#333; }
.fbox.xtool select { background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23777' stroke-width='2'/%3E%3C/svg%3E") !important; background-repeat:no-repeat !important; background-position:22px center !important; }
.fbox.xtool { padding:16px 16px 4px !important; }
.xcard .fa, .xcard i.fa, .fbox .fa, button .fa { font-family:'FontAwesome' !important; }
.xcard .xbtns { flex-wrap:wrap; }
.xcard .xbtns button, .xcard .xbtns a { min-width:calc(50% - 8px); margin-bottom:8px; box-sizing:border-box; }
.xcard .xbtns { margin-bottom:8px !important; }
.xcard .xbtns button:only-child, .xcard .xbtns a:only-child { min-width:100%; }
.xcard .xbtns button, .xcard .xbtns a { white-space:normal !important; font-size:15px !important; padding:9px 6px !important; }

/* v3.7.5 subject card buttons (platform look) */
.xcard .sbops { margin-top:12px; }
.xcard .sbop { display:block !important; width:100%; box-sizing:border-box; border:0; color:#fff; text-align:center !important; font-size:17px; padding:12px 8px; margin:0 0 2px; border-radius:0; font-weight:400; font-family:inherit; }
.xcard .sbop:first-child { border-radius:6px 6px 0 0; } .xcard .sbop:last-child { border-radius:0 0 6px 6px; margin-bottom:0; }
.xcard .xa.sbtog { font-size:17px; font-weight:400; padding:12px; border-radius:10px; margin-top:10px; }
.xcard .xa.sbtog i, .xcard .sbop i { display:inline-block; margin-right:6px; }
.xcard.sbcard .r { font-size:17.5px; line-height:1.9; margin-bottom:4px; }
.xcard.sbcard .xh { font-size:17.5px; padding:12px 16px; }
.xcard.sbcard .badge-n { font-size:16px; padding:3px 14px; margin-bottom:10px; }
.xcard.sbcard .sbop { font-size:17.5px; }
.xcard .sbop, .xcard .sbop:first-child, .xcard .sbop:last-child { border-radius:4px; margin:0 0 3px; padding:10px 8px; }
.xcard .xa.sbtog { background:#78a93a; border-radius:8px; }
.xcard.sbcard .sbops { margin-top:14px; padding-top:14px; }

/* v3.7.6 subject details (platform accordion look) */
.sdcard { padding:0 !important; overflow:hidden; }
.sdcard .sd-top { padding:16px 18px; font-size:17px; line-height:2; border-bottom:1px solid #ececec; color:#333; }
.sdcard .accordion { padding:14px; }
.sdcard .acd-group { margin-bottom:10px; }
.sdcard .sd-in { padding:14px; }
.sdcard .sd-lbl { display:block; font-size:15px; color:#555; margin-bottom:8px; }
.sdcard .sd-form .form-control { width:100%; box-sizing:border-box; }
.sdcard .sd-save { background:#84ba3f; color:#fff; border:0; border-radius:6px; padding:10px 34px; font-size:16px; }
.sdcard .sd-tw { overflow-x:auto; -webkit-overflow-scrolling:touch; }
.sdcard .tbl2 { width:100%; border-collapse:collapse; text-align:center; font-size:15px; }
.sdcard .tbl2 th { background:#dbe2dd; padding:10px 6px; color:#222; font-weight:600; white-space:nowrap; }
.sdcard .tbl2 td { padding:10px 6px; border-bottom:1px solid #eee; vertical-align:middle; }
.sdcard .btn-primary { background:#3b82f6; color:#fff; border:0; border-radius:4px; padding:6px 12px; }
.sdcard .btn-danger { background:#ef4444; color:#fff; border:0; border-radius:4px; padding:6px 11px; }

.sdcard .accordion.gray .acd-des{padding:0 0 12px}
.tbl.tg th { background:#d4edda; color:#155724; }
.tbl.tg { border:1px solid #c3e6cb; }
.modal .modal-body select { -webkit-appearance:none; appearance:none; height:58px; line-height:normal; color:#333; padding:0 22px 0 40px; background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23777' stroke-width='2'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:left 16px center; }

/* تقرير المعلمين (زي المنصة: كارت لكل معلم + جدول) */
.tf-h { color:#84ba3f; font-weight:700; font-size:15px; margin:4px 0 12px; }
.tcard { background:#fff; border:2px solid #84ba3f; border-radius:12px; overflow:hidden; margin-bottom:16px; }
.tcard .th { background:#84ba3f; color:#fff; font-weight:700; font-size:14.5px; padding:11px 14px; line-height:1.7; }
.tcard .tw { overflow-x:auto; -webkit-overflow-scrolling:touch; }
.ttb { width:100%; border-collapse:collapse; text-align:center; font-size:13px; }
.ttb thead { background:#eaf7d5; }
.ttb th { color:#2e4f19; font-weight:600; padding:9px 8px; white-space:nowrap; }
.ttb td { padding:9px 8px; border-bottom:1px solid #ddd; }
.bg-a, .bg-i { display:inline-block; color:#fff; font-weight:700; border-radius:8px; padding:3px 10px; }
.bg-a { background:#22c55e; } .bg-i { background:#ef4444; }

.nsub .nsub{background:#1d1f29}.nsub .nsub a{padding-right:64px}

/* v3.9.8 fonts: the platform loads Cairo only on the two dashboard pages; every other page (layouts.master) falls back to the device sans-serif, Poppins for Latin headings */
html{--ff:sans-serif}
html.hm{--ff:'Cairo',sans-serif}
*{font-family:var(--ff) !important}
h1,h2,h3,h4,h5,h6,.page-title h4,.page-title h4 *{font-family:'Poppins',var(--ff) !important}
html.hm h1,html.hm h2,html.hm h3,html.hm h4,html.hm h5,html.hm h6,html.hm .page-title h4,html.hm .page-title h4 *{font-family:'Poppins','Cairo',sans-serif !important}
[class^="ti-"],[class*=" ti-"]{font-family:themify !important}
.fa,.fas,.far,.fab,[class^="fa-"],[class*=" fa-"]{font-family:FontAwesome !important}
code,pre,kbd,samp,.mono{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace !important}

/* v3.9.9: bootstrap sets pointer-events:none on .modal-dialog (only .modal-content re-enables it), so nothing inside our dialogs got taps */
.modal .modal-dialog, .modal .modal-dialog *{pointer-events:auto !important}
.xcard .xa-wrap .badge-n,.xcard .xa-wrap .bd{display:inline-block}
.xcard .xa-wrap .xa+.xa,.xcard .xa-wrap .bdrow+.xa{margin-top:8px}
.xcard .xa-wrap .bdrow{text-align:center;margin-bottom:8px}
.xcard .xa.up{background:linear-gradient(135deg,#736a82,#9b979d);border-radius:10px;box-shadow:0 3px 6px rgba(105,48,195,.3)}
.xcard .xa.dl{background:#17a2b8}

/* v3.9.30: شاشة الامتحان زي show.blade الأصلي */
.exam-container{max-width:950px;margin:auto;padding:10px 0}
.exam-card{border-radius:20px;background:#fff;overflow:hidden;box-shadow:0 8px 25px rgba(0,0,0,.06)}
.exam-header{background:linear-gradient(135deg,#84ba3f,#6da92e);color:#fff;text-align:center;padding:22px 12px;border-bottom:5px solid #6da92e}
.exam-header h3{font-weight:700;font-size:1.4rem;margin:0 0 10px;color:#fff}
.exam-header p{margin:0}
#timer{font-weight:700;font-size:1.1rem;color:#fff8a6}
.progress-container{width:100%;background:#e9ecef;height:10px;border-radius:5px;overflow:hidden;margin-top:10px}
.exam-card .progress-bar{height:100%;width:0;background:linear-gradient(90deg,#84ba3f,#6da92e);transition:width .4s ease}
.exam-card .card-body{padding:12px}
.stepwizard-row{display:flex;justify-content:center;flex-wrap:wrap;margin:18px 0}
.stepwizard-step a{display:block;width:35px;height:35px;border-radius:50%;border:2px solid #84ba3f;color:#84ba3f;text-align:center;line-height:31px;font-weight:600;margin:5px;background:#fff;font-size:.9rem}
.stepwizard-step a.active{background:linear-gradient(135deg,#84ba3f,#a3d977);color:#fff;transform:scale(1.15);box-shadow:0 0 15px rgba(132,186,63,.6)}
.stepwizard-step a.answered{background:#d4edda;border-color:#4caf50;color:#2e7d32}
.stepwizard-step a.unanswered{background:#f8d7da;border-color:#dc3545;color:#721c24}
.subject-card{border:none;border-radius:15px;overflow:hidden;margin-top:10px;background:#fff;box-shadow:0 6px 20px rgba(0,0,0,.05)}
.subject-card-header{background:linear-gradient(135deg,#84ba3f,#6da92e);color:#fff;font-weight:bold;text-align:center;padding:12px;font-size:1.2rem}
.subject-card-body{padding:20px}
.subject-card-body h6{font-size:1.2rem;font-weight:600;color:#333;margin:0 0 18px}
.exam-card .form-check{background:#f8f9fa;padding:12px 15px;border-radius:10px;margin-bottom:12px;cursor:pointer;display:flex;align-items:center}
.exam-card .form-check .form-check-input{margin:0 0 0 10px;transform:scale(1.2);accent-color:#84ba3f}
.exam-card .form-check-label{font-size:1.05rem;color:#333;margin:0;flex:1}
.exnav{display:flex;justify-content:space-between;margin:18px 0}
.btn-custom{border-radius:8px;padding:12px 22px;font-weight:600;font-size:1rem;background:#fff;border:1px solid}
.btn-outline-danger{border-color:#dc3545;color:#dc3545}
.btn-outline-success{border-color:#84ba3f;color:#84ba3f}
.btn-custom.btn-success{background:#84ba3f;border-color:#84ba3f;color:#fff}
.exam-card .form-check{padding-left:15px;padding-right:15px}
.exam-card .form-check .form-check-input{position:static!important;float:none!important;margin:0 0 0 10px!important;opacity:1!important;flex:none;width:18px;height:18px}

/* v3.9.30: role menu visibility enforced by CSS (admin never sees doctor items, doctor never sees admin items) */
body.role-admin [data-doctor]{display:none !important}
body.role-doc [data-admin]{display:none !important}

/* ===== student subject details / PDF modal (like original subject_pdfs) ===== */
.row-g { display:flex; flex-wrap:wrap; margin:0 -8px; }
.pdf-col { width:100%; padding:0 8px; margin-bottom:12px; box-sizing:border-box; }
@media (min-width:700px) { .pdf-col { width:33.333%; } }
.pdf-card { background:#e3e3e3; border-radius:4px; padding:20px; }
.pdf-card h5 { margin:0 0 12px; font-size:18px; font-weight:500; color:#333; word-break:break-word; }
.pdf-card .btn { border:0; border-radius:4px; padding:8px 16px; font-size:15px; cursor:pointer; text-decoration:none; display:inline-block; }
.vtbl { width:100%; border-collapse:collapse; text-align:center; }
.vtbl thead { background:#dbe2dd; }
.vtbl th, .vtbl td { padding:10px; border-bottom:1px solid #dee2e6; font-size:14px; }
.pm-back { position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:9999; display:flex; align-items:flex-start; justify-content:center; overflow:auto; }
.pm-dialog { background:#fff; width:100%; max-width:800px; margin:20px 8px; border-radius:6px; direction:rtl; display:flex; flex-direction:column; max-height:calc(100vh - 40px); }
.pm-dialog.pm-full, .pm-dialog:fullscreen { max-width:none; margin:0; max-height:100vh; height:100vh; border-radius:0; }
.pm-head { display:flex; align-items:center; gap:10px; padding:14px; border-bottom:1px solid #dee2e6; flex-wrap:wrap; }
.pm-head h5 { margin:0; font-size:17px; font-weight:500; flex:1; }
.pm-grp { display:flex; }
.pm-btn { background:#6c757d; color:#fff; border:0; padding:7px 12px; font-size:15px; cursor:pointer; }
.pm-btn:disabled { opacity:.6; }
.pm-grp .pm-btn:first-child { border-radius:0 4px 4px 0; } .pm-grp .pm-btn:last-child { border-radius:4px 0 0 4px; }
.pm-foot .pm-btn { border-radius:4px; }
.pm-body { padding:0; overflow:auto; flex:1; min-height:200px; }
#pmCan { display:flex; justify-content:center; margin-top:10px; overflow:auto; }
#pmCan .wrap { position:relative; display:inline-block; }
#pmCan .page { display:block; max-width:100%; height:auto; }
#pmCan .wm { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; pointer-events:none; }
#pmCan .wm i { font-style:normal; transform:rotate(-45deg); font-size:34px; color:rgba(150,150,150,.5); white-space:nowrap; }
.pm-foot { display:flex; justify-content:space-between; align-items:center; padding:12px 14px; border-top:1px solid #dee2e6; }

/* ===== English / LTR mode ===== */
html[dir=ltr] body { direction:ltr; text-align:left; }
html[dir=ltr] .page-title, html[dir=ltr] .card-box, html[dir=ltr] .xcard, html[dir=ltr] .pdf-card, html[dir=ltr] .nrow, html[dir=ltr] .nsub a { text-align:left; direction:ltr; }
html[dir=ltr] .nsub a { padding:12px 44px 12px 18px; }
html[dir=ltr] .xcard .xh { text-align:left; }
html[dir=ltr] .nrow .plus { margin-left:auto; margin-right:0; }
html[dir=ltr] .pm-dialog { direction:ltr; }
html[dir=ltr] .lang-menu { right:auto; left:12px; }
html[dir=ltr] .nrow .lb { text-align:left; margin-right:0; margin-left:12px; }
html[dir=ltr] input, html[dir=ltr] textarea, html[dir=ltr] select { direction:ltr; text-align:left !important; }
html[dir=ltr] select { background-position:right 18px center !important; padding-left:22px !important; padding-right:44px !important; }
html[dir=ltr] .page-title, html[dir=ltr] .crumb { text-align:left; }
html[dir=ltr] .acd-heading, html[dir=ltr] .accordion .acd-group .acd-heading { text-align:left; }
html[dir=ltr] .vtbl th, html[dir=ltr] .vtbl td { text-align:center; }

/* doctor subjects: department tree like ssms.tech sidebar */
.dsgrp { border:1px solid #e3e8dc; border-radius:10px; margin-bottom:12px; overflow:hidden; }
.dsgrp-h { display:block; padding:11px 14px; background:#84ba3f; color:#fff; font-weight:700; font-size:15px; text-decoration:none; cursor:pointer; }
.dsgrp-h .fa-chevron-down { transition:transform .15s; margin-left:4px; }
.dsgrp:not(.open) .dsgrp-h .fa-chevron-down { transform:rotate(90deg); }
.dsgrp-c { display:inline-block; background:rgba(255,255,255,.28); border-radius:10px; padding:0 9px; font-size:12px; margin-right:6px; }
.dsgrp:not(.open) .dsgrp-b { display:none; }
.ds-tbl { width:100%; border-collapse:collapse; }
.ds-tbl th { background:#f6f7f8; font-size:12.5px; color:#4b4b4b; padding:8px 4px; border-bottom:1px solid #e6e6e6; }
.ds-tbl td { padding:8px 4px; border-bottom:1px solid #f0f0f0; font-size:12.5px; word-break:break-word; }
.ds-tbl th.n, .ds-tbl td.n { width:26px; }

/* ===== ssmsDTable: نفس شكل DataTables في ssms.tech ===== */
.dt2-bar { display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; background:#f6f7f8; border:1px solid #eee; border-bottom:0; border-radius:8px 8px 0 0; padding:10px 12px; }
.dt2-size, .dt2-search { display:flex; align-items:center; gap:8px; font-size:13px; color:#333; }
.dt2-sel { border:1px solid #ddd; border-radius:20px; background:#fff; padding:6px 14px; font-size:13px; min-width:70px; }
.dt2-inp { border:1px solid #ddd; border-radius:20px; background:#fff; padding:7px 14px; font-size:13px; min-width:150px; outline:none; }
.dt2-inp:focus { border-color:#8bc34a; }
table.dt2 { width:100%; border-collapse:collapse; text-align:center; font-size:13.5px; background:#fff; }
table.dt2 th { background:#8bc34a; color:#fff; font-weight:700; padding:10px 6px; white-space:nowrap; cursor:pointer; user-select:none; }
table.dt2 th .dt2-sort { opacity:.75; font-size:11px; margin-right:2px; }
table.dt2 td { padding:10px 6px; border-bottom:1px solid #eee; vertical-align:middle; }
table.dt2 tbody tr:nth-child(even) { background:#fafafa; }
table.dt2 tbody tr:hover { background:#f3f8ec; }
table.dt2 th.n, table.dt2 td.n { width:30px; }
.dt2-empty { background:#f6f7f8 !important; color:#555; padding:18px 6px !important; }
.dt2-foot { display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; background:#f6f7f8; border:1px solid #eee; border-top:0; border-radius:0 0 8px 8px; padding:8px 12px; }
.dt2-info { font-size:12.5px; color:#555; }
.dt2-pager { display:flex; gap:6px; }
.dt2-pg { border:1px solid #ddd; background:#fff; border-radius:6px; padding:6px 16px; font-size:13px; cursor:pointer; }
.dt2-pg:disabled { opacity:.45; cursor:default; }
.dt2-view { display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; border-radius:6px; background:#6c757d; color:#fff !important; text-decoration:none; font-size:14px; }

/* dt2 mobile fit */
.dt2-wrap { overflow-x:auto; }
table.dt2 { min-width:100%; }
@media (max-width: 600px) {
  table.dt2 th, table.dt2 td { padding:8px 3px; font-size:12px; }
  .dt2-view { width:28px; height:28px; font-size:12px; }
  .dt2-bar, .dt2-foot { padding:8px; }
  .dt2-inp { min-width:110px; }
}

/* ===== كروت المواد (دكتور) — نفس ستايل الأخضر/الأبيض ===== */
.subj-bar { display:flex; gap:8px; align-items:center; background:#f6f7f8; border:1px solid #eee; border-radius:8px; padding:10px; margin-bottom:12px; flex-wrap:wrap; }
.subj-bar .dt2-inp { flex:1; min-width:120px; }
.subj-sort { border:1px solid #ddd; border-radius:20px; background:#fff; padding:7px 12px; font-size:12.5px; color:#333; }
.subj-cards { display:flex; flex-direction:column; gap:12px; }
.subj-card { background:#fff; border:1px solid #eee; border-radius:10px; overflow:hidden; box-shadow:0 1px 4px rgba(0,0,0,.06); }
.subj-card-head { background:#8bc34a; color:#fff; font-weight:700; font-size:14.5px; padding:10px 12px; display:flex; align-items:center; justify-content:space-between; gap:8px; }
.subj-card-head .dt2-view { background:rgba(0,0,0,.25); flex:none; }
.subj-card-body { padding:10px 12px; display:flex; flex-direction:column; gap:6px; font-size:13px; color:#444; }
.subj-card-body .subj-row { display:flex; gap:6px; }
.subj-card-body .k { color:#8bc34a; font-weight:700; min-width:70px; }
.subj-empty { background:#f6f7f8; border:1px solid #eee; border-radius:8px; text-align:center; color:#555; padding:18px; font-size:13px; }
