/* ===== تبويبات الصفحات (عامة لكل البنود الرئيسية) + الموارد البشرية — بهوية Rovy (بني غامق + ذهبي + كريمي) ===== */
:root{--rv-dark:#0e4a30; --rv-brown:#135438; --rv-gold:#c49a5a; --rv-gold-2:#e3c48d; --rv-cream:#fbf6ee; --top-h:64px}

/* ---------- شريط التبويبات ---------- */
.ptabs{position:sticky; top:var(--top-h); z-index:12; margin:-4px 0 16px; padding:6px 0; background:linear-gradient(var(--bg) 70%, rgba(246,244,241,0))}
.ptabs-in{display:flex; gap:4px; overflow-x:auto; scrollbar-width:none; padding:5px; background:#fff; border:1px solid var(--border); border-radius:14px; box-shadow:var(--shadow); width:fit-content; max-width:100%}
.ptabs-in::-webkit-scrollbar{display:none}
.ptabs a{display:flex; align-items:center; gap:7px; padding:8px 14px; border-radius:10px; color:var(--text-2); font-weight:600; font-size:13px; white-space:nowrap; min-height:38px; transition:background .15s,color .15s}
.ptabs a svg{width:16px; height:16px; flex:none}
.ptabs a:hover{background:var(--surface-3); color:var(--text)}
.ptabs a.on{background:var(--rv-dark); color:#fff; box-shadow:inset 0 -2px 0 var(--rv-gold)}
.ptabs a.on svg{color:var(--rv-gold-2)}
@media (max-width:860px){
  :root{--top-h:calc(64px + env(safe-area-inset-top))}
  .ptabs{margin:0 -12px 12px; padding:6px 12px; top:var(--top-h)}
  .ptabs-in{width:auto; border-radius:0; background:transparent; border:0; box-shadow:none; padding:0; gap:6px}
  .ptabs a{background:#fff; border:1px solid var(--border); border-radius:999px; padding:7px 13px; min-height:40px}
  .ptabs a.on{border-color:var(--rv-dark)}
}
/* تبويبات جوه درج الموبايل */
.dr-tabs{display:flex; flex-wrap:wrap; gap:6px; padding:0 52px 8px 6px}
.dr-t{font-size:12.5px; padding:6px 11px; border-radius:999px; background:rgba(255,255,255,.06); color:#e8dccb; text-decoration:none!important; border:1px solid rgba(255,255,255,.08)}
.dr-t.on{background:var(--rv-gold); color:var(--rv-dark); font-weight:700}

/* ---------- عام ---------- */
.hr-av{width:38px; height:38px; border-radius:50%; flex:none; display:grid; place-items:center; background:linear-gradient(135deg,var(--rv-brown),var(--rv-dark)); color:var(--rv-gold-2); font-weight:700; font-size:14px; overflow:hidden; border:2px solid #fff; box-shadow:0 1px 4px rgba(9,51,33,.2)}
.hr-av img{width:100%; height:100%; object-fit:cover}
.hr-av.lg{width:96px; height:96px; font-size:32px; border-width:3px}
.hr-who{display:flex; align-items:center; gap:10px; min-width:0}
.hr-who b{display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.hr-who small{display:block; color:var(--text-3); font-size:12px}
.chip{display:inline-flex; align-items:center; gap:5px; padding:3px 10px; border-radius:999px; font-size:12px; font-weight:600; background:var(--surface-3); color:var(--text-2); white-space:nowrap}
.chip svg{width:13px; height:13px}
.chip.ok{background:var(--success-50); color:var(--success)} .chip.bad{background:var(--danger-50); color:var(--danger)} .chip.warn{background:var(--warning-50); color:var(--warning)}
.chip.info{background:var(--info-50); color:var(--info)} .chip.gold{background:#f6ead5; color:#228a5d} .chip.dark{background:var(--rv-dark); color:var(--rv-gold-2)}
.hr-kpis{display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:12px; margin-bottom:16px}
@media (max-width:1280px){ .hr-kpis{grid-template-columns:repeat(3,minmax(0,1fr))} }
@media (max-width:560px){ .hr-kpis{grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px} }
.hr-empty{text-align:center; padding:48px 16px; color:var(--text-3)}
.hr-empty .ei{width:64px; height:64px; margin:0 auto 12px; border-radius:20px; display:grid; place-items:center; background:var(--primary-50); color:var(--primary)}
.hr-empty .ei svg{width:30px; height:30px}
.hr-empty b{display:block; color:var(--text); font-size:16px; margin-bottom:6px}
.hr-note{display:flex; gap:10px; align-items:flex-start; padding:10px 14px; border-radius:12px; background:var(--warning-50); color:#7a5200; font-size:13px; margin-bottom:12px}
.hr-note svg{width:18px; height:18px; flex:none; margin-top:1px}
.hr-note.info{background:var(--info-50); color:#288175} .hr-note.ok{background:var(--success-50); color:#0b5e40} .hr-note.lock{background:#f1ebe3; color:var(--rv-brown)}
.num-in{direction:ltr; text-align:right}
.money-in{position:relative} .money-in .inp{padding-left:46px} .money-in::after{content:'ج.م'; position:absolute; left:12px; top:50%; transform:translateY(-50%); font-size:12px; color:var(--text-3); pointer-events:none}
.seg2{display:inline-flex; background:var(--surface-3); border-radius:12px; padding:4px; gap:4px}
.seg2 button{border:0; background:transparent; padding:8px 16px; border-radius:9px; font:inherit; font-weight:600; color:var(--text-2); cursor:pointer; min-height:38px}
.seg2 button.on{background:#fff; color:var(--rv-dark); box-shadow:0 1px 3px rgba(0,0,0,.08)}
.hr-sub{display:flex; gap:6px; flex-wrap:wrap; margin-bottom:12px}
.hr-sub button,.hr-sub a{border:1px solid var(--border); background:#fff; padding:7px 14px; border-radius:999px; font:inherit; font-size:13px; font-weight:600; color:var(--text-2); cursor:pointer; min-height:38px; display:inline-flex; align-items:center; gap:6px}
.hr-sub .on{background:var(--rv-dark); color:#fff; border-color:var(--rv-dark)}
.hr-sub .n{background:rgba(0,0,0,.08); border-radius:999px; padding:0 7px; font-size:11.5px}
.hr-sub .on .n{background:rgba(255,255,255,.18)}

/* ---------- المعالج (6 خطوات) ---------- */
.wz{display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:18px; align-items:start; padding-bottom:84px}
.wz-steps{position:sticky; top:calc(var(--top-h) + 72px); border-radius:18px; overflow:hidden; background:#fff; border:1px solid var(--border); box-shadow:var(--shadow)}
.wz-steps .wh{background:linear-gradient(135deg,var(--rv-dark),var(--rv-brown)); color:#fff; padding:16px 18px; border-bottom:2px solid var(--rv-gold)}
.wz-steps .wh b{display:block; font-size:15px} .wz-steps .wh small{color:#e7d6bd; font-size:12px}
.wz-steps ol{list-style:none; margin:0; padding:8px}
.wz-steps li button{display:flex; align-items:center; gap:10px; width:100%; border:0; background:transparent; text-align:start; padding:11px 10px; border-radius:12px; font:inherit; cursor:pointer; color:var(--text-2)}
.wz-steps li button:hover{background:var(--surface-2)}
.wz-steps li button.on{background:var(--rv-cream); color:var(--rv-dark); box-shadow:inset -3px 0 0 var(--rv-gold)}
.wz-steps .si{width:34px; height:34px; border-radius:10px; display:grid; place-items:center; background:var(--surface-3); color:var(--text-2); flex:none}
.wz-steps .on .si{background:var(--rv-dark); color:var(--rv-gold-2)}
.wz-steps .st{flex:1; min-width:0} .wz-steps .st b{display:block; font-size:13.5px} .wz-steps .st small{color:var(--text-3); font-size:11.5px}
.wz-badge{width:22px; height:22px; border-radius:50%; display:grid; place-items:center; font-size:12px; font-weight:800; flex:none}
.wz-badge.ok{background:var(--success); color:#fff} .wz-badge.bad{background:var(--danger); color:#fff}
.wz-card{background:#fff; border:1px solid var(--border); border-radius:18px; box-shadow:var(--shadow); padding:22px; min-width:0}
.wz-card h2{margin:0 0 4px; font-size:18px} .wz-card > p.sub{margin:0 0 18px; color:var(--text-3); font-size:13px}
.wz-sec{margin:18px 0 10px; display:flex; align-items:center; gap:8px; font-weight:700; color:var(--rv-brown); font-size:14px}
.wz-sec::after{content:''; flex:1; height:1px; background:var(--border)}
.wz-sec svg{width:17px; height:17px; color:var(--rv-gold)}
.wz .f.err .inp,.wz .f.err .seg2,.wz .f.err .pm-cards{border-color:var(--danger)!important; box-shadow:0 0 0 3px var(--danger-50)}
.wz .f .ferr{color:var(--danger); font-size:12px; margin-top:4px; display:block}
.wz-foot{position:fixed; bottom:0; left:0; right:var(--sidebar); z-index:25; background:#fff; border-top:1px solid var(--border); padding:10px 28px; display:flex; align-items:center; gap:10px}
.app.mini .wz-foot{right:76px}
.wz-foot .wf-t{flex:1; min-width:0; font-size:13px; color:var(--text-2)} .wz-foot .wf-t b{color:var(--rv-dark)}
.wz-foot .btn{min-height:42px}
.wz-foot .btn.save{background:linear-gradient(135deg,var(--rv-brown),var(--rv-dark)); color:#fff; border-color:var(--rv-dark); box-shadow:inset 0 -2px 0 var(--rv-gold)}
.wz-photo{display:flex; align-items:center; gap:18px; padding:14px; border:1px dashed var(--border-strong); border-radius:16px; background:var(--surface-2); margin-bottom:6px}
.wz-photo .acts{display:flex; gap:8px; flex-wrap:wrap}
.id-cards{display:grid; grid-template-columns:1fr 1fr; gap:16px}
.id-card{border:1px solid var(--border); border-radius:16px; padding:12px; background:#fff}
.id-card .ih{display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; font-weight:700; font-size:13.5px}
.drop{border:2px dashed var(--border-strong); border-radius:14px; min-height:170px; display:grid; place-items:center; text-align:center; color:var(--text-3); cursor:pointer; background:var(--surface-2); padding:12px; font-size:13px; transition:border-color .15s,background .15s; overflow:hidden; position:relative}
.drop:hover,.drop.over{border-color:var(--rv-gold); background:var(--rv-cream)}
.drop svg{width:30px; height:30px; color:var(--rv-gold); display:block; margin:0 auto 8px}
.drop img{max-width:100%; max-height:220px; border-radius:10px; display:block; margin:auto}
.id-card .acts{display:flex; gap:6px; flex-wrap:wrap; margin-top:10px}
.net-card{border-radius:18px; padding:18px 20px; color:#fff; background:radial-gradient(120% 140% at 100% 0, var(--rv-brown), var(--rv-dark)); border:1px solid #1a6746; box-shadow:inset 0 -3px 0 var(--rv-gold); margin:14px 0}
.net-card small{color:#e3d1b6} .net-card .big{font-size:34px; font-weight:800; color:var(--rv-gold-2); direction:ltr; text-align:right; margin-top:4px; font-variant-numeric:tabular-nums}
.net-card .rows{display:flex; gap:18px; flex-wrap:wrap; margin-top:8px; font-size:12.5px; color:#efe2cf}
.pm-cards{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; border-radius:14px}
.pm-cards > .pm-card{border:1.5px solid var(--border); border-radius:14px; padding:14px 10px; text-align:center; cursor:pointer; background:#fff; font:inherit; color:var(--text-2); min-height:92px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px}
.pm-cards > .pm-card svg{width:26px; height:26px; color:var(--rv-gold)}
.pm-cards > .pm-card b{font-size:13.5px; color:var(--text)}
.pm-cards > .pm-card.on{border-color:var(--rv-dark); background:var(--rv-cream); box-shadow:inset 0 -3px 0 var(--rv-gold)}
.login-tog{display:flex; align-items:center; gap:14px; padding:16px; border-radius:16px; border:1px solid var(--border); background:var(--surface-2)}
.login-tog .lt-t{flex:1} .login-tog .lt-t b{display:block} .login-tog .lt-t small{color:var(--text-3)}
.sw{position:relative; width:52px; height:30px; flex:none} .sw input{opacity:0; width:0; height:0}
.sw span{position:absolute; inset:0; border-radius:999px; background:#d8d0c5; cursor:pointer; transition:.2s}
.sw span::before{content:''; position:absolute; width:24px; height:24px; right:3px; top:3px; border-radius:50%; background:#fff; transition:.2s; box-shadow:0 1px 3px rgba(0,0,0,.2)}
.sw input:checked + span{background:var(--rv-brown)} .sw input:checked + span::before{transform:translateX(-22px)}
.day-chips{display:flex; gap:6px; flex-wrap:wrap}
.day-chips label{cursor:pointer} .day-chips input{display:none}
.day-chips span{display:inline-block; padding:7px 12px; border-radius:999px; border:1px solid var(--border); background:#fff; font-size:13px; font-weight:600; min-height:36px}
.day-chips input:checked + span{background:var(--rv-dark); color:#fff; border-color:var(--rv-dark)}
.doc-list{display:flex; flex-direction:column; gap:8px}
.doc-row{display:grid; grid-template-columns:52px minmax(0,1fr) 180px 150px auto; gap:10px; align-items:center; padding:8px; border:1px solid var(--border); border-radius:12px; background:#fff}
.doc-row .th{width:52px; height:52px; border-radius:10px; background:var(--surface-3); display:grid; place-items:center; overflow:hidden}
.doc-row .th img{width:100%; height:100%; object-fit:cover} .doc-row .th svg{width:22px; height:22px; color:var(--text-3)}
.doc-row .nm{min-width:0} .doc-row .nm b{display:block; font-size:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap} .doc-row .nm small{color:var(--text-3); font-size:11.5px}
@media (max-width:1100px){ .wz{grid-template-columns:1fr} .wz-steps{position:static} .wz-steps ol{display:flex; overflow-x:auto; scrollbar-width:none; gap:6px} .wz-steps li button{white-space:nowrap; padding:8px 10px} .wz-steps .st small{display:none} .wz-steps .wh{display:none} .wz{grid-template-columns:1fr} .wz > .wz-steps{order:-1; position:sticky; top:var(--top-h); z-index:11} }
@media (max-width:860px){
  .wz-foot{right:0; bottom:calc(var(--bottom-h) + env(safe-area-inset-bottom)); padding:8px 12px; flex-wrap:wrap}
  .wz-foot .wf-t{flex-basis:100%; font-size:12px}
  .wz-foot .btn{flex:1; justify-content:center; padding:0 8px}
  .wz{padding-bottom:150px}
  .wz-card{padding:14px; border-radius:14px}
  .id-cards{grid-template-columns:1fr}
  .pm-cards{grid-template-columns:1fr 1fr}
  .doc-row{grid-template-columns:44px minmax(0,1fr) auto; } .doc-row .dk,.doc-row .dx{grid-column:2 / -1}
  .wz-photo{flex-direction:column; text-align:center}
}

/* ---------- ملف الموظف ---------- */
.ep-hero{display:flex; gap:18px; align-items:center; padding:20px; border-radius:20px; color:#fff; background:radial-gradient(120% 160% at 100% 0, var(--rv-brown), var(--rv-dark)); box-shadow:inset 0 -3px 0 var(--rv-gold); margin-bottom:16px; flex-wrap:wrap}
.ep-hero .ep-t{flex:1; min-width:200px} .ep-hero h2{margin:0; font-size:22px} .ep-hero .meta{display:flex; gap:8px; flex-wrap:wrap; margin-top:8px}
.ep-hero .meta .chip{background:rgba(255,255,255,.1); color:#f2e6d4}
.ep-hero .acts{display:flex; gap:8px; flex-wrap:wrap}
.ep-hero .btn{background:rgba(255,255,255,.08); color:#fff; border-color:rgba(255,255,255,.16)}
.ep-hero .btn.primary{background:var(--rv-gold); color:var(--rv-dark); border-color:var(--rv-gold)}
.ep-live{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:16px}
@media (max-width:860px){ .ep-live{grid-template-columns:1fr 1fr} .ep-hero{padding:16px} .ep-hero .hr-av.lg{width:72px; height:72px} }
.kv{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1px; background:var(--border); border:1px solid var(--border); border-radius:14px; overflow:hidden}
.kv > div{background:#fff; padding:10px 14px; min-width:0} .kv label{display:block; font-size:11.5px; color:var(--text-3); margin-bottom:2px} .kv span{font-weight:600; word-break:break-word}
@media (max-width:760px){ .kv{grid-template-columns:1fr 1fr} }
.cal{display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:5px}
.cal .dh{font-size:11.5px; text-align:center; color:var(--text-3); font-weight:600}
.cal .dc{aspect-ratio:1/1; border-radius:9px; display:flex; flex-direction:column; align-items:center; justify-content:center; font-size:12px; font-weight:700; background:var(--surface-3); color:var(--text-3); position:relative}
.cal .dc small{font-size:9.5px; font-weight:600}
.st-present{background:#dff3ea!important; color:#0b6a48!important} .st-late{background:#fdecd2!important; color:#94600a!important} .st-absent{background:#fbe0e1!important; color:#a3262d!important}
.st-leave{background:#e5f9f6!important; color:#2a9687!important} .st-unpaid_leave{background:#f9e5ee!important; color:#9b3e69!important} .st-half_day{background:linear-gradient(135deg,#dff3ea 50%,#fbe0e1 50%)!important; color:#1a6746!important}
.st-weekly_off,.st-off{background:#f1ede8!important; color:#7b9b8b!important} .st-holiday{background:#f6ead5!important; color:#228a5d!important} .st-mission{background:#dcf1f4!important; color:#0e6b78!important} .st-unrec{background:#fff!important; border:1.5px dashed #e0a3a6; color:#c8323a!important} .st-out{opacity:.35}

/* ---------- الحضور اليومي ---------- */
.att-hero{display:flex; align-items:center; gap:16px; flex-wrap:wrap; padding:18px 20px; border-radius:20px; color:#fff; background:radial-gradient(120% 160% at 100% 0, var(--rv-brown), var(--rv-dark)); box-shadow:inset 0 -3px 0 var(--rv-gold); margin-bottom:14px}
.att-hero .ah-t{flex:1; min-width:200px} .att-hero small{color:#e3d1b6} .att-hero .day{font-size:24px; font-weight:800; color:var(--rv-gold-2); margin-top:2px}
.att-hero .ah-c{display:flex; gap:8px; align-items:center; flex-wrap:wrap}
.att-hero .inp,.att-hero select{background:rgba(255,255,255,.1); color:#fff; border-color:rgba(255,255,255,.2)} .att-hero select option{color:#000}
.att-hero .btn{background:rgba(255,255,255,.08); color:#fff; border-color:rgba(255,255,255,.16); min-width:42px; justify-content:center}
.att-stats{display:flex; gap:8px; flex-wrap:wrap; margin-bottom:12px}
.att-stats .chip{padding:7px 13px; font-size:13px}
.att-tbl td{vertical-align:middle}
.att-seg{display:inline-flex; border:1px solid var(--border); border-radius:11px; overflow:hidden; background:#fff}
.att-seg button{border:0; background:#fff; padding:8px 13px; font:inherit; font-weight:700; font-size:13px; cursor:pointer; color:var(--text-2); min-height:40px}
.att-seg button + button{border-inline-start:1px solid var(--border)}
.att-seg button.p.on{background:var(--success); color:#fff} .att-seg button.a.on{background:var(--danger); color:#fff} .att-seg button.o.on{background:var(--rv-brown); color:#fff}
.att-time{width:104px; direction:ltr; text-align:center}
.att-foot{position:sticky; bottom:0; z-index:5; margin-top:12px; padding:10px 14px; border-radius:16px; background:rgba(255,255,255,.97); border:1px solid var(--border); box-shadow:0 -6px 20px rgba(13,40,28,.06); display:flex; gap:10px; align-items:center; flex-wrap:wrap}
.att-foot .af-t{flex:1; font-size:12.5px; color:var(--text-2); min-width:200px}
.att-cards{display:none}
@media (max-width:860px){
  .att-tbl{display:none} .att-cards{display:flex; flex-direction:column; gap:10px}
  .att-card{background:#fff; border:1px solid var(--border); border-radius:16px; padding:12px}
  .att-card .ac-h{display:flex; align-items:center; gap:10px; margin-bottom:10px}
  .att-card .ac-h .hr-who{flex:1}
  .att-card .ac-r{display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:8px}
  .att-card .att-time{width:100%}
  .att-card .att-seg{display:flex} .att-card .att-seg button{flex:1}
  .att-foot{bottom:calc(var(--bottom-h) + env(safe-area-inset-bottom) + 6px)}
  .att-hero .day{font-size:19px}
}
.msheet{overflow:auto; max-height:70vh; border:1px solid var(--border); border-radius:14px}
.msheet table{border-collapse:separate; border-spacing:0; font-size:12px}
.msheet th,.msheet td{padding:4px; text-align:center; border-bottom:1px solid var(--border); white-space:nowrap}
.msheet th{position:sticky; top:0; background:var(--surface-2); z-index:2}
.msheet td.nm,.msheet th.nm{position:sticky; right:0; background:#fff; z-index:1; text-align:right; min-width:150px; padding:6px 10px; box-shadow:-1px 0 0 var(--border)}
.msheet th.nm{z-index:3; background:var(--surface-2)}
.msheet .cell{width:24px; height:24px; border-radius:6px; display:inline-grid; place-items:center; font-weight:700; font-size:11px; background:var(--surface-3)}
.legend{display:flex; gap:10px; flex-wrap:wrap; font-size:12px; color:var(--text-2); margin:10px 0}
.legend i{display:inline-block; width:14px; height:14px; border-radius:4px; vertical-align:-2px; margin-inline-end:4px}

/* ---------- صرف الرواتب ---------- */
.pay-hero{border-radius:22px; padding:22px; color:#fff; background:radial-gradient(130% 160% at 100% 0, #186644, var(--rv-dark) 60%); box-shadow:inset 0 -3px 0 var(--rv-gold); margin-bottom:16px}
.pay-hero .ph-top{display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; align-items:flex-start}
.pay-hero small{color:#e3d1b6} .pay-hero .big{font-size:38px; font-weight:800; color:var(--rv-gold-2); direction:ltr; text-align:right; font-variant-numeric:tabular-nums; line-height:1.2}
.pay-hero .prog{height:10px; border-radius:999px; background:rgba(255,255,255,.12); overflow:hidden; margin:14px 0 6px}
.pay-hero .prog i{display:block; height:100%; background:linear-gradient(90deg,var(--rv-gold),var(--rv-gold-2)); border-radius:999px}
.pay-hero .mini{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-top:14px}
.pay-hero .mini > div{background:rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.1); border-radius:14px; padding:10px 12px}
.pay-hero .mini b{display:block; font-size:17px; color:#fff; direction:ltr; text-align:right}
.mnav{display:flex; align-items:center; gap:6px} .mnav .btn{min-width:40px; justify-content:center} .mnav b{min-width:120px; text-align:center; font-size:15px}
.pay-box{display:flex; gap:12px; align-items:flex-end; flex-wrap:wrap; padding:16px; border-radius:18px; background:var(--rv-cream); border:1px solid #ecdcc4; margin-bottom:16px}
.pay-box .pb-t{flex-basis:100%; font-size:13px; color:#277352; display:flex; gap:8px} .pay-box .pb-t svg{width:18px; height:18px; flex:none; color:var(--rv-gold)}
.pay-box .f{min-width:200px; flex:1}
.pay-box .btn.go{min-height:44px; background:linear-gradient(135deg,var(--rv-brown),var(--rv-dark)); color:#fff; border-color:var(--rv-dark); box-shadow:inset 0 -2px 0 var(--rv-gold); font-weight:700}
.ded-sub{display:block; font-size:11px; color:var(--danger); font-weight:600}
.why{font-size:12.5px} .why td{padding:5px 8px!important} .why .n{direction:ltr}
@media (max-width:860px){ .pay-hero .mini{grid-template-columns:1fr 1fr} .pay-hero .big{font-size:30px} .pay-box .f{min-width:100%} .pay-box .btn.go{width:100%; justify-content:center} }

/* ---------- قسيمة الراتب (للطباعة PDF) ---------- */
.slip{font-family:var(--font); color:#1d1a17; position:relative; background:#fff; padding:0; direction:rtl}
.slip .sl-hd{background:linear-gradient(135deg,var(--rv-dark),var(--rv-brown)); color:#fff; border-bottom:4px solid var(--rv-gold); padding:18px 22px; display:flex; align-items:center; gap:16px; border-radius:14px 14px 0 0}
.slip .sl-hd .lg{background:#fff; border-radius:12px; padding:6px 10px; display:grid; place-items:center} .slip .sl-hd .lg img{height:48px}
.slip .sl-hd .t{flex:1} .slip .sl-hd h2{margin:0; font-size:19px} .slip .sl-hd small{color:#e7d6bd}
.slip .sl-chips{display:flex; gap:8px; flex-wrap:wrap; margin-top:8px} .slip .sl-chips span{background:rgba(255,255,255,.12); padding:3px 10px; border-radius:999px; font-size:11.5px}
.slip .sl-bd{border:1px solid #e7dccd; border-top:0; border-radius:0 0 14px 14px; padding:16px 20px; position:relative; overflow:hidden}
.slip .wm{position:absolute; inset:0; display:grid; place-items:center; opacity:.05; pointer-events:none} .slip .wm img{width:60%}
.slip h4{margin:14px 0 8px; font-size:13.5px; color:var(--rv-brown); display:flex; gap:6px; align-items:center} .slip h4::after{content:''; flex:1; height:1px; background:#eadfce}
.slip .eg{display:grid; grid-template-columns:repeat(3,1fr); gap:1px; background:#eadfce; border:1px solid #eadfce; border-radius:10px; overflow:hidden}
.slip .eg > div{background:#fff; padding:7px 10px} .slip .eg label{display:block; font-size:10.5px; color:#688376} .slip .eg span{font-weight:700; font-size:12.5px}
.slip .two{display:grid; grid-template-columns:1fr 1fr; gap:12px}
.slip table{width:100%; border-collapse:collapse; font-size:12.5px}
.slip table th{background:#f6efe4; color:var(--rv-brown); text-align:right; padding:7px 10px; font-size:12px}
.slip table td{padding:6px 10px; border-bottom:1px solid #f0e8dc} .slip table td.n{text-align:left; direction:ltr; font-variant-numeric:tabular-nums}
.slip table tr.tot td{font-weight:800; background:#fbf6ee; border-top:1.5px solid #e2d3bd}
.slip .net{margin-top:14px; border-radius:14px; padding:14px 18px; background:linear-gradient(135deg,var(--rv-dark),var(--rv-brown)); color:#fff; display:flex; justify-content:space-between; align-items:center; gap:12px; border-bottom:3px solid var(--rv-gold)}
.slip .net .v{font-size:28px; font-weight:800; color:var(--rv-gold-2); direction:ltr} .slip .net small{color:#e7d6bd; display:block}
.slip .words{margin-top:6px; font-size:12px; color:#277352; font-weight:600}
.slip .sig{display:grid; grid-template-columns:1fr 1fr; gap:40px; margin-top:34px; font-size:12px; color:#405349} .slip .sig div{border-top:1px solid #bbb; padding-top:6px; text-align:center}
.slip .sl-ft{margin-top:14px; text-align:center; font-size:10.5px; color:#688376}
.slip-page{page-break-after:always}

/* ======================= تحسينات الواجهة (2) ======================= */
/* مفيش أي عنصر يوسّع الصفحة برا الشاشة (الجداول بتتحرك جوه الكارت بتاعها) */
#view{overflow-x:clip; min-width:0}
.tb2 .crumbs i{font-style:normal; opacity:.6}

/* كروت الأرقام */
.hr-stats{display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:12px; margin-bottom:16px}
.hr-stat{display:flex; align-items:center; gap:12px; background:#fff; border:1px solid var(--border); border-radius:16px; padding:14px 16px; min-width:0; box-shadow:0 1px 2px rgba(13,40,28,.03)}
.hr-stat.sk{height:74px; background:linear-gradient(90deg,#f6f3ef,#fbf9f6,#f6f3ef); background-size:200% 100%; animation:hrsk 1.2s 6 linear}
@keyframes hrsk{to{background-position:-200% 0}}
.hr-stat .hs-i{width:42px; height:42px; border-radius:12px; display:grid; place-items:center; flex:none; background:var(--primary-50); color:var(--primary)}
.hr-stat .hs-i svg{width:20px; height:20px}
.hr-stat .hs-b{display:flex; flex-direction:column; min-width:0}
.hr-stat .hs-l{font-size:12.5px; color:var(--text-3); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.hr-stat .hs-v{font-size:21px; font-weight:700; color:var(--text); line-height:1.25; font-variant-numeric:tabular-nums; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.hr-stat .hs-v .chip{font-size:12.5px; vertical-align:middle}
.hr-stat .hs-f{font-size:11.5px; color:var(--text-3); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.hr-stat.t-success .hs-i{background:var(--success-50); color:var(--success)} .hr-stat.t-danger .hs-i{background:var(--danger-50); color:var(--danger)}
.hr-stat.t-info .hs-i{background:var(--info-50); color:var(--info)} .hr-stat.t-warning .hs-i{background:var(--warning-50); color:var(--warning)}
.hr-stat.t-gray .hs-i{background:var(--surface-3); color:var(--text-2)} .hr-stat.t-primary .hs-i{background:#f6ead5; color:#228a5d}
.ep-hero + .hr-stats .hr-stat{border-color:#eadfce}

/* شريط الفلاتر */
.hrbar{display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-bottom:14px; padding:10px; background:#fff; border:1px solid var(--border); border-radius:16px; box-shadow:0 1px 2px rgba(13,40,28,.03)}
.hrbar > .inp, .hrbar > select.inp{flex:0 1 190px; width:auto; min-width:140px; height:40px; border-radius:11px; background-color:var(--surface-2)}
.hrbar > input[type=month].inp{flex-basis:170px}
.hrbar .search{position:relative; flex:1 1 240px; min-width:200px}
.hrbar .search > svg{position:absolute; right:12px; top:50%; transform:translateY(-50%); width:17px; height:17px; color:var(--text-3); pointer-events:none}
.hrbar .search .inp{width:100%; height:40px; padding-right:38px; border-radius:11px; background:var(--surface-2)}
.hrbar .date-chip{flex:0 0 auto}
.hrbar .mnav{flex:0 0 auto}
.hrbar .seg2{flex:0 0 auto}
.hrbar .grow{flex:1}
.hrbar .chip.num{height:40px; display:inline-flex; align-items:center; padding:0 12px}
.hrbar-x{margin-inline-start:auto; color:var(--danger)!important}
@media (max-width:860px){
  .hrbar{display:grid; grid-template-columns:1fr 1fr; padding:8px; gap:6px}
  .hrbar .search,.hrbar .seg2,.hrbar .date-chip,.hrbar .mnav,.hrbar .hrbar-x{grid-column:1 / -1}
  .hrbar > .inp, .hrbar > select.inp{min-width:0; width:100%}
  .hrbar .seg2{overflow-x:auto; scrollbar-width:none} .hrbar .seg2 button{white-space:nowrap; padding:8px 12px}
  .hr-stats{grid-template-columns:1fr 1fr; gap:8px}
  .hr-stat{padding:11px 12px; gap:10px} .hr-stat .hs-i{width:36px; height:36px} .hr-stat .hs-v{font-size:17px}
}

/* هيدر الحضور: سطر واحد مرتب */
.att-hero{padding:16px 20px; gap:14px; align-items:center}
.att-hero .ah-t{min-width:220px}
.att-hero .ah-t .chip{margin-top:8px}
.att-hero .ah-c{flex-wrap:nowrap; gap:8px}
.att-hero .dnav{display:inline-flex; align-items:stretch; border:1px solid rgba(255,255,255,.18); border-radius:12px; overflow:hidden; background:rgba(255,255,255,.06)}
.att-hero .dnav .btn{border:0; border-radius:0; min-width:40px; height:42px; background:transparent}
.att-hero .dnav .btn:hover{background:rgba(255,255,255,.1)}
.att-hero .dnav .btn[disabled]{opacity:.35}
.att-hero .dnav .inp{width:150px; height:42px; border:0; border-inline:1px solid rgba(255,255,255,.14); border-radius:0; background:transparent; color:#fff; text-align:center; color-scheme:dark}
.att-hero .ah-c > select.inp{width:170px; height:42px; border-radius:12px}
.att-hero .btn.today{height:42px; background:var(--rv-gold)!important; color:var(--rv-dark)!important; border-color:var(--rv-gold)!important; font-weight:700}
@media (max-width:860px){
  .att-hero{padding:14px} .att-hero .ah-t{min-width:0; flex-basis:100%}
  .att-hero .ah-c{flex-basis:100%; flex-wrap:wrap}
  .att-hero .dnav{flex:1 1 100%} .att-hero .dnav .inp{flex:1; width:auto}
  .att-hero .ah-c > select.inp{flex:1; width:auto}
}
.att-stats{gap:6px} .att-stats .chip{background:#fff; border:1px solid var(--border)}
.att-stats .chip.ok{border-color:#bfe6d4} .att-stats .chip.bad{border-color:#f2c5c7} .att-stats .chip.warn{border-color:#f1dcab} .att-stats .chip.info{border-color:#ccf0eb}

/* ملف الموظف: هيدر أخف */
.ep-hero{padding:18px 20px; border-radius:18px}
.ep-hero h2{font-size:20px}
.hr-sub{background:#fff; border:1px solid var(--border); border-radius:14px; padding:5px; width:fit-content; max-width:100%; overflow-x:auto; flex-wrap:nowrap; scrollbar-width:none; gap:4px}
.hr-sub::-webkit-scrollbar{display:none}
.hr-sub button,.hr-sub a{border:0; background:transparent; border-radius:10px; white-space:nowrap; min-height:36px; padding:7px 13px}
.hr-sub .on{background:var(--rv-cream)!important; color:var(--rv-dark)!important; box-shadow:inset 0 -2px 0 var(--rv-gold)}
@media (max-width:860px){ .hr-sub{width:auto} }

/* الكود بيتعمل تلقائياً — اسم + موبايل بس إجباري */
.wz .hint b.num{color:var(--rv-brown)}

.hrbar-x[hidden]{display:none!important}

/* ======================= الصفحة مايبقاش فيها سكرول بالعرض ======================= */
.main{overflow-x:clip}
.app{overflow-x:clip}

/* ======================= PDF: هيدر وفوتر احترافي (لكل التقارير) ======================= */
.pdf-hd2{display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:18px; margin:-34px -36px 16px; padding:18px 36px; background:linear-gradient(135deg,#0e4a30,#135438); color:#fff; border-bottom:4px solid #c49a5a}
.pdf-hd2 .ph-logo img{height:58px; display:block}
.pdf-hd2 .ph-t h1{margin:0; font-size:19px; font-weight:700; color:#fff; line-height:1.35}
.pdf-hd2 .ph-t p{margin:3px 0 0; font-size:11.5px; color:#e7d6bd}
.pdf-hd2 .ph-m{display:flex; flex-direction:column; gap:4px; text-align:left; font-size:10.5px}
.pdf-hd2 .ph-m span{display:flex; gap:6px; justify-content:flex-end; align-items:baseline}
.pdf-hd2 .ph-m small{color:#cdb898} .pdf-hd2 .ph-m b{color:#fff; font-weight:600; direction:ltr}
.pdf-ft2{display:flex; justify-content:space-between; gap:12px; color:#5f7d6e; font-size:9.5px; border-top:2px solid #c49a5a; padding-top:7px; margin-top:10px}
.pdf-ft2 .pg{font-weight:700; color:#135438}
.pdf-page .hr-stats{grid-template-columns:repeat(3,1fr)} .pdf-page .hr-stat{box-shadow:none}
.pdf-page .hrbar,.pdf-page .hr-sub,.pdf-page .ptabs{display:none!important}
.pdf-page .chip{border:1px solid #e6dccf}

/* ======================= صفحات بمقاس (قسايم الرواتب) ======================= */
.pdf-sheet{background:#fff; color:#1d1a17; direction:rtl; font-family:var(--font); box-sizing:border-box; overflow:hidden}
.pdf-sheet.sz-a4,.pdf-sheet.sz-a5{padding:34px 36px}
.pdf-sheet .slip .sl-bd{min-height:880px}
.pdf-sheet.sz-r58{padding:6px 5px 10px}

/* إيصال 58 مم — أسود بس (مكنة حرارية) */
.rcpt{width:100%; color:#000; font-size:10.5px; line-height:1.45; font-weight:600}
.rcpt .rc-logo{text-align:center} .rcpt .rc-logo img{width:120px; filter:grayscale(1) contrast(1.6)}
.rcpt .rc-co{text-align:center; font-size:12.5px; font-weight:800; margin-top:2px}
.rcpt .rc-s{text-align:center; font-size:9.5px}
.rcpt .rc-title{text-align:center; font-size:13px; font-weight:800; margin-top:6px; border:1.5px solid #000; border-radius:6px; padding:2px 0}
.rcpt .rc-hr{border-top:1.5px dashed #000; margin:6px 0}
.rcpt .rc-h{font-weight:800; font-size:10.5px; margin-bottom:2px; text-decoration:underline}
.rcpt .rr{display:flex; justify-content:space-between; gap:6px; padding:1px 0}
.rcpt .rr span{flex:1; min-width:0} .rcpt .rr b{font-weight:800; direction:ltr; white-space:nowrap}
.rcpt .rr b.ltr{font-size:9px}
.rcpt .rr.tot{border-top:1px solid #000; margin-top:2px; padding-top:2px}
.rcpt .rc-net{display:flex; justify-content:space-between; align-items:center; margin-top:6px; padding:5px 6px; border:2px solid #000; border-radius:6px; font-size:12px; font-weight:800}
.rcpt .rc-net b{font-size:14px; direction:ltr}
.rcpt .rc-words{text-align:center; font-size:9px; margin-top:3px}
.rcpt .rc-sig{font-size:9.5px; margin-top:10px} .rcpt .rc-line{border-bottom:1px solid #000; height:22px}
.rcpt .rc-foot{text-align:center; font-size:9px; margin-top:8px}

/* اختيار مقاس الورق */
.paper-grid .qs-item.on{border-color:var(--rv-gold); background:var(--rv-cream)}

/* ======================= ملف الموظف: كروت البيانات ======================= */
.ic-grid{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; align-items:start}
.ic{padding:0; overflow:hidden}
.ic.wide{grid-column:1 / -1}
.ic-h{display:flex; align-items:center; gap:10px; padding:13px 16px; border-bottom:1px solid var(--border); background:var(--surface-2)}
.ic-h b{flex:1; font-size:14px; color:var(--rv-dark)}
.ic-h small{font-size:11.5px; color:var(--text-3); background:#fff; border:1px solid var(--border); border-radius:999px; padding:2px 9px}
.ic-i{width:32px; height:32px; border-radius:10px; display:grid; place-items:center; background:#f6ead5; color:#228a5d; flex:none}
.ic-i svg{width:17px; height:17px}
.ic-b{padding:4px 16px 8px}
.ir{display:flex; justify-content:space-between; align-items:baseline; gap:14px; padding:9px 0; border-bottom:1px dashed #ece5db; font-size:13.5px}
.ir:last-child{border-bottom:0}
.ir > span{color:var(--text-3); flex:none}
.ir > b{font-weight:600; color:var(--text); text-align:left; min-width:0; overflow-wrap:anywhere}
.ir > b small{font-weight:400}
.ic-empty{padding:18px 16px; color:var(--text-3); font-size:13px; text-align:center}
.ic > p{padding:12px 16px}
@media (max-width:860px){ .ic-grid{grid-template-columns:1fr} }

/* ======================= كاليندر الحضور (مضغوط + قابل للضغط) ======================= */
.att-cal .ac-top{display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; margin-bottom:10px}
.att-cal .att-stats{margin:0}
.att-cal .cal{max-width:760px; margin:0 auto; gap:6px}
.att-cal .cal .dh{font-size:11.5px; padding:4px 0}
.att-cal .dc{aspect-ratio:auto; height:66px; border:1px solid transparent; font:inherit; cursor:pointer; padding:4px 2px; gap:1px; position:relative; transition:transform .1s, box-shadow .1s}
.att-cal .dc:not([disabled]):hover{transform:translateY(-1px); box-shadow:0 4px 12px -6px rgba(9,51,33,.35); border-color:var(--rv-gold)}
.att-cal .dc[disabled]{cursor:default}
.att-cal .dc .dn{font-size:14px; font-weight:800; line-height:1}
.att-cal .dc small{font-size:9.5px; font-weight:600; white-space:nowrap}
.att-cal .dc em{font-style:normal; font-size:9px; opacity:.8; direction:ltr}
.att-cal .dc .late{position:absolute; top:3px; left:4px; font-style:normal; font-size:9px; font-weight:700}
.att-cal .dc.today{box-shadow:inset 0 0 0 2px var(--rv-gold)}
.st-fut{background:#fbfaf8!important; color:#c9c0b5!important}
@media (max-width:560px){ .att-cal .dc{height:54px} .att-cal .dc small{font-size:8px} .att-cal .dc em{display:none} .att-cal .cal{gap:4px} }
.day-st{display:flex; flex-wrap:wrap; gap:6px}
.day-st .chip{cursor:pointer; border:1.5px solid transparent; padding:7px 13px; font-size:13px}
.day-st .chip.on{border-color:currentColor; box-shadow:0 0 0 2px #fff inset}
tr.pre-hire td{background:#fbf8f3}

/* ======================= السجل: خط زمني ======================= */
.hl{display:flex; flex-direction:column; padding:4px 0}
.hl-i{display:flex; gap:12px; position:relative; padding:10px 4px}
.hl-i:not(:last-child)::before{content:''; position:absolute; right:21px; top:44px; bottom:-6px; width:2px; background:#efe7dc}
.hl-ic{width:36px; height:36px; border-radius:50%; display:grid; place-items:center; background:#f6ead5; color:#228a5d; flex:none; z-index:1; border:3px solid #fff; box-shadow:0 0 0 1px #eadfce}
.hl-ic svg{width:16px; height:16px}
.hl-b{flex:1; min-width:0; background:var(--surface-2); border:1px solid var(--border); border-radius:12px; padding:9px 12px}
.hl-t{display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap; align-items:baseline}
.hl-t b{font-size:13.5px}
.hl-d{display:flex; flex-wrap:wrap; gap:5px; margin-top:6px}
.hl-d .chip{background:#fff; border:1px solid var(--border); font-weight:500} .hl-d .chip b{font-weight:700}

/* ======================= زرار الوقت + اختيار الوقت ======================= */
.tbtn{display:inline-flex; align-items:center; gap:7px; height:38px; padding:0 12px; min-width:104px; justify-content:center; border:1px solid var(--border); border-radius:11px; background:#fff; font:inherit; font-weight:700; font-size:13.5px; color:var(--rv-dark); cursor:pointer; font-variant-numeric:tabular-nums; transition:border-color .15s, box-shadow .15s}
.tbtn svg{width:15px; height:15px; color:var(--rv-gold)}
.tbtn:hover:not([disabled]){border-color:var(--rv-gold); box-shadow:0 0 0 3px #f6ead5}
.tbtn.empty{color:var(--text-3); font-weight:500}
.tbtn[disabled]{background:var(--surface-3); color:#b9b0a5; cursor:not-allowed; border-style:dashed} .tbtn[disabled] svg{color:#cfc6bb}
.att-card .tbtn{width:100%}
.tpop-bg{position:fixed; inset:0; z-index:9998; background:transparent}
.tpop{position:fixed; z-index:9999; width:340px; background:#fff; border:1px solid var(--border); border-radius:18px; box-shadow:0 24px 60px -16px rgba(9,51,33,.4); padding:14px; direction:rtl}
.tpop.sheet-like{left:0!important; right:0; bottom:0; top:auto!important; width:auto; border-radius:22px 22px 0 0; padding:16px 14px calc(16px + env(safe-area-inset-bottom))}
.tpop-bg:has(+ .tpop.sheet-like){background:rgba(4,24,15,.4)}
.tp-h{display:flex; justify-content:space-between; align-items:center; margin-bottom:10px}
.tp-h b{font-size:14px} .tp-v{font-size:20px; font-weight:800; color:var(--rv-brown)}
.tp-q{display:grid; grid-template-columns:repeat(auto-fill,minmax(92px,1fr)); gap:6px; margin-bottom:10px}
.tp-q button{border:1px solid #eadfce; background:var(--rv-cream); border-radius:11px; padding:6px 4px; font:inherit; cursor:pointer; display:flex; flex-direction:column; align-items:center; line-height:1.25}
.tp-q button b{font-size:13px; color:var(--rv-dark)} .tp-q button small{font-size:10.5px; color:#3b936d}
.tp-q button.on,.tp-q button:hover{border-color:var(--rv-gold); background:#f6ead5}
.tp-l{font-size:11.5px; color:var(--text-3); margin:4px 0 5px; font-weight:600}
.tp-hrs{display:grid; grid-template-columns:repeat(6,1fr); gap:4px; margin-bottom:6px}
.tp-min{display:grid; grid-template-columns:repeat(6,1fr); gap:4px}
.tp-hrs button,.tp-min button{height:36px; border:1px solid var(--border); background:#fff; border-radius:9px; font:inherit; font-weight:700; font-size:13px; cursor:pointer; color:var(--text); display:flex; align-items:center; justify-content:center; gap:2px; font-variant-numeric:tabular-nums}
.tp-hrs button small{font-size:9.5px; font-weight:600; color:var(--text-3)}
.tp-hrs button:hover,.tp-min button:hover{border-color:var(--rv-gold)}
.tp-hrs button.on,.tp-min button.on{background:var(--rv-dark); color:#fff; border-color:var(--rv-dark)} .tp-hrs button.on small{color:var(--rv-gold-2)}
.tp-f{display:flex; justify-content:space-between; align-items:center; margin-top:12px; padding-top:10px; border-top:1px solid var(--border)}

/* ======================= اختيار حالة اليوم ======================= */
.asm-grid{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px}
.asm-c{display:flex; align-items:center; gap:10px; text-align:start; padding:11px 12px; border:1.5px solid var(--border); border-radius:14px; background:#fff; font:inherit; cursor:pointer; position:relative; transition:border-color .12s, background .12s, transform .1s}
.asm-c:hover{transform:translateY(-1px); border-color:#d9c9b1}
.asm-c .ac-i{width:38px; height:38px; border-radius:11px; display:grid; place-items:center; flex:none; background:var(--surface-3); color:var(--text-2)}
.asm-c .ac-i svg{width:19px; height:19px}
.asm-c .ac-t{display:flex; flex-direction:column; min-width:0} .asm-c .ac-t b{font-size:14px; color:var(--text)} .asm-c .ac-t small{font-size:11.5px; color:var(--text-3); line-height:1.35}
.asm-c .ac-ok{position:absolute; top:8px; left:8px; width:20px; height:20px; border-radius:50%; display:grid; place-items:center; background:currentColor} .asm-c .ac-ok svg{width:12px; height:12px; color:#fff}
.asm-c.t-ok .ac-i{background:var(--success-50); color:var(--success)} .asm-c.t-ok.on{border-color:var(--success); background:#f3fbf7; color:var(--success)}
.asm-c.t-warn .ac-i{background:var(--warning-50); color:var(--warning)} .asm-c.t-warn.on{border-color:var(--warning); background:#fffaf0; color:var(--warning)}
.asm-c.t-bad .ac-i{background:var(--danger-50); color:var(--danger)} .asm-c.t-bad.on{border-color:var(--danger); background:#fef6f6; color:var(--danger)}
.asm-c.t-info .ac-i{background:var(--info-50); color:var(--info)} .asm-c.t-info.on{border-color:var(--info); background:#f6fdfc; color:var(--info)}
.asm-c.t-gray .ac-i{background:#f7eaf0; color:#9b3e69} .asm-c.t-gray.on{border-color:#9b3e69; background:#fdf8fa; color:#9b3e69}
.asm-c.t-gold .ac-i{background:#f6ead5; color:#228a5d} .asm-c.t-gold.on{border-color:#c49a5a; background:var(--rv-cream); color:#228a5d}
.asm-c.on .ac-t b{color:inherit}
.asm-sec{margin-top:14px; padding-top:12px; border-top:1px dashed var(--border)}
.asm-st{display:flex; align-items:center; gap:6px; font-weight:700; font-size:13.5px; margin-bottom:10px; color:var(--rv-brown)} .asm-st svg{width:16px; height:16px; color:var(--rv-gold)} .asm-st small{font-weight:500; margin-inline-start:auto}
.asm-times{display:flex; align-items:flex-end; gap:10px} .asm-times > div{flex:1} .asm-times label{display:block; font-size:12px; color:var(--text-3); margin-bottom:4px}
.asm-times .tbtn{width:100%; height:46px; font-size:16px}
.asm-arr{padding-bottom:12px; color:var(--text-3)} .asm-arr svg{width:18px; height:18px}
.asm-calc{display:flex; gap:6px; margin-top:8px; min-height:26px}
.asm-lt{display:flex; flex-wrap:wrap; gap:6px}
.asm-lt button{border:1.5px solid var(--border); background:#fff; border-radius:12px; padding:8px 14px; font:inherit; font-weight:700; cursor:pointer; display:flex; flex-direction:column; align-items:flex-start; line-height:1.3}
.asm-lt button small{font-weight:500; font-size:11px; color:var(--text-3)}
.asm-lt button.on{border-color:var(--info); background:#f6fdfc; color:var(--info)}
@media (max-width:560px){ .asm-grid{gap:6px} .asm-c{padding:9px; gap:8px} .asm-c .ac-i{width:32px; height:32px} .asm-c .ac-t small{display:none} }

/* ======================= الكشف الشهري: تحرك واضح + إجماليات ثابتة ======================= */
.ms-card{padding:12px}
.ms-top{display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:8px}
.ms-top .legend{margin:0}
.ms-nav{display:flex; gap:6px} .ms-nav .btn.today{background:var(--rv-gold); color:var(--rv-dark); border-color:var(--rv-gold); font-weight:700}
.ms-wrap{position:relative}
.ms-arrow{position:absolute; top:50%; transform:translateY(-50%); z-index:6; width:38px; height:38px; border-radius:50%; border:1px solid var(--border); background:#fff; box-shadow:0 6px 18px -6px rgba(9,51,33,.35); display:none; place-items:center; cursor:pointer; color:var(--rv-dark)}
.ms-arrow svg{width:18px; height:18px}
.ms-arrow.r{right:calc(var(--ms-pin, 160px) + 6px)} .ms-arrow.l{left:6px}
.ms-wrap.can-r .ms-arrow.r,.ms-wrap.can-l .ms-arrow.l{display:grid}
.ms-wrap::after,.ms-wrap::before{content:''; position:absolute; top:0; bottom:0; width:34px; pointer-events:none; z-index:4; opacity:0; transition:opacity .2s}
.ms-wrap::after{left:0; background:linear-gradient(90deg,rgba(255,255,255,.95),rgba(255,255,255,0))}
.ms-wrap::before{right:var(--ms-pin, 160px); background:linear-gradient(-90deg,rgba(255,255,255,.95),rgba(255,255,255,0))}
.ms-wrap.can-l::after,.ms-wrap.can-r::before{opacity:1}
.msheet{max-height:none; scroll-behavior:smooth; --ms-pin:376px}
.ms-wrap{--ms-pin:376px}
.msheet table{font-size:12px; border-collapse:separate; border-spacing:0}
.msheet th,.msheet td{padding:3px 2px; border-bottom:1px solid #f0e9df}
.msheet th.nm,.msheet td.nm{width:160px; min-width:160px; max-width:160px; right:0; padding:6px 10px}
.msheet td.nm a{display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap} .msheet td.nm small{display:block; color:var(--text-3); font-size:10.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.msheet .tt{position:sticky; z-index:2; background:#fff; width:54px; min-width:54px; text-align:center; font-variant-numeric:tabular-nums}
.msheet th.tt{z-index:3; background:var(--surface-2); font-size:11px; color:var(--text-2)}
.msheet th:nth-child(2),.msheet td:nth-child(2){right:160px} .msheet th:nth-child(3),.msheet td:nth-child(3){right:214px}
.msheet th:nth-child(4),.msheet td:nth-child(4){right:268px} .msheet th:nth-child(5),.msheet td:nth-child(5){right:322px}
.msheet .tt-l{box-shadow:-6px 0 8px -6px rgba(9,51,33,.18); border-left:1px solid #eadfce}
.msheet td.tt small{display:block; font-size:9.5px; color:var(--text-3)} .msheet td.tt.bad b,.msheet td.tt.bad{color:var(--danger); font-weight:700} .msheet .z{color:#c9c0b5}
.msheet th.dy{min-width:34px; line-height:1.15; padding:5px 1px} .msheet th.dy b{display:block; font-size:12.5px} .msheet th.dy small{display:block; font-size:9px; color:var(--text-3); font-weight:500}
.msheet .fri{background:#faf7f3} .msheet th.fri{color:#7b9b8b}
.msheet .td{background:#fff7e8} .msheet th.td{background:#f6ead5!important; box-shadow:inset 0 -3px 0 var(--rv-gold)} .msheet th.td b{color:var(--rv-brown)}
.msheet .cell{width:28px; height:28px; border-radius:7px; border:1px solid transparent; font:inherit; font-weight:800; font-size:11.5px; display:inline-grid; place-items:center; position:relative; cursor:pointer; padding:0}
.msheet .cell:not([disabled]):hover{border-color:var(--rv-gold); transform:scale(1.08)}
.msheet .cell[disabled]{cursor:default}
.msheet .cell i{position:absolute; top:2px; left:2px; width:5px; height:5px; border-radius:50%; background:#d98a00}
@media (max-width:860px){
  .ms-wrap,.msheet{--ms-pin:112px}
  .msheet th.nm,.msheet td.nm{width:112px; min-width:112px; max-width:112px; padding:5px 6px}
  .msheet .tt{position:static; box-shadow:none}
  .ms-top{flex-direction:column; align-items:stretch} .ms-nav{justify-content:space-between} .ms-nav .btn{flex:1; justify-content:center}
  .ms-arrow{width:34px; height:34px}
}

/* ======================= قسيمة الراتب (A4 / A5) — تصميم جديد ======================= */
.pdf-sheet.sz-a4,.pdf-sheet.sz-a5{padding:0}
.slip2{height:100%; display:flex; flex-direction:column; color:#1d1a17; font-family:var(--font); font-size:12.5px; background:#fff}
.s2-hd{display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:20px; padding:26px 34px; background:linear-gradient(135deg,#0e4a30,#135438); color:#fff; border-bottom:5px solid #c49a5a}
.s2-logo{background:#fff; border-radius:14px; padding:8px 12px; display:grid; place-items:center} .s2-logo img{height:58px; display:block}
.s2-ttl small{color:#d9c4a3; font-size:11.5px} .s2-ttl h2{margin:2px 0 0; font-size:26px; font-weight:800; letter-spacing:-.3px} .s2-m{color:#e3c48d; font-size:15px; font-weight:700; margin-top:2px}
.s2-meta{display:flex; flex-direction:column; gap:6px; min-width:180px}
.s2-meta > div{display:flex; justify-content:space-between; gap:14px; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.12); border-radius:9px; padding:5px 10px; white-space:nowrap}
.s2-meta span{color:#d9c4a3; font-size:10.5px} .s2-meta b{font-size:11.5px; direction:ltr} .s2-meta b.ok{color:#7fe0b4} .s2-meta b.wait{color:#f5c46b}
.s2-bd{flex:1; display:flex; flex-direction:column; padding:22px 34px 18px; position:relative}
.s2-wm{position:absolute; inset:120px 0 auto 0; display:grid; place-items:center; opacity:.035; pointer-events:none} .s2-wm img{width:46%}
.s2-emp{display:grid; grid-template-columns:200px 1fr; gap:0; border:1px solid #eadfce; border-radius:14px; overflow:hidden; position:relative}
.s2-emp .e-main{background:#fbf6ee; padding:14px 16px; border-inline-end:1px solid #eadfce; display:flex; flex-direction:column; justify-content:center}
.s2-emp .e-main small,.s2-emp .e-g small{display:block; color:#688376; font-size:10.5px}
.s2-emp .e-main b{font-size:17px; color:#0e4a30; line-height:1.3} .s2-emp .e-main span{font-size:11.5px; color:#228a5d; font-weight:700; direction:ltr; text-align:right}
.s2-emp .e-g{display:grid; grid-template-columns:repeat(2,1fr)} .s2-emp .e-g > div{padding:9px 14px; border-bottom:1px solid #f1ebe2} .s2-emp .e-g > div:nth-child(odd){border-inline-end:1px solid #f1ebe2}
.s2-emp .e-g > div:nth-last-child(-n+2){border-bottom:0} .s2-emp .e-g b{font-size:13px}
.dash{color:#c9c0b5}
.s2-sec{margin:18px 0 8px; font-weight:800; font-size:13.5px; color:#135438; display:flex; align-items:center; gap:8px} .s2-sec small{font-weight:500; color:#688376; font-size:11px}
.s2-sec::after{content:''; flex:1; height:1px; background:#eadfce}
.s2-stats{display:grid; grid-template-columns:repeat(6,1fr); gap:8px; position:relative}
.s2-stats .sv{border:1px solid #eadfce; border-radius:11px; padding:8px 6px; text-align:center; background:#fff}
.s2-stats .sv b{display:block; font-size:17px; color:#0e4a30; font-variant-numeric:tabular-nums} .s2-stats .sv span{font-size:10px; color:#688376}
.s2-stats .sv.ok b{color:#0f8a5f} .s2-stats .sv.bad b{color:#c8323a} .s2-stats .sv.warn b{color:#b77900}
.s2-two{display:grid; grid-template-columns:1fr 1fr; gap:14px; align-items:start; position:relative}
.s2-t{width:100%; border-collapse:separate; border-spacing:0; border:1px solid #eadfce; border-radius:12px; overflow:hidden; font-size:12.5px}
.s2-t th{background:#f6efe4; color:#135438; text-align:right; padding:8px 12px; font-size:12px} .s2-t th.n{text-align:left}
.s2-t td{padding:8px 12px; border-top:1px solid #f1ebe2} .s2-t td small{color:#688376; font-size:10.5px}
.s2-t td.n{text-align:left; direction:ltr; font-variant-numeric:tabular-nums; white-space:nowrap; font-weight:600}
.s2-t tr.tot td{background:#fbf6ee; font-weight:800; border-top:1.5px solid #e2d3bd; color:#0e4a30}
.s2-t.ded tr.tot td.n{color:#c8323a} .s2-t td.none{text-align:center; color:#688376; padding:14px}
.s2-net{display:flex; justify-content:space-between; align-items:center; gap:16px; margin-top:16px; padding:16px 22px; border-radius:14px; background:linear-gradient(135deg,#0e4a30,#135438); color:#fff; border-bottom:4px solid #c49a5a; position:relative}
.s2-net b{font-size:16px} .s2-net small{display:block; color:#d9c4a3; font-size:11px}
.s2-net .amt{display:flex; align-items:baseline; gap:8px; white-space:nowrap; direction:ltr} .s2-net .amt .num{font-size:32px; font-weight:800; color:#e3c48d} .s2-net .amt em{font-style:normal; font-size:15px; color:#e3c48d; font-weight:700}
.s2-words{margin-top:7px; text-align:center; font-size:12px; color:#277352; font-weight:700}
.s2-pay{display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-top:14px; position:relative}
.s2-pay > div{border:1px solid #eadfce; border-radius:11px; padding:8px 12px} .s2-pay small{display:block; color:#688376; font-size:10.5px} .s2-pay b{font-size:12.5px}
.s2-sig{display:grid; grid-template-columns:1fr 1fr; gap:50px; margin-top:auto; padding-top:30px; text-align:center; color:#405349; font-size:11.5px}
.s2-sig span{display:block; border-bottom:1px solid #789988; height:36px; margin-bottom:6px}
.s2-ft{margin-top:14px; padding-top:8px; border-top:1px solid #f1ebe2; text-align:center; font-size:10px; color:#688376}
/* A5: نفس التصميم بمقاس حقيقي (خط أصغر ومسافات أقل) */
.sz-a5 .slip2{font-size:10.5px}
.sz-a5 .s2-hd{padding:14px 18px; gap:12px; border-bottom-width:4px} .sz-a5 .s2-logo{padding:5px 8px; border-radius:10px} .sz-a5 .s2-logo img{height:36px}
.sz-a5 .s2-ttl h2{font-size:18px} .sz-a5 .s2-m{font-size:12px} .sz-a5 .s2-ttl small{font-size:9.5px}
.sz-a5 .s2-meta{min-width:130px; gap:4px} .sz-a5 .s2-meta > div{padding:3px 7px; gap:8px} .sz-a5 .s2-meta span{font-size:8.5px} .sz-a5 .s2-meta b{font-size:9.5px}
.sz-a5 .s2-bd{padding:12px 18px 10px}
.sz-a5 .s2-emp{grid-template-columns:140px 1fr; border-radius:10px} .sz-a5 .s2-emp .e-main{padding:9px 10px} .sz-a5 .s2-emp .e-main b{font-size:13px}
.sz-a5 .s2-emp .e-g > div{padding:5px 9px} .sz-a5 .s2-emp .e-g b{font-size:10.5px} .sz-a5 .s2-emp small{font-size:8.5px!important}
.sz-a5 .s2-sec{margin:10px 0 5px; font-size:11px}
.sz-a5 .s2-stats{gap:4px} .sz-a5 .s2-stats .sv{padding:5px 3px; border-radius:8px} .sz-a5 .s2-stats .sv b{font-size:13px} .sz-a5 .s2-stats .sv span{font-size:8px}
.sz-a5 .s2-two{gap:8px} .sz-a5 .s2-t{font-size:10px; border-radius:9px} .sz-a5 .s2-t th{padding:5px 8px; font-size:9.5px} .sz-a5 .s2-t td{padding:5px 8px}
.sz-a5 .s2-net{margin-top:10px; padding:10px 14px; border-radius:10px} .sz-a5 .s2-net b{font-size:12px} .sz-a5 .s2-net small{font-size:8.5px} .sz-a5 .s2-net .amt .num{font-size:22px} .sz-a5 .s2-net .amt em{font-size:11px}
.sz-a5 .s2-words{font-size:9.5px; margin-top:4px}
.sz-a5 .s2-pay{gap:5px; margin-top:8px} .sz-a5 .s2-pay > div{padding:5px 8px; border-radius:8px} .sz-a5 .s2-pay small{font-size:8.5px} .sz-a5 .s2-pay b{font-size:10px}
.sz-a5 .s2-sig{gap:30px; padding-top:16px; font-size:9.5px} .sz-a5 .s2-sig span{height:22px}
.sz-a5 .s2-ft{font-size:8.5px; margin-top:8px}

/* ======================= دورة الشهر: الشهور + الخطوات ======================= */
.pm-strip{display:flex; gap:8px; overflow-x:auto; scrollbar-width:thin; padding:2px 2px 8px; margin-bottom:10px; scroll-behavior:smooth}
.pm-c{flex:0 0 118px; display:flex; flex-direction:column; align-items:center; gap:1px; padding:10px 8px; border:1.5px solid var(--border); border-radius:14px; background:#fff; color:var(--text); text-decoration:none!important; position:relative; transition:border-color .15s, transform .1s}
.pm-c:hover{border-color:#d9c9b1; transform:translateY(-1px)}
.pm-c b{font-size:14px} .pm-c small{font-size:11px; color:var(--text-3)}
.pm-c .pm-st{font-size:10.5px; font-weight:700; margin-top:4px; padding:2px 8px; border-radius:999px; background:var(--surface-3); color:var(--text-3)}
.pm-c em{font-style:normal; font-size:11px; color:var(--text-2); margin-top:3px; direction:ltr}
.pm-c.s-draft .pm-st{background:var(--warning-50); color:var(--warning)} .pm-c.s-appr .pm-st{background:var(--info-50); color:var(--info)}
.pm-c.s-part .pm-st{background:#f6ead5; color:#228a5d} .pm-c.s-paid .pm-st{background:var(--success-50); color:var(--success)}
.pm-c.on{border-color:var(--rv-dark); background:var(--rv-dark); color:#fff; box-shadow:0 8px 20px -10px rgba(9,51,33,.5)}
.pm-c.on small,.pm-c.on em{color:#e3c48d}
.pm-steps{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-bottom:16px}
.pms{display:flex; align-items:center; gap:10px; padding:11px 12px; border:1px solid var(--border); border-radius:14px; background:#fff; position:relative; min-width:0}
.pms .pi{width:34px; height:34px; border-radius:50%; display:grid; place-items:center; flex:none; background:var(--surface-3); color:var(--text-3)} .pms .pi svg{width:16px; height:16px}
.pms b{display:block; font-size:13px} .pms small{display:block; font-size:11px; color:var(--text-3); line-height:1.35}
.pms.done{border-color:#bfe6d4; background:#f6fcf9} .pms.done .pi{background:var(--success); color:#fff}
.pms.now{border-color:var(--rv-gold); background:var(--rv-cream); box-shadow:0 0 0 3px #f6ead5} .pms.now .pi{background:var(--rv-dark); color:var(--rv-gold-2)}
.pay-gate{display:flex; align-items:center; gap:14px; flex-wrap:wrap; padding:16px 18px; margin-bottom:16px; border-radius:16px; border:1.5px dashed var(--rv-gold); background:var(--rv-cream)}
.pay-gate .pg-i{width:44px; height:44px; border-radius:12px; display:grid; place-items:center; background:var(--rv-dark); color:var(--rv-gold-2); flex:none} .pay-gate .pg-i svg{width:20px; height:20px}
.pay-gate > div{flex:1; min-width:220px} .pay-gate b{display:block; font-size:15px; color:var(--rv-dark)} .pay-gate small{color:#277352; font-size:12.5px}
.pay-gate .btn.primary{background:linear-gradient(135deg,var(--rv-brown),var(--rv-dark)); border-color:var(--rv-dark); box-shadow:inset 0 -2px 0 var(--rv-gold); min-height:42px}
@media (max-width:860px){ .pm-steps{grid-template-columns:1fr 1fr} .pms small{display:none} .pm-c{flex-basis:100px} .pay-gate .btn{flex:1; justify-content:center} }

/* شريط الشهور: 6 شهور حوالين الشهر المفتوح + أسهم */
.pm-bar{display:flex; align-items:stretch; gap:8px; margin-bottom:10px}
.pm-bar .pm-strip{flex:1; display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); overflow:visible; padding:0; margin:0}
.pm-bar .pm-c{flex:none; min-width:0; padding-top:16px}
.pm-arr{width:40px; flex:none; display:grid; place-items:center; border:1.5px solid var(--border); border-radius:14px; background:#fff; color:var(--rv-dark)}
.pm-arr:hover{border-color:var(--rv-gold); background:var(--rv-cream)} .pm-arr svg{width:18px; height:18px}
.pm-today{align-self:center; background:var(--rv-gold)!important; color:var(--rv-dark)!important; border-color:var(--rv-gold)!important; font-weight:700; white-space:nowrap}
.pm-c .pm-now{position:absolute; top:-9px; left:50%; transform:translateX(-50%); font-style:normal; font-size:10px; font-weight:800; background:var(--rv-gold); color:var(--rv-dark); padding:1px 8px; border-radius:999px; white-space:nowrap}
.pm-c.is-cur:not(.on){border-color:var(--rv-gold)}
.pm-c.s-fut{background:repeating-linear-gradient(135deg,#fff,#fff 8px,#fbf8f3 8px,#fbf8f3 16px)} .pm-c.s-fut .pm-st{background:#f1ede8; color:#7b9b8b}
.pm-c.on.s-fut{background:var(--rv-dark)}
@media (max-width:860px){ .pm-bar .pm-strip{grid-template-columns:repeat(6,92px); overflow-x:auto; padding-top:10px} .pm-bar{flex-wrap:wrap} .pm-today{order:9; flex-basis:100%; justify-content:center} }

/* ======================= اختيار مقاس الورق ======================= */
.ppk{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px}
.ppk-c{position:relative; display:flex; flex-direction:column; align-items:center; text-align:center; gap:3px; padding:16px 10px 14px; border:1.5px solid var(--border); border-radius:16px; background:#fff; font:inherit; cursor:pointer; transition:border-color .15s, transform .1s, box-shadow .15s}
.ppk-c:hover{transform:translateY(-2px); border-color:#d9c9b1; box-shadow:0 10px 24px -14px rgba(9,51,33,.35)}
.ppk-c.on{border-color:var(--rv-gold); background:var(--rv-cream); box-shadow:0 0 0 3px #f6ead5}
.ppk-c b{font-size:15px; color:var(--rv-dark); margin-top:8px} .ppk-c small{font-size:11.5px; color:var(--text-2); line-height:1.45; min-height:34px} .ppk-c em{font-style:normal; font-size:11px; color:var(--text-3); direction:ltr}
.ppk-ok{position:absolute; top:8px; left:8px; width:22px; height:22px; border-radius:50%; background:var(--rv-dark); color:var(--rv-gold-2); display:grid; place-items:center} .ppk-ok svg{width:13px; height:13px}
/* رسمة الورقة بنسبتها الحقيقية */
.ppk-sh{display:flex; flex-direction:column; gap:4px; padding:8px 7px; background:#fff; border:1.5px solid #d9cfc2; border-radius:4px; box-shadow:2px 3px 0 #eee6db; height:74px}
.ppk-sh i{display:block; height:4px; border-radius:2px; background:#e6dccf} .ppk-sh i:first-child{background:#135438; height:7px} .ppk-sh i:nth-child(2){width:70%}
.ppk-sh.sh-a4{width:53px} .ppk-sh.sh-a5{width:44px; height:62px; margin-top:12px} .ppk-sh.sh-r58{width:26px; height:74px; border-radius:2px 2px 0 0; border-bottom-style:dashed}
.ppk-c.on .ppk-sh{border-color:var(--rv-gold)}
.ppk-hint{display:flex; gap:7px; align-items:flex-start; margin:12px 0 0; font-size:12px; color:var(--text-3); line-height:1.6} .ppk-hint svg{width:15px; height:15px; flex:none; margin-top:2px; color:var(--rv-gold)}
@media (max-width:560px){ .ppk{grid-template-columns:1fr} .ppk-c{flex-direction:row; text-align:start; gap:12px; padding:12px} .ppk-c b{margin:0} .ppk-c small{min-height:0} .ppk-sh{transform:scale(.7); margin:-10px -6px} .ppk-c > b,.ppk-c > small,.ppk-c > em{display:block} }

/* ======================= لمسات أخيرة على قسيمة الراتب ======================= */
.s2-hd{padding:24px 32px} .s2-meta > div{background:rgba(255,255,255,.06)}
.s2-emp .e-main{background:linear-gradient(180deg,#fbf6ee,#f7efe3)}
.s2-t th{letter-spacing:.2px}
.s2-t tbody tr:nth-child(even) td{background:#fdfbf8}
.s2-net{box-shadow:0 10px 24px -16px rgba(9,51,33,.6)}

/* ======================= أزرار الإجراءات في جداول الرواتب (نفس الستايل الغامق بتاع السيستم — مقاسات موحدة) ======================= */
table.t .row-actions:has(.hr-ab),table.t .row-actions:has(.hr-pay){display:flex; align-items:center; justify-content:flex-end; gap:8px; flex-wrap:nowrap}
table.t [data-act].act-btn.hr-ab,table.t [data-act].act-btn.hr-pay,.mcard-act [data-act].act-btn.hr-ab,.mcard-act [data-act].act-btn.hr-pay{
  height:36px!important; border-radius:11px!important; border:1px solid rgba(201,161,94,.18)!important; color:#fff!important;
  background:linear-gradient(180deg,#145236,#0c2219)!important;
  box-shadow:0 1px 0 rgba(255,255,255,.08) inset,0 6px 14px -8px rgba(0,0,0,.8)!important;
  display:inline-flex!important; align-items:center; justify-content:center; flex:none; transition:background .15s,transform .12s,box-shadow .15s,border-color .15s}
table.t [data-act].act-btn.hr-ab{width:36px!important; padding:0!important}
table.t [data-act].act-btn.hr-ab svg.i,.mcard-act [data-act].act-btn.hr-ab svg.i{width:17px!important; height:17px!important; color:#fff!important; stroke-width:1.9; transition:color .15s}
table.t [data-act].act-btn.hr-ab:hover,.mcard-act [data-act].act-btn.hr-ab:hover{border-color:rgba(201,161,94,.6)!important; transform:translateY(-1px); box-shadow:0 1px 0 rgba(255,255,255,.1) inset,0 10px 18px -10px rgba(0,0,0,.85)!important}
table.t [data-act].act-btn.hr-ab:hover svg.i,.mcard-act [data-act].act-btn.hr-ab:hover svg.i{color:#e3c38b!important}
table.t .act-btn.hr-ab .ab-l{display:none!important}
/* إلغاء الصرف: نفس شكل زرار الحذف في السيستم */
table.t [data-act].act-btn.hr-ab.danger,.mcard-act [data-act].act-btn.hr-ab.danger{background:#fff!important; border:1px solid rgba(192,71,58,.35)!important; box-shadow:none!important}
table.t [data-act].act-btn.hr-ab.danger svg.i,.mcard-act [data-act].act-btn.hr-ab.danger svg.i{color:#c0473a!important}
table.t [data-act].act-btn.hr-ab.danger:hover,.mcard-act [data-act].act-btn.hr-ab.danger:hover{background:#c0473a!important; border-color:#c0473a!important}
table.t [data-act].act-btn.hr-ab.danger:hover svg.i,.mcard-act [data-act].act-btn.hr-ab.danger:hover svg.i{color:#fff!important}
/* صرف: نفس الغامق + كلمة «صرف» وأيقونة دهبي — أعرض شوية عشان يبان إنه الإجراء الأساسي */
table.t [data-act].act-btn.hr-pay,.mcard-act [data-act].act-btn.hr-pay{width:auto!important; min-width:84px; padding:0 14px!important; gap:7px!important; font-size:13px!important; font-weight:700!important; white-space:nowrap; border-color:rgba(201,161,94,.45)!important}
table.t [data-act].act-btn.hr-pay svg.i,.mcard-act [data-act].act-btn.hr-pay svg.i{width:17px!important; height:17px!important; color:#e3c38b!important}
table.t [data-act].act-btn.hr-pay span,.mcard-act [data-act].act-btn.hr-pay span{display:inline!important; color:#fff; line-height:1}
table.t [data-act].act-btn.hr-pay:hover,.mcard-act [data-act].act-btn.hr-pay:hover{background:linear-gradient(180deg,#c9a15e,#9c7540)!important; border-color:#c9a15e!important; transform:translateY(-1px)}
table.t [data-act].act-btn.hr-pay:hover svg.i,.mcard-act [data-act].act-btn.hr-pay:hover svg.i{color:#fff!important}

/* ======================= صفحة الإعدادات ======================= */
.st-wrap{display:grid; grid-template-columns:240px minmax(0,1fr); gap:18px; align-items:start}
.st-nav{position:sticky; top:88px; display:flex; flex-direction:column; gap:4px; padding:10px; background:#fff; border:1px solid var(--border); border-radius:18px; box-shadow:0 10px 26px -22px rgba(9,51,33,.5)}
.st-nav a{display:flex; align-items:center; gap:10px; padding:11px 12px; border-radius:12px; color:var(--text-2); font-weight:600; font-size:13.5px; text-decoration:none; transition:background .15s,color .15s}
.st-nav a svg{width:18px; height:18px; color:#9a7b5c; flex:none}
.st-nav a:hover{background:var(--rv-cream,#fbf6ee); color:var(--rv-dark,#0e4a30)}
.st-nav a.on{background:linear-gradient(180deg,#145236,#0c2219); color:#fff} .st-nav a.on svg{color:#e3c38b}
.st-main{display:flex; flex-direction:column; gap:16px; min-width:0}
.st-card{background:#fff; border:1px solid var(--border); border-radius:20px; box-shadow:0 12px 30px -26px rgba(9,51,33,.55); overflow:hidden; scroll-margin-top:90px}
.st-hd{display:flex; align-items:center; gap:12px; padding:16px 20px; border-bottom:1px solid #f1eae0; background:linear-gradient(180deg,#fffdfa,#fbf7f1)}
.st-hd h3{margin:0; font-size:16px; color:var(--rv-dark,#0e4a30)} .st-hd p{margin:2px 0 0; font-size:12px; color:var(--text-3)}
.st-hd > div{flex:1; min-width:0} .st-hd .st-link{flex:none}
.st-ico{width:40px; height:40px; border-radius:12px; display:grid; place-items:center; flex:none; background:linear-gradient(180deg,#145236,#0c2219); color:#e3c38b; box-shadow:0 6px 14px -8px rgba(0,0,0,.7)}
.st-ico svg{width:19px; height:19px}
.st-bd{padding:18px 20px 20px}
.st-bd .form-grid{margin:0}
.st-savebar{position:fixed; bottom:18px; left:50%; transform:translateX(-50%); z-index:40; display:flex; align-items:center; gap:16px; padding:10px 12px 10px 18px; border-radius:16px;
  background:linear-gradient(180deg,#145236,#0c2219); color:#f7efe3; box-shadow:0 18px 40px -16px rgba(0,0,0,.7); font-size:13px; animation:stUp .25s ease}
.st-savebar span{display:flex; align-items:center; gap:7px} .st-savebar svg{width:16px; height:16px; color:#e3c38b}
.st-savebar[hidden]{display:none}
@keyframes stUp{from{transform:translate(-50%,16px); opacity:0}to{transform:translate(-50%,0); opacity:1}}
@media (max-width:900px){ .st-wrap{grid-template-columns:1fr} .st-nav{position:static; flex-direction:row; overflow-x:auto; padding:6px; gap:4px; scrollbar-width:none} .st-nav a{white-space:nowrap; padding:9px 12px} .st-hd{flex-wrap:wrap} .st-bd{padding:14px} .st-savebar{left:12px; right:12px; transform:none; justify-content:space-between} @keyframes stUp{from{opacity:0}to{opacity:1}} }

/* قواعد عمولة المندوبين */
.cr-q{margin:18px 0 10px; font-size:14px; color:var(--rv-dark,#0e4a30)}
.cr-modes{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px}
.cr-m{display:flex; flex-direction:column; align-items:flex-start; gap:4px; text-align:start; padding:14px; border:1.5px solid var(--border); border-radius:16px; background:#fff; font:inherit; cursor:pointer; transition:border-color .15s,box-shadow .15s,transform .1s}
.cr-m:hover{border-color:#d9c9b1; transform:translateY(-1px)}
.cr-m.on{border-color:var(--rv-gold,#c9a15e); background:var(--rv-cream,#fbf6ee); box-shadow:0 0 0 3px #f6ead5}
.cr-m b{font-size:14px; color:var(--rv-dark,#0e4a30)} .cr-m small{font-size:12px; color:var(--text-2); line-height:1.5}
.cr-i{width:32px; height:32px; border-radius:10px; display:grid; place-items:center; background:#f3ece2; color:#17734b; margin-bottom:4px} .cr-i svg{width:16px; height:16px}
.cr-m.on .cr-i{background:linear-gradient(180deg,#145236,#0c2219); color:#e3c38b}
.cr-red{margin-top:12px!important}
.cr-ex{margin-top:16px; border:1px dashed #e1d3bf; border-radius:16px; padding:12px 14px; background:#fffdf9}
.cr-ex-t{display:flex; align-items:center; gap:7px; font-size:12.5px; color:var(--text-2); font-weight:600; margin-bottom:10px} .cr-ex-t svg{width:15px; height:15px; color:#c9a15e}
.cr-ex-g{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px}
.cr-ex-g > div{display:flex; flex-direction:column; gap:2px; padding:10px; border-radius:12px; background:#fff; border:1px solid #f0e6d8}
.cr-ex-g span{font-size:12px; color:var(--text-3)} .cr-ex-g > div > b{font-size:18px; color:var(--rv-dark,#0e4a30)} .cr-ex-g small{font-size:11px; color:var(--text-3)}
.cr-note{display:flex; gap:7px; align-items:flex-start; margin:14px 0 0; font-size:12px; color:var(--text-3); line-height:1.6} .cr-note svg{width:15px; height:15px; flex:none; margin-top:2px; color:#c9a15e}
@media (max-width:700px){ .cr-modes{grid-template-columns:1fr} .cr-ex-g{grid-template-columns:repeat(2,minmax(0,1fr))} }

/* خطط عمولة الموظفين */
.sp-empty{display:flex; flex-direction:column; align-items:center; gap:6px; padding:26px; text-align:center; border:1.5px dashed #e1d3bf; border-radius:16px; color:var(--text-3)}
.sp-empty svg{width:28px; height:28px; color:#c9a15e} .sp-empty b{color:var(--rv-dark,#0e4a30)}
.sp{border:1px solid #eadfce; border-radius:18px; padding:14px; background:#fffdfa} .sp + .sp{margin-top:14px} .sp.off{opacity:.6}
.sp-hd{display:flex; align-items:center; gap:10px; flex-wrap:wrap}
.sp-name{flex:1; min-width:200px; font-weight:700; font-size:15px}
.sp-rate{display:flex; align-items:center; gap:6px} .sp-rate .inp{width:90px; text-align:center; font-weight:700; font-size:16px} .sp-rate span{font-weight:800; color:#17734b}
.sp-on{display:flex; align-items:center; gap:6px; font-size:13px; color:var(--text-2); white-space:nowrap} .sp-on input{width:17px; height:17px; accent-color:var(--rv-dark,#0e4a30)}
.sp-del svg{color:#c0473a}
.sp-sum{display:flex; gap:7px; align-items:flex-start; margin:12px 0; padding:10px 12px; border-radius:12px; background:#f7efe3; font-size:12.5px; color:#216547; line-height:1.7} .sp-sum svg{width:15px; height:15px; flex:none; margin-top:3px; color:#17734b}
.sp-cols{display:grid; grid-template-columns:minmax(0,1fr) minmax(0,2fr); gap:12px}
.sp-col{border:1px solid #eee4d6; border-radius:14px; background:#fff; overflow:hidden; display:flex; flex-direction:column}
.sp-ct{display:flex; align-items:center; gap:8px; padding:10px; border-bottom:1px solid #f1eae0; flex-wrap:wrap}
.sp-ct b{display:flex; align-items:center; gap:6px; font-size:13px; color:var(--rv-dark,#0e4a30); margin-inline-end:auto} .sp-ct b svg{width:15px; height:15px; color:#17734b}
.sp-ct em{font-style:normal; font-size:11px; padding:1px 8px; border-radius:999px; background:var(--rv-dark,#0e4a30); color:#e3c38b}
.sp-ct .inp.sm{width:150px; height:32px}
.sp-list{max-height:260px; overflow:auto; padding:6px; display:flex; flex-direction:column; gap:2px} .sp-list.grid2{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-content:start}
.sp-it{display:flex; align-items:center; gap:8px; padding:7px 9px; border-radius:10px; cursor:pointer; font-size:13px; color:var(--text-2)} .sp-it:hover{background:#faf5ee}
.sp-it input{width:16px; height:16px; accent-color:var(--rv-dark,#0e4a30); flex:none} .sp-it.on{background:#f7efe3; color:var(--rv-dark,#0e4a30); font-weight:600}
.sp-it span{overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
@media (max-width:800px){ .sp-cols{grid-template-columns:1fr} .sp-list.grid2{grid-template-columns:1fr} .sp-ct .inp.sm{width:100%} }

/* ======================= المستخدمين والصلاحيات ======================= */
.us-stats{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:14px}
.us-st{display:grid; grid-template-columns:auto 1fr; grid-template-rows:auto auto; column-gap:12px; align-items:center; text-align:start; padding:14px 16px; border:1px solid var(--border); border-radius:18px; background:#fff; font:inherit; cursor:pointer; transition:border-color .15s,box-shadow .15s,transform .1s}
.us-st:hover{transform:translateY(-1px); border-color:#d9c9b1}
.us-st.on{border-color:var(--rv-gold,#c9a15e); box-shadow:0 0 0 3px #f6ead5}
.us-si{grid-row:span 2; width:42px; height:42px; border-radius:13px; display:grid; place-items:center; background:linear-gradient(180deg,#145236,#0c2219); color:#e3c38b} .us-si svg{width:19px; height:19px}
.us-st b{font-size:22px; line-height:1.1; color:var(--rv-dark,#0e4a30)} .us-st small{font-size:12px; color:var(--text-3)}
.us-bar{display:flex; gap:12px; align-items:center; flex-wrap:wrap; margin-bottom:14px; padding:10px; background:#fff; border:1px solid var(--border); border-radius:18px}
.us-search{position:relative; flex:1; min-width:220px} .us-search svg{position:absolute; top:50%; right:12px; transform:translateY(-50%); width:17px; height:17px; color:var(--text-3)} .us-search .inp{padding-right:38px; width:100%}
.us-chips{display:flex; gap:6px; flex-wrap:wrap}
.us-chip{display:inline-flex; align-items:center; gap:6px; height:36px; padding:0 12px; border-radius:11px; border:1px solid var(--border); background:#fff; font:inherit; font-size:13px; font-weight:600; color:var(--text-2); cursor:pointer}
.us-chip svg{width:15px; height:15px; color:#9a7b5c} .us-chip em{font-style:normal; font-size:11px; padding:0 7px; border-radius:999px; background:#f3ece2; color:#2e7254}
.us-chip.on{background:linear-gradient(180deg,#145236,#0c2219); border-color:transparent; color:#fff} .us-chip.on svg{color:#e3c38b} .us-chip.on em{background:rgba(255,255,255,.14); color:#f3dfbd}
.us-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(320px,1fr)); gap:14px}
.uc{display:flex; flex-direction:column; background:#fff; border:1px solid var(--border); border-radius:20px; box-shadow:0 12px 28px -24px rgba(9,51,33,.55); overflow:hidden; transition:box-shadow .15s,transform .12s}
.uc:hover{box-shadow:0 18px 34px -22px rgba(9,51,33,.55)}
.uc.off{background:#fbfaf8} .uc.off .uc-top,.uc.off .uc-role,.uc.off .uc-meta{opacity:.62}
.uc-top{display:flex; align-items:center; gap:12px; padding:16px 16px 10px}
.uc-av{position:relative; width:48px; height:48px; border-radius:15px; display:grid; place-items:center; flex:none; font-weight:800; font-size:17px; color:#fff; background:linear-gradient(180deg,#2e7254,#145236)}
.uc-av.t-ad{background:linear-gradient(180deg,#c9a15e,#9c7540)} .uc-av.t-rp{background:linear-gradient(180deg,#d9963a,#a8661c)} .uc-av.t-ac{background:linear-gradient(180deg,#2fae6f,#207f56)} .uc-av.t-sv{background:linear-gradient(180deg,#64afa5,#42847b)} .uc-av.t-cu{background:linear-gradient(180deg,#5e7c6d,#2f6d52)}
.uc-live{position:absolute; bottom:-2px; left:-2px; width:13px; height:13px; border-radius:50%; background:#22b35e; border:2.5px solid #fff}
.uc-id{flex:1; min-width:0; display:flex; flex-direction:column; gap:2px}
.uc-id b{font-size:15.5px; color:var(--rv-dark,#0e4a30); overflow:hidden; text-overflow:ellipsis; white-space:nowrap} .uc-id > span{font-size:13px; color:var(--text-3); text-align:start}
.uc-me{font-size:10.5px; font-weight:700; padding:1px 7px; border-radius:999px; background:#f3ece2; color:#17734b; vertical-align:middle}
.uc-sw{position:relative; flex:none; cursor:pointer} .uc-sw input{position:absolute; opacity:0; width:0; height:0}
.uc-sw i{display:block; width:42px; height:24px; border-radius:999px; background:#d9d0c6; transition:background .15s; position:relative}
.uc-sw i::after{content:''; position:absolute; top:3px; right:3px; width:18px; height:18px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.25); transition:transform .15s}
.uc-sw input:checked + i{background:#22a35a} .uc-sw input:checked + i::after{transform:translateX(-18px)}
.uc-role{display:flex; align-items:center; gap:7px; flex-wrap:wrap; margin:0 16px; padding:8px 11px; border-radius:12px; background:#f7f2ec; font-size:13px; color:#216547}
.uc-role svg{width:15px; height:15px} .uc-role b{font-weight:700}
.uc-role.t-ad{background:#f8efdf; color:#1f7b53} .uc-role.t-rp{background:#fbf0e0; color:#8a5214} .uc-role.t-ac{background:#e9f6ef; color:#197c51} .uc-role.t-sv{background:#ecf8f7; color:#3d8178}
.uc-tag{font-size:10.5px; font-weight:700; padding:1px 8px; border-radius:999px; background:rgba(0,0,0,.06)} .uc-tag.gold{background:#0e4a30; color:#e3c38b}
.uc-meta{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; padding:12px 16px}
.uc-meta div{display:flex; flex-direction:column; gap:2px; min-width:0} .uc-meta small{font-size:11px; color:var(--text-3)}
.uc-meta b{font-size:13px; color:var(--rv-dark,#0e4a30); font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap} .uc-meta a{color:#17734b}
.uc-off{display:flex; align-items:center; gap:6px; margin:0 16px 10px; padding:7px 10px; border-radius:10px; background:#fdf0ee; color:#b0402f; font-size:12px; font-weight:600} .uc-off svg{width:14px; height:14px}
.uc-acts{display:flex; gap:6px; margin-top:auto; padding:10px 12px; border-top:1px solid #f1eae0; background:#fcfaf7}
.uc-b{flex:1; display:inline-flex; align-items:center; justify-content:center; gap:5px; height:36px; padding:0 8px; border-radius:11px; border:1px solid rgba(201,161,94,.2); font:inherit; font-size:12px; font-weight:700; color:#fff; cursor:pointer;
  background:linear-gradient(180deg,#145236,#0c2219); box-shadow:0 1px 0 rgba(255,255,255,.08) inset,0 6px 14px -9px rgba(0,0,0,.8); transition:transform .12s,border-color .15s; white-space:nowrap}
.uc-b svg{width:15px; height:15px; color:#e3c38b; flex:none} .uc-b:hover:not(:disabled){transform:translateY(-1px); border-color:rgba(201,161,94,.6)}
.uc-b.pri{background:linear-gradient(180deg,#d2b07a,#a8814a); color:#072a1b; border-color:transparent} .uc-b.pri svg{color:#072a1b}
.uc-b.del{flex:0 0 38px; padding:0; background:#fff; border:1px solid rgba(192,71,58,.35); box-shadow:none} .uc-b.del svg{color:#c0473a} .uc-b.del:hover{background:#c0473a} .uc-b.del:hover svg{color:#fff}
.uc-b:disabled{opacity:.4; cursor:not-allowed}
.us-empty{display:flex; flex-direction:column; align-items:center; gap:8px; padding:40px; color:var(--text-3); background:#fff; border:1.5px dashed #e1d3bf; border-radius:18px} .us-empty svg{width:28px; height:28px; color:#c9a15e}
@media (max-width:900px){ .us-stats{grid-template-columns:repeat(2,minmax(0,1fr))} .us-grid{grid-template-columns:1fr} }
@media (max-width:420px){ .uc-b span{display:none} .uc-b.pri span{display:inline} }

/* نافذة المستخدم */
.uf-sec + .uf-sec{margin-top:20px}
.uf-h{display:flex; align-items:center; gap:8px; font-weight:800; font-size:14.5px; color:var(--rv-dark,#0e4a30); margin-bottom:12px} .uf-h svg{width:17px; height:17px; color:#17734b}
.uf-hn{font-weight:500; font-size:12px; color:var(--text-3)}
.uf-roles{display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:10px}
.uf-role{display:flex; flex-direction:column; align-items:flex-start; gap:4px; text-align:start; padding:13px; border:1.5px solid var(--border); border-radius:16px; background:#fff; font:inherit; cursor:pointer; transition:border-color .15s,box-shadow .15s}
.uf-role:hover{border-color:#d9c9b1} .uf-role.on{border-color:var(--rv-gold,#c9a15e); background:var(--rv-cream,#fbf6ee); box-shadow:0 0 0 3px #f6ead5}
.uf-role b{font-size:14px; color:var(--rv-dark,#0e4a30)} .uf-role small{font-size:11.5px; color:var(--text-2); line-height:1.5}
.uf-ri{width:34px; height:34px; border-radius:11px; display:grid; place-items:center; background:#f3ece2; color:#17734b; margin-bottom:4px} .uf-ri svg{width:17px; height:17px}
.uf-role.on .uf-ri{background:linear-gradient(180deg,#145236,#0c2219); color:#e3c38b}
.uf-tg{display:flex; align-items:flex-start; gap:12px; padding:12px 14px; border:1px solid #eee4d6; border-radius:14px; background:#fffdfa; cursor:pointer}
.uf-tg + .uf-tg,.uf-tg + .uf-quick,.uf-perms + .uf-tg{margin-top:12px}
.uf-tg input{position:absolute; opacity:0; width:0; height:0}
.uf-tg > i{flex:none; position:relative; width:42px; height:24px; border-radius:999px; background:#d9d0c6; margin-top:1px; transition:background .15s}
.uf-tg > i::after{content:''; position:absolute; top:3px; right:3px; width:18px; height:18px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.25); transition:transform .15s}
.uf-tg input:checked + i{background:#22a35a} .uf-tg input:checked + i::after{transform:translateX(-18px)}
.uf-tg.gold input:checked + i{background:#a8814a}
.uf-tg span{display:flex; flex-direction:column; gap:2px} .uf-tg b{font-size:13.5px; color:var(--rv-dark,#0e4a30)} .uf-tg small{font-size:12px; color:var(--text-3); line-height:1.5}
.uf-quick{display:flex; align-items:center; gap:6px; flex-wrap:wrap; font-size:12px; color:var(--text-3)} .uf-quick[hidden]{display:none}
.uf-perms{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:12px}
.pg{border:1px solid #eee4d6; border-radius:16px; background:#fff; overflow:hidden}
.pg-h{display:flex; align-items:center; gap:7px; padding:9px 12px; background:#faf5ee; border-bottom:1px solid #f1eae0; font-size:13px; color:#216547} .pg-h svg{width:15px; height:15px; color:#17734b}
.pr{display:flex; align-items:center; justify-content:space-between; gap:10px; padding:8px 12px} .pr + .pr{border-top:1px solid #f6f0e8}
.pr > span{font-size:13px; color:var(--text); min-width:0}
.uf-perms .seg{display:inline-flex; flex:none; padding:3px; border-radius:11px; background:#f3ede5; gap:2px}
.uf-perms .seg button{height:28px; padding:0 10px; border:0; border-radius:8px; background:transparent; font:inherit; font-size:12px; font-weight:600; color:#5d7b6c; cursor:pointer; white-space:nowrap}
.uf-perms .seg button.on.s-none{background:#fff; color:#5d7b6c; box-shadow:0 1px 3px rgba(0,0,0,.12)}
.uf-perms .seg button.on.s-view{background:#fff; color:#3d8178; box-shadow:0 1px 3px rgba(0,0,0,.12)}
.uf-perms .seg button.on.s-edit{background:linear-gradient(180deg,#145236,#0c2219); color:#f3dfbd}
.uf-perms .seg.lock{opacity:.75} .uf-perms .seg.lock button{cursor:default}
@media (max-width:760px){ .uf-perms{grid-template-columns:1fr} .pr{flex-wrap:wrap} }

/* أزرار كارت المستخدم: صفين متساويين (كله باين) */
.uc-acts{display:grid!important; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px}
.uc-b{min-width:0; padding:0 6px}
.uc-b span{overflow:hidden; text-overflow:ellipsis}
.uc-b.del{flex:none; padding:0 6px; color:#c0473a} .uc-b.del span{color:#c0473a} .uc-b.del:hover span{color:#fff}
.uc-b.imp{background:linear-gradient(180deg,#64afa5,#42847b); border-color:transparent} .uc-b.imp svg{color:#fff}
@media (max-width:420px){ .uc-b span{display:inline!important; font-size:11px} .uc-b svg{display:none} }
/* شريط الدخول بحساب مستخدم */
.imp-bar{position:sticky; top:0; z-index:200; display:flex; align-items:center; gap:12px; padding:9px 16px; background:linear-gradient(90deg,#42847b,#326962); color:#fff; font-size:13.5px; box-shadow:0 6px 18px -10px rgba(0,0,0,.6)}
.imp-i{width:30px; height:30px; border-radius:10px; display:grid; place-items:center; background:rgba(255,255,255,.14); flex:none} .imp-i svg{width:16px; height:16px}
.imp-t{flex:1; min-width:0} .imp-t b{color:#ffe3a6} .imp-t small{opacity:.75}
.imp-x{display:inline-flex; align-items:center; gap:6px; height:34px; padding:0 14px; border:0; border-radius:10px; background:#fff; color:#326962; font:inherit; font-weight:800; cursor:pointer; white-space:nowrap; flex:none}
.imp-x svg{width:15px; height:15px}
@media (max-width:640px){ .imp-bar{flex-wrap:wrap; padding:8px 12px} .imp-t small{display:none} .imp-x{width:100%; justify-content:center} }

/* ======================= طباعة الفاتورة A4 / A5 ======================= */
.inv2 .iv-party{grid-template-columns:230px 1fr}
.inv2 .iv-t td b{font-weight:700} .inv2 .iv-t td small{color:#688376}
.inv2 .iv-t tbody tr:nth-child(even) td{background:#fdfbf8}
.inv2 .iv-sum{display:grid; grid-template-columns:1fr 290px; gap:14px; margin-top:14px; align-items:start; position:relative}
.inv2 .iv-nt{border:1px solid #eadfce; border-radius:12px; padding:9px 12px; font-size:12px; color:#33433b} .inv2 .iv-nt + .iv-nt{margin-top:8px}
.inv2 .iv-nt > small{display:block; color:#688376; font-size:10.5px; margin-bottom:3px}
.inv2 .iv-pp{display:flex; justify-content:space-between; gap:8px; padding:2px 0} .inv2 .iv-pp b{direction:ltr}
.inv2 .iv-tot td{padding:6px 12px}
.inv2 .iv-cont{margin-top:auto; text-align:left; color:#688376; font-size:11px; padding-top:10px}
.sz-a5 .inv2 .iv-party{grid-template-columns:150px 1fr}
.sz-a5 .inv2 .iv-t{font-size:10px} .sz-a5 .inv2 .iv-t th{padding:5px 7px; font-size:9.5px} .sz-a5 .inv2 .iv-t td{padding:4px 7px}
.sz-a5 .inv2 .iv-sum{grid-template-columns:1fr 200px; gap:8px; margin-top:8px} .sz-a5 .inv2 .iv-tot td{padding:3px 8px; font-size:10px} .sz-a5 .inv2 .iv-nt{font-size:9.5px; padding:6px 8px}
.sz-a5 .inv2 .s2-net{margin-top:8px; padding:9px 14px} .sz-a5 .inv2 .s2-net .amt .num{font-size:21px} .sz-a5 .inv2 .s2-words{font-size:10px}
.sz-a5 .inv2 .s2-sig{padding-top:14px; gap:30px; font-size:9.5px} .sz-a5 .inv2 .s2-sig span{height:22px} .sz-a5 .inv2 .s2-ft{font-size:8.5px; margin-top:8px}
/* إيصال 6 سم (مكنة الكاشير) */
.iv-rc .rc-title{margin:6px 0}
.iv-rc .rc-items{display:flex; flex-direction:column; gap:3px}
.iv-rc .ri{padding:2px 0; border-bottom:1px dotted #000} .iv-rc .ri:last-child{border-bottom:0}
.iv-rc .ri-n{font-weight:800; font-size:10.5px; line-height:1.3}
.iv-rc .ri-l{display:flex; justify-content:space-between; gap:6px; font-size:10px} .iv-rc .ri-l span{direction:rtl} .iv-rc .ri-l b{direction:ltr; font-weight:800; white-space:nowrap} .iv-rc .ri-l em{font-style:normal}

/* ======================= صفحة العميل ======================= */
.cu-hero{display:flex; align-items:center; gap:16px; flex-wrap:wrap; padding:18px 20px; margin-bottom:14px; background:#fff; border:1px solid var(--border); border-radius:22px; box-shadow:0 12px 30px -26px rgba(9,51,33,.55)}
.cu-hero.off{background:#fbfaf8}
.cu-av{width:64px; height:64px; border-radius:20px; display:grid; place-items:center; flex:none; font-size:26px; font-weight:800; color:#fff; background:linear-gradient(180deg,#c9a15e,#9c7540); box-shadow:0 10px 20px -12px rgba(36,145,98,.9)}
.cu-id{flex:1; min-width:220px}
.cu-nm{display:flex; align-items:center; gap:10px; flex-wrap:wrap} .cu-nm b{font-size:21px; color:var(--rv-dark,#0e4a30)}
.cu-type{font-size:12px; font-weight:700; padding:3px 10px; border-radius:999px; background:#f3ece2; color:#17734b} .cu-type.off{background:#fdf0ee; color:#c0473a}
.cu-sub{display:flex; flex-wrap:wrap; gap:6px 16px; margin-top:6px; font-size:13px; color:var(--text-2)} .cu-sub span{display:inline-flex; align-items:center; gap:5px} .cu-sub svg{width:14px; height:14px; color:#9a7b5c}
.cu-ct{display:flex; gap:8px; flex-wrap:wrap}
.cu-cb{display:inline-flex; align-items:center; gap:7px; height:40px; padding:0 14px; border-radius:12px; text-decoration:none; font-weight:700; font-size:13px; color:#fff; background:linear-gradient(180deg,#145236,#0c2219)}
.cu-cb svg{width:16px; height:16px; color:#e3c38b} .cu-cb.wa{background:linear-gradient(180deg,#2fae6f,#207f56)} .cu-cb.wa svg{color:#fff}
.cu-kpis{display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:10px; margin-bottom:14px}
.cu-k{display:flex; gap:10px; align-items:flex-start; padding:14px; background:#fff; border:1px solid var(--border); border-radius:18px; min-width:0; position:relative; overflow:hidden}
.cu-k::before{content:''; position:absolute; inset:0 0 auto 0; height:3px; background:#c9a15e}
.cu-k.t-ok::before{background:#22a35a} .cu-k.t-bad::before{background:#c8323a} .cu-k.t-warn::before{background:#e0a02c} .cu-k.t-info::before{background:#64afa5} .cu-k.t-gray::before{background:#b9ada0}
.cu-ki{width:36px; height:36px; border-radius:11px; display:grid; place-items:center; flex:none; background:#f3ece2; color:#17734b} .cu-ki svg{width:17px; height:17px}
.cu-k.t-ok .cu-ki{background:#e9f6ef; color:#197c51} .cu-k.t-bad .cu-ki{background:#fdecec; color:#c8323a} .cu-k.t-warn .cu-ki{background:#fdf3e1; color:#a8661c} .cu-k.t-info .cu-ki{background:#ecf8f7; color:#3d8178}
.cu-k > div{min-width:0} .cu-k small{display:block; font-size:11.5px; color:var(--text-3)} .cu-k b{display:block; font-size:18px; color:var(--rv-dark,#0e4a30); font-variant-numeric:tabular-nums; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.cu-k.t-bad b{color:#c8323a} .cu-k em{display:block; font-style:normal; font-size:11px; color:var(--text-3); margin-top:2px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.cu-tabs{display:flex; gap:4px; padding:5px; margin-bottom:14px; background:#fff; border:1px solid var(--border); border-radius:16px; overflow-x:auto; scrollbar-width:none}
.cu-tabs a{display:inline-flex; align-items:center; gap:7px; padding:10px 14px; border-radius:12px; text-decoration:none; color:var(--text-2); font-weight:700; font-size:13.5px; white-space:nowrap}
.cu-tabs a svg{width:16px; height:16px; color:#9a7b5c} .cu-tabs a i{font-style:normal; font-size:11px; padding:0 7px; border-radius:999px; background:#f3ece2; color:#2e7254}
.cu-tabs a:hover{background:#faf5ee} .cu-tabs a.on{background:linear-gradient(180deg,#145236,#0c2219); color:#fff} .cu-tabs a.on svg{color:#e3c38b} .cu-tabs a.on i{background:rgba(255,255,255,.14); color:#f3dfbd}
.cu-grid{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px} .cu-card.wide{grid-column:1/-1}
.cu-card{border-radius:20px; overflow:hidden}
.cu-ch{display:flex; align-items:center; gap:8px; padding:14px 16px; border-bottom:1px solid #f1eae0} .cu-ch > svg{width:17px; height:17px; color:#17734b} .cu-ch b{font-size:14.5px; color:var(--rv-dark,#0e4a30); margin-inline-end:auto}
.cu-chn{font-weight:800; color:#c8323a}
.cu-lg{display:flex; align-items:center; gap:6px; font-size:11.5px; color:var(--text-3)} .cu-lg i{width:10px; height:10px; border-radius:3px; display:inline-block} .cu-lg i.s,.cu-bb i.s{background:linear-gradient(180deg,#c9a15e,#9c7540)} .cu-lg i.c,.cu-bb i.c{background:linear-gradient(180deg,#38c07d,#207f56)}
.cu-bars{display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:10px; padding:16px; align-items:end}
.cu-bar{display:flex; flex-direction:column; align-items:center; gap:4px} .cu-bar b{font-size:11.5px; color:var(--rv-dark,#0e4a30)} .cu-bar small{font-size:11px; color:var(--text-3)}
.cu-bb{height:140px; width:100%; display:flex; align-items:flex-end; justify-content:center; gap:4px; border-bottom:1px solid #eadfce}
.cu-bb i{display:block; width:34%; max-width:22px; min-height:2px; border-radius:6px 6px 0 0}
.cu-top{padding:8px 12px 12px; display:flex; flex-direction:column; gap:6px}
.cu-tp{position:relative; display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:12px; overflow:hidden}
.cu-tp > i{position:absolute; inset:0 0 0 auto; background:#f7efe3; z-index:0; border-radius:12px} .cu-tp > *:not(i){position:relative; z-index:1}
.cu-tn{width:24px; height:24px; border-radius:8px; display:grid; place-items:center; background:#0e4a30; color:#e3c38b; font-size:11px; font-weight:800; flex:none}
.cu-tp div{flex:1; min-width:0} .cu-tp div b{display:block; font-size:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap} .cu-tp div small{font-size:11px; color:var(--text-3)}
.cu-tp em{font-style:normal; font-weight:800; font-size:13px; color:var(--rv-dark,#0e4a30)}
.cu-empty{padding:26px; text-align:center; color:var(--text-3); font-size:13px} .cu-empty.ok{display:flex; justify-content:center; align-items:center; gap:7px; color:#197c51; font-weight:700} .cu-empty svg{width:17px; height:17px}
.cu-st{display:inline-block; font-size:11.5px; font-weight:700; padding:3px 10px; border-radius:999px; white-space:nowrap}
.cu-st.s-ok{background:#e9f6ef; color:#197c51} .cu-st.s-due{background:#fdecec; color:#c8323a} .cu-st.s-part{background:#fdf3e1; color:#a8661c} .cu-st.s-ret{background:#f1ede8; color:#398564}
.cu-prices{padding:6px 14px} .cu-prices > div{display:grid; grid-template-columns:1fr auto auto; gap:12px; align-items:center; padding:8px 0; border-bottom:1px solid #f6f0e8; font-size:13px}
.cu-prices small{color:var(--text-3); text-decoration:line-through} .cu-prices b{color:#197c51}
.cu-facts{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; padding:14px} .cu-facts > div{padding:10px 12px; border:1px solid #f1eae0; border-radius:12px} .cu-facts small{display:block; font-size:11px; color:var(--text-3)} .cu-facts b{font-size:13px}
@media (max-width:1200px){ .cu-kpis{grid-template-columns:repeat(3,minmax(0,1fr))} }
@media (max-width:760px){ .cu-kpis{grid-template-columns:repeat(2,minmax(0,1fr))} .cu-grid{grid-template-columns:1fr} .cu-hero{padding:14px} .cu-ct{width:100%} .cu-cb{flex:1; justify-content:center} .cu-bb{height:100px} }

/* ======================= العربيات + خزن المندوبين ======================= */
.fx-chip{display:inline-flex; align-items:center; gap:5px; font-size:12px; font-weight:700; padding:3px 9px; border-radius:999px; background:#f3ece2; color:#2e7254; white-space:nowrap}
.fx-chip svg{width:13px; height:13px}
.fx-chip.t-fu{background:#fdf3e1; color:#a8661c} .fx-chip.t-mt{background:#ecf8f7; color:#3d8178} .fx-chip.t-oi{background:#f8edf2; color:#904b6b} .fx-chip.t-ti{background:#eef2f2; color:#3f5f5f}
.fx-chip.t-li{background:#e9f6ef; color:#197c51} .fx-chip.t-fi{background:#fdecec; color:#c8323a} .fx-chip.t-wa{background:#eaf9f7; color:#2a8075}
.fx-types{display:grid; grid-template-columns:repeat(auto-fill,minmax(110px,1fr)); gap:8px}
.fx-t{display:flex; flex-direction:column; align-items:center; gap:5px; padding:11px 6px; border:1.5px solid var(--border); border-radius:14px; background:#fff; font:inherit; font-size:12.5px; font-weight:700; color:var(--text-2); cursor:pointer}
.fx-t svg{width:19px; height:19px; color:#9a7b5c} .fx-t:hover{border-color:#d9c9b1}
.fx-t.on{border-color:var(--rv-gold,#c9a15e); background:var(--rv-cream,#fbf6ee); color:var(--rv-dark,#0e4a30); box-shadow:0 0 0 3px #f6ead5} .fx-t.on svg{color:#17734b}
/* خزنة المندوب */
.cx-top{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)) auto; gap:10px; align-items:stretch}
.cx-k{padding:12px 14px; border:1px solid #eee4d6; border-radius:16px; background:#fff} .cx-k small{display:block; font-size:11.5px; color:var(--text-3)}
.cx-k b{font-size:22px; color:var(--rv-dark,#0e4a30)} .cx-k em{display:block; font-style:normal; font-size:11px; color:var(--text-3)}
.cx-k.cx-main{background:linear-gradient(135deg,#0e4a30,#135438); border-color:transparent} .cx-k.cx-main small,.cx-k.cx-main em{color:#d9c4a3} .cx-k.cx-main b{color:#e3c48d}
.cx-k.ok b{color:#197c51}
.cx-acts{display:flex; flex-direction:column; gap:8px; justify-content:center}
.cx-veh{display:flex; align-items:center; gap:8px; margin-top:12px; padding:9px 12px; border-radius:12px; background:#faf5ee; font-size:13px; color:#216547} .cx-veh svg{width:16px; height:16px; color:#17734b}
.cx-veh span{flex:1} .cx-veh a{display:inline-flex; align-items:center; gap:4px; color:#17734b; font-weight:700; text-decoration:none} .cx-veh a svg{width:14px; height:14px}
.cx-sec{display:flex; align-items:center; gap:7px; margin:18px 0 8px; font-weight:800; font-size:13.5px; color:var(--rv-dark,#0e4a30)} .cx-sec svg{width:16px; height:16px; color:#17734b} .cx-sec small{font-weight:500; color:var(--text-3); font-size:11.5px}
.cx-list{display:flex; flex-direction:column; gap:6px}
.cx-it{display:flex; align-items:center; gap:10px; padding:9px 12px; border:1px solid #f0e6d8; border-radius:12px; background:#fff}
.cx-it > div{flex:1; min-width:0} .cx-it b{font-size:15px} .cx-it small{display:block; font-size:11.5px; color:var(--text-3)}
.cx-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:14px}
.cxc{background:#fff; border:1px solid var(--border); border-radius:20px; overflow:hidden; display:flex; flex-direction:column; box-shadow:0 12px 28px -24px rgba(9,51,33,.55)}
.cxc-h{display:flex; align-items:center; gap:10px; padding:14px 14px 8px} .cxc-h b{display:block; font-size:15px} .cxc-h small{font-size:12px; color:var(--text-3)}
.cxc-g{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; padding:8px 14px 12px}
.cxc-g > div{padding:9px 10px; border-radius:12px; background:#faf6f0} .cxc-g small{display:block; font-size:11px; color:var(--text-3)} .cxc-g b{font-size:15px} .cxc-g em{font-style:normal; font-size:11px; color:var(--text-3); margin-inline-start:4px}
.cxc-g > .ok{background:#e9f6ef} .cxc-g > .ok b{color:#197c51}
.cxc-a{display:flex; gap:8px; margin-top:auto; padding:10px 14px; border-top:1px solid #f1eae0; background:#fcfaf7} .cxc-a .btn{flex:1; justify-content:center}
/* التسوية */
.st-calc{display:grid; grid-template-columns:1fr auto 1fr auto 1fr; gap:10px; align-items:center}
.st-calc > div{padding:12px; border:1px solid #eee4d6; border-radius:14px; background:#fff; text-align:center} .st-calc small{display:block; font-size:11.5px; color:var(--text-3)} .st-calc b{font-size:20px} .st-calc em{display:block; font-style:normal; font-size:11px; color:var(--text-3)}
.st-calc .op{font-size:22px; font-weight:800; color:#b9ada0} .st-calc .hl{background:linear-gradient(135deg,#0e4a30,#135438); border-color:transparent} .st-calc .hl small,.st-calc .hl em{color:#d9c4a3} .st-calc .hl b{color:#e3c48d}
.se-list{display:flex; flex-direction:column; gap:6px; max-height:260px; overflow:auto}
.se-it{display:flex; align-items:center; gap:10px; padding:9px 12px; border:1px solid #f0e6d8; border-radius:12px; cursor:pointer} .se-it input{width:18px; height:18px; accent-color:#197c51}
.se-it.off{opacity:.5; background:#fbf7f3} .se-it.off .se-i b{text-decoration:line-through}
.se-i{display:flex; align-items:center; gap:8px; min-width:170px} .se-i b{font-size:15px} .se-m{font-size:12px; color:var(--text-3)}
.se-left{margin-top:12px; font-size:13px} .se-left > span{display:flex; align-items:center; gap:7px; padding:10px 12px; border-radius:12px} .se-left svg{width:16px; height:16px}
.se-left .ok{background:#e9f6ef; color:#197c51} .se-left .warn{background:#fdf3e1; color:#8a5214} .se-left .bad{background:#fdecec; color:#c8323a}
/* العربيات */
.vh-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(320px,1fr)); gap:14px}
.vh{display:flex; flex-direction:column; gap:10px; padding:16px; background:#fff; border:1px solid var(--border); border-radius:20px; box-shadow:0 12px 28px -24px rgba(9,51,33,.55)}
.vh.off{background:#fbfaf8} .vh.off > *:not(.vh-a){opacity:.6}
.vh-h{display:flex; align-items:center; gap:12px} .vh-h > div{flex:1; min-width:0} .vh-h b{display:block; font-size:16px; color:var(--rv-dark,#0e4a30)} .vh-h small{font-size:12px; color:var(--text-3)}
.vh-ic{width:46px; height:46px; border-radius:14px; display:grid; place-items:center; flex:none; background:linear-gradient(180deg,#145236,#0c2219); color:#e3c38b} .vh-ic svg{width:22px; height:22px}
.vh-plate{display:inline-block; padding:1px 8px; border:1.5px solid #0e4a30; border-radius:6px; font-weight:800; color:#0e4a30; background:#fffdf5; letter-spacing:.5px}
.vh-drv{display:flex; align-items:center; gap:6px; flex-wrap:wrap; font-size:13px; color:var(--text-2)} .vh-drv svg{width:15px; height:15px; color:#9a7b5c} .vh-drv .sep{color:#d0c4b6}
.vh-w{display:inline-flex; align-items:center; gap:6px; align-self:flex-start; padding:4px 10px; border-radius:999px; background:#fdf3e1; color:#8a5214; font-size:12px; font-weight:700} .vh-w svg{width:14px; height:14px} .vh-w.bad{background:#fdecec; color:#c8323a}
.vh-g{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px}
.vh-g > div{padding:8px; border-radius:12px; background:#faf6f0; min-width:0} .vh-g small{display:block; font-size:10.5px; color:var(--text-3)} .vh-g b{font-size:13.5px}
.vh-g .tot{background:#0e4a30} .vh-g .tot small{color:#d9c4a3} .vh-g .tot b{color:#e3c48d}
.vh-a{display:flex; gap:8px; margin-top:auto} .vh-a .btn:not(.icon){flex:1; justify-content:center}
.vh-new{align-items:center; justify-content:center; text-align:center; border-style:dashed; cursor:pointer; font:inherit; min-height:220px} .vh-new small{color:var(--text-3); font-size:12px}
.vh-av svg{width:28px; height:28px; color:#fff}
@media (max-width:900px){ .cx-top{grid-template-columns:repeat(2,minmax(0,1fr))} .cx-acts{grid-column:1/-1; flex-direction:row} .cx-acts .btn{flex:1; justify-content:center} .st-calc{grid-template-columns:1fr} .st-calc .op{display:none} .vh-g{grid-template-columns:repeat(2,minmax(0,1fr))} }

/* ======================= العمولات والتارجت ======================= */
.cm-bar{display:flex; align-items:stretch; gap:8px; flex-wrap:wrap; margin-bottom:14px}
.cm-month{display:flex; align-items:center; gap:10px; padding:8px 14px; border:1.5px solid var(--border); border-radius:14px; background:#fff}
.cm-month small{font-size:11.5px; color:var(--text-3)} .cm-month b{font-size:16px; color:var(--rv-dark,#0e4a30)} .cm-month .inp{width:150px}
.cm-rule{flex:1; min-width:260px; display:flex; align-items:center; gap:10px; padding:10px 14px; border-radius:14px; background:linear-gradient(135deg,#0e4a30,#135438); color:#f3e6d3; font-size:13px}
.cm-rule svg{width:18px; height:18px; color:#e3c38b; flex:none} .cm-rule b{color:#e3c48d}
.cm-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(360px,1fr)); gap:14px}
.cm-card{display:flex; flex-direction:column; gap:12px; padding:16px; background:#fff; border:1px solid var(--border); border-radius:22px; box-shadow:0 12px 28px -24px rgba(9,51,33,.55)}
.cm-h{display:flex; align-items:center; gap:12px} .cm-id{flex:1; min-width:0} .cm-id > b{display:block; font-size:16.5px; color:var(--rv-dark,#0e4a30)}
.cm-tags{display:flex; gap:6px; flex-wrap:wrap; margin-top:4px}
.cm-ring{--p:0; width:68px; height:68px; border-radius:50%; flex:none; display:grid; place-content:center; text-align:center; position:relative;
  background:conic-gradient(var(--rc,#c8323a) calc(var(--p) * 1%), #f1ebe2 0)}
.cm-ring::before{content:''; position:absolute; inset:7px; border-radius:50%; background:#fff}
.cm-ring > *{position:relative} .cm-ring b{font-size:15px; line-height:1; color:var(--rv-dark,#0e4a30)} .cm-ring small{font-size:9.5px; color:var(--text-3)}
.cm-ring.ok{--rc:#22a35a} .cm-ring.mid{--rc:#e0a02c} .cm-ring.low{--rc:#c8323a}
.cm-lines{display:flex; flex-direction:column; gap:10px; padding:12px; border-radius:16px; background:#faf6f0}
.cm-lt{display:flex; justify-content:space-between; gap:10px; font-size:13px; margin-bottom:5px} .cm-lt i{font-style:normal; color:var(--text-3)}
.cm-pb{height:8px; border-radius:999px; background:#ece4d8; overflow:hidden} .cm-pb i{display:block; height:100%; border-radius:999px; background:linear-gradient(90deg,#e0a02c,#c8823a)}
.cm-pb.ok i{background:linear-gradient(90deg,#38c07d,#207f56)}
.cm-g{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px}
.cm-g > div{padding:9px 10px; border:1px solid #f0e6d8; border-radius:12px} .cm-g small{display:block; font-size:11px; color:var(--text-3)} .cm-g b{font-size:15px} .cm-g em{display:block; font-style:normal; font-size:10.5px; color:var(--text-3)}
.cm-g .rt{background:#0e4a30; border-color:transparent} .cm-g .rt small,.cm-g .rt em{color:#d9c4a3} .cm-g .rt b{color:#e3c48d}
.cm-calc{display:flex; flex-direction:column; border:1px solid #eadfce; border-radius:14px; overflow:hidden}
.cm-calc > div{display:flex; justify-content:space-between; align-items:center; gap:10px; padding:8px 12px; font-size:13px} .cm-calc > div + div{border-top:1px solid #f1ebe2}
.cm-calc small{color:var(--text-3); font-size:11px} .cm-calc .tot{background:#fbf6ee; font-weight:800} .cm-calc .tot b{font-size:19px; color:#17734b}
.cm-pl{display:flex; justify-content:space-between; font-size:12px; color:var(--text-3); margin-bottom:5px} .cm-pl b{color:var(--rv-dark,#0e4a30)}
.cm-a{display:flex; gap:8px; flex-wrap:wrap; margin-top:auto} .cm-a .btn{flex:1; justify-content:center; white-space:nowrap}
.cm-done{flex:1; display:inline-flex; align-items:center; justify-content:center; gap:6px; height:40px; border-radius:12px; background:#e9f6ef; color:#197c51; font-weight:700; font-size:13px} .cm-done svg{width:16px; height:16px}
@media (max-width:1200px){ #cmk .cu-kpis{grid-template-columns:repeat(3,minmax(0,1fr))!important} }
@media (max-width:760px){ #cmk .cu-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important} .cm-grid{grid-template-columns:1fr} .cm-month .inp{display:none} }

@media (max-width:760px){ .cu-kpis[style]{grid-template-columns:repeat(2,minmax(0,1fr))!important} }

/* ======================= الرحلات + لوحة المندوبين + خط سير اليوم ======================= */
.tp-st{display:inline-flex; align-items:center; gap:5px; font-size:12px; font-weight:700; padding:3px 10px; border-radius:999px; white-space:nowrap}
.tp-st svg{width:13px; height:13px}
.tp-st.s-ld{background:#ecf8f7; color:#3d8178} .tp-st.s-out{background:#fdf3e1; color:#a8661c} .tp-st.s-ret{background:#fdecec; color:#c8323a} .tp-st.s-cl{background:#e9f6ef; color:#197c51}
.tp-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(330px,1fr)); gap:14px}
.tp{display:flex; flex-direction:column; gap:10px; padding:14px; background:#fff; border:1px solid var(--border); border-radius:20px; box-shadow:0 12px 28px -24px rgba(9,51,33,.55)}
.tp-h{display:flex; align-items:center; gap:10px} .tp-h > div{flex:1; min-width:0} .tp-h b{display:block; font-size:15.5px; color:var(--rv-dark,#0e4a30)} .tp-h small{font-size:12px; color:var(--text-3)}
.tp-ic{width:42px; height:42px; border-radius:13px; display:grid; place-items:center; flex:none; background:#0e4a30; color:#e3c38b} .tp-ic svg{width:20px; height:20px}
.tp-ic.s-out{background:linear-gradient(180deg,#d9963a,#a8661c); color:#fff} .tp-ic.s-ret{background:linear-gradient(180deg,#d65a4f,#a8362c); color:#fff} .tp-ic.s-cl{background:linear-gradient(180deg,#2fae6f,#207f56); color:#fff}
.tp-times,.tp-g{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px}
.tp-times > div,.tp-g > div{padding:7px 8px; border-radius:11px; background:#faf6f0; min-width:0} .tp-times small,.tp-g small{display:block; font-size:10.5px; color:var(--text-3)}
.tp-times b,.tp-g b{font-size:13.5px; white-space:nowrap} .tp-times em{display:block; font-style:normal; font-size:10px; color:var(--text-3)}
.tp-g > div{background:#fff; border:1px solid #f0e6d8}
.tp-a{display:flex; gap:6px; flex-wrap:wrap; margin-top:auto} .tp-a .btn{flex:1; justify-content:center; white-space:nowrap}
.tp-hero{display:grid; grid-template-columns:260px 1fr; gap:14px; align-items:stretch; margin-bottom:14px}
.tp-hl{display:flex; flex-direction:column; gap:6px; justify-content:center; padding:16px; border-radius:20px; background:linear-gradient(135deg,#0e4a30,#135438); color:#fff}
.tp-hl b{font-size:18px} .tp-hl small{color:#d9c4a3; font-size:12px} .tp-hl .tp-st{align-self:flex-start}
.tp-tl{display:flex; align-items:stretch; gap:0; padding:14px; background:#fff; border:1px solid var(--border); border-radius:20px; overflow-x:auto}
.tl-i{flex:1; min-width:110px; display:flex; flex-direction:column; align-items:center; text-align:center; gap:3px; position:relative; padding:0 6px}
.tl-i::before{content:''; position:absolute; top:17px; right:50%; left:-50%; height:2px; background:#eadfce; z-index:0} .tl-i:first-child::before{display:none}
.tl-i > i{position:relative; z-index:1; width:34px; height:34px; border-radius:50%; display:grid; place-items:center; background:#0e4a30; color:#e3c38b} .tl-i > i svg{width:16px; height:16px}
.tl-i.k-start > i{background:#a8661c; color:#fff} .tl-i.k-sale > i{background:#3d8178; color:#fff} .tl-i.k-return > i{background:#c8323a; color:#fff} .tl-i.k-close > i{background:#207f56; color:#fff}
.tl-i b{font-size:15px; color:var(--rv-dark,#0e4a30)} .tl-i span{font-size:12.5px; font-weight:700} .tl-i small{font-size:11px; color:var(--text-3)}
.cu-k.t-bad::before{background:#c8323a}
.cu-ch-out{display:flex; align-items:center; justify-content:space-between; margin:4px 2px 10px} .cu-ch-out b{display:flex; align-items:center; gap:7px; font-size:15px} .cu-ch-out b svg{width:17px; height:17px; color:#17734b}
.rd-t td{vertical-align:middle} .rd-t tr[data-rep]{cursor:pointer}
.rd-who{display:flex; align-items:center; gap:8px} .rd-who .rp-av{width:32px; height:32px; font-size:13px}
.rd-v{min-width:90px} .rd-v .cm-pb{margin-top:4px; height:6px}
/* تحميل العربية */
.lv-top{display:flex; gap:12px; align-items:flex-end; flex-wrap:wrap} .lv-top .f{min-width:220px} .lv-top label{display:block; font-size:12.5px; margin-bottom:4px; color:var(--text-2)}
.lv-trip{display:flex; align-items:center; gap:8px; padding:9px 12px; border-radius:12px; background:#faf5ee; font-size:13px; flex:1}
.lv-bar{display:flex; gap:8px; align-items:center; margin:12px 0 8px} .lv-bar .us-search{flex:1}
.lv-tw{max-height:380px; overflow:auto; border:1px solid #eee4d6; border-radius:14px}
.lv-t thead th{position:sticky; top:0; z-index:1} .lv-t tr.on td{background:#f7efe3} .lv-t .lv-in{width:110px; text-align:center; font-weight:700}
.lv-sum{display:flex; align-items:center; gap:6px; margin-top:10px; padding:9px 12px; border-radius:12px; background:#0e4a30; color:#f3e6d3; font-size:13px} .lv-sum svg{width:16px; height:16px; color:#e3c38b} .lv-sum b{color:#e3c48d}
/* قفل الرحلة */
.tc-sum{display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:8px}
.tc-sum > div{padding:10px 12px; border-radius:12px; background:#faf6f0} .tc-sum small{display:block; font-size:11px; color:var(--text-3)} .tc-sum b{font-size:16px} .tc-sum em{display:block; font-style:normal; font-size:11px; color:var(--text-3)}
.tc-t .inp{width:100px; text-align:center; font-weight:700} .tc-t .tc-d{border-color:#e5a49b}
.tc-l{font-weight:800} .tc-l.ok{color:#197c51} .tc-l.warn{color:#a8661c} .tc-l.bad{color:#c8323a}
.tc-x{height:42px; display:flex; align-items:center; padding:0 12px; border-radius:12px; background:#e9f6ef; color:#197c51; font-weight:800; font-size:16px}
/* خط سير اليوم */
.pl-day{display:flex; align-items:center; gap:6px} .pl-day .inp{width:170px} .pl-dn{font-weight:800; color:#17734b}
.pl-g{display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:14px; align-items:start}
.pl-c{border-radius:20px; overflow:hidden} .pl-c.sel{border:1.5px solid var(--rv-gold,#c9a15e)}
.pl-f{display:flex; flex-direction:column; gap:8px; padding:10px 12px; border-bottom:1px solid #f1eae0}
.pl-areas{max-height:76px; overflow:auto}
.pl-list{display:flex; flex-direction:column; gap:4px; padding:8px; max-height:520px; overflow:auto}
.pl-it{display:flex; align-items:center; gap:10px; width:100%; padding:8px 10px; border:1px solid #f0e6d8; border-radius:12px; background:#fff; font:inherit; text-align:start; cursor:pointer}
.pl-it:hover{border-color:#d9c9b1; background:#fdfaf5} .pl-it > span:nth-child(2){flex:1; min-width:0} .pl-it b{display:block; font-size:13.5px} .pl-it small{font-size:11.5px; color:var(--text-3)}
.pl-it > svg{width:16px; height:16px; color:#197c51}
.pl-av{width:30px; height:30px; border-radius:10px; display:grid; place-items:center; flex:none; background:#f3ece2; color:#17734b; font-weight:800}
.pl-it.on{cursor:default; background:#fffdf8} .pl-n{width:28px; height:28px; border-radius:9px; display:grid; place-items:center; flex:none; background:#0e4a30; color:#e3c38b; font-weight:800; font-size:12.5px}
.pl-mv{display:flex; gap:3px} .pl-mv button{width:28px; height:28px; border:1px solid #eadfce; border-radius:8px; background:#fff; cursor:pointer; font-size:11px; color:#2e7254} .pl-mv button:disabled{opacity:.3} .pl-mv button[data-rm]{color:#c0473a}
.pl-save{padding:10px 12px; border-top:1px solid #f1eae0; background:#fcfaf7} .pl-save .btn{width:100%; justify-content:center; height:44px}
/* الموقع في صفحة المندوب */
.lc-top{display:flex; gap:10px; flex-wrap:wrap; align-items:stretch; margin-bottom:12px}
.lc-k{flex:1; min-width:170px; padding:10px 12px; border:1px solid #eee4d6; border-radius:14px} .lc-k small{display:block; font-size:11px; color:var(--text-3)} .lc-k b{font-size:14px} .lc-k em{display:block; font-style:normal; font-size:11px; color:var(--text-3)}
.lc-top > .btn{align-self:center}
.lc-map{height:420px; border-radius:16px; overflow:hidden; border:1px solid #eee4d6; background:#f3efe9}
.lc-me{width:34px; height:34px; border-radius:50%; display:grid; place-items:center; background:#c8323a; color:#fff; box-shadow:0 0 0 6px rgba(200,50,58,.25)} .lc-me svg{width:18px; height:18px}
/* كارت الرحلة في تطبيق المندوب */
.ft-trip{display:flex; align-items:center; gap:12px; padding:12px 14px; margin-bottom:12px; border-radius:18px; background:#fff; border:1.5px solid var(--border)}
.ft-trip > svg{width:24px; height:24px; color:#17734b; flex:none} .ft-trip > div{flex:1; min-width:0} .ft-trip b{display:block; font-size:14.5px} .ft-trip small{font-size:12px; color:var(--text-3)}
.ft-trip.s-loaded{border-color:#64afa5; background:#f4fcfb} .ft-trip.s-out{border-color:#d9963a; background:#fffaf1} .ft-trip.s-returned{border-color:#d65a4f; background:#fff6f5}
@media (max-width:900px){ .tp-hero{grid-template-columns:1fr} .pl-g{grid-template-columns:1fr} .tp-times,.tp-g{grid-template-columns:repeat(2,minmax(0,1fr))} .lc-map{height:320px} }

/* ======================= خط سير اليوم: الشريط ======================= */
.pl-bar{display:flex; align-items:flex-end; gap:12px; flex-wrap:wrap; margin-bottom:12px; padding:12px 14px; background:#fff; border:1px solid var(--border); border-radius:18px}
.pl-rep{display:flex; flex-direction:column; gap:4px; min-width:240px} .pl-rep label{display:flex; align-items:center; gap:6px; font-size:12px; color:var(--text-3)} .pl-rep label svg{width:14px; height:14px}
.pl-rep .inp{width:260px; font-weight:700}
.pl-bar .pl-day{margin-inline-start:auto} .pl-bar .pl-dn{align-self:center; padding:8px 12px; border-radius:12px; background:#0e4a30; color:#e3c48d}
.pl-stats{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-bottom:12px}
.pl-stats > div{padding:11px 14px; border:1px solid var(--border); border-radius:16px; background:#fff} .pl-stats small{display:block; font-size:11.5px; color:var(--text-3)} .pl-stats b{font-size:20px; color:var(--rv-dark,#0e4a30)} .pl-stats em{display:block; font-style:normal; font-size:11px; color:var(--text-3); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.pl-stats .on{background:linear-gradient(135deg,#0e4a30,#135438); border-color:transparent} .pl-stats .on small{color:#d9c4a3} .pl-stats .on b{color:#e3c48d}
@media (max-width:760px){ .pl-stats{grid-template-columns:repeat(2,minmax(0,1fr))} .pl-rep,.pl-rep .inp{width:100%; min-width:0} .pl-bar .pl-day{margin:0} }

/* ======================= الموردين ======================= */
.sf-sec + .sf-sec{margin-top:16px}
.inp-ico{position:relative} .inp-ico > svg{position:absolute; top:50%; right:12px; transform:translateY(-50%); width:16px; height:16px; color:#9a7b5c; pointer-events:none} .inp-ico .inp{padding-right:38px; width:100%}
.sf-notes{width:100%; min-height:96px; resize:vertical; line-height:1.7}
.sp-who{display:flex; align-items:center; gap:10px} .sp-who b{display:block} .sp-who small{display:block; font-size:12px; color:var(--text-3); text-align:start}
.sp-av,.sp-hav{display:grid; place-items:center; flex:none; font-weight:800; color:#fff; background:linear-gradient(180deg,#64afa5,#42847b)}
.sp-av{width:36px; height:36px; border-radius:11px; font-size:14px}
.sp-top{display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:8px; padding:12px}
.sp-top > div{display:grid; grid-template-columns:1fr auto; gap:2px 10px; padding:10px 12px; border:1px solid #f0e6d8; border-radius:12px} .sp-top b{font-size:13.5px} .sp-top small{grid-column:1; font-size:11.5px; color:var(--text-3)} .sp-top em{grid-row:1 / span 2; grid-column:2; align-self:center; font-style:normal; font-weight:800}

/* ======================= فاتورة الشراء: كروت الخامات ======================= */
#mtiles{margin-bottom:14px}
.mt-bar{display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-bottom:10px} .mt-bar .us-search{flex:1; min-width:180px}
.mt-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:8px; max-height:250px; overflow:auto; padding:2px}
.mt{position:relative; display:flex; flex-direction:column; align-items:flex-start; gap:3px; padding:10px 11px; border:1.5px solid var(--border); border-radius:14px; background:#fff; font:inherit; text-align:start; cursor:pointer; transition:border-color .15s,transform .1s}
.mt:hover{border-color:#d9c9b1; transform:translateY(-1px)} .mt b{font-size:13px; line-height:1.35} .mt small{font-size:11px; color:var(--text-3)}
.mt-i{width:28px; height:28px; border-radius:9px; display:grid; place-items:center; background:#f3ece2; color:#17734b} .mt-i svg{width:15px; height:15px}
.mt.in{border-color:var(--rv-gold,#c9a15e); background:var(--rv-cream,#fbf6ee)} .mt.in .mt-i{background:#0e4a30; color:#e3c38b}
.mt em{position:absolute; top:8px; left:8px; font-style:normal; font-size:11px; font-weight:800; padding:1px 8px; border-radius:999px; background:#0e4a30; color:#e3c48d}

/* ======================= المصروفات ======================= */
.ex-wrap{display:grid; grid-template-columns:minmax(0,1fr) 340px; gap:16px; align-items:start}
.ex-main{display:flex; flex-direction:column; gap:14px} .ex-main .card{border-radius:18px} .ex-main .card-head h3{display:flex; align-items:center; gap:8px} .ex-main .card-head h3 svg{width:17px; height:17px; color:#17734b}
.ex-side{position:sticky; top:0} .ex-side .sum-card{border-radius:20px}
.ex-cats{display:grid; grid-template-columns:repeat(auto-fill,minmax(118px,1fr)); gap:8px}
.ex-c{display:flex; flex-direction:column; align-items:center; gap:6px; padding:12px 6px; border:1.5px solid var(--border); border-radius:14px; background:#fff; font:inherit; cursor:pointer; transition:border-color .15s,transform .1s}
.ex-c > span{width:38px; height:38px; border-radius:12px; display:grid; place-items:center; background:#f3ece2; color:#17734b} .ex-c > span svg{width:19px; height:19px}
.ex-c b{font-size:12.5px; text-align:center; line-height:1.3} .ex-c:hover{border-color:#d9c9b1; transform:translateY(-1px)}
.ex-c.on{border-color:var(--rv-gold,#c9a15e); background:var(--rv-cream,#fbf6ee); box-shadow:0 0 0 3px #f6ead5} .ex-c.on > span{background:#0e4a30; color:#e3c38b}
.ex-c.t-el > span{background:#fdf6dd; color:#a8800f} .ex-c.t-wa > span{background:#eaf9f7; color:#2a8075} .ex-c.t-ga > span{background:#fdeee6; color:#c0562a} .ex-c.t-fu > span{background:#fdf3e1; color:#a8661c}
.ex-c.t-cl > span{background:#e9f6ef; color:#197c51} .ex-c.t-tr > span{background:#ecf8f7; color:#3d8178} .ex-c.t-mt > span{background:#f8edf2; color:#904b6b}
.ex-amt{font-size:22px!important; font-weight:800; height:54px}
.ex-al{margin-top:14px; background:rgba(255,255,255,.06)!important; border-color:rgba(255,255,255,.12)!important} .ex-al b{color:#fff!important} .ex-al small{color:#d9c4a3!important}
.ex-side .sum-pay select{width:100%; margin:6px 0 8px}
.ex-quick{display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin-bottom:14px; padding:10px 12px; background:#fff; border:1px solid var(--border); border-radius:16px; font-size:12.5px; color:var(--text-3)}
.ex-quick > span{display:inline-flex; align-items:center; gap:5px; margin-inline-end:4px} .ex-quick > span svg{width:14px; height:14px}
.ex-chip{display:inline-flex; align-items:center; gap:5px; padding:4px 10px; border-radius:999px; border:0; background:#f3ece2; color:#2e7254; font:inherit; font-size:12px; font-weight:700; white-space:nowrap}
button.ex-chip{cursor:pointer} button.ex-chip:hover{filter:brightness(.96)} .ex-chip svg{width:13px; height:13px}
.ex-chip.t-el{background:#fdf6dd; color:#a8800f} .ex-chip.t-wa{background:#eaf9f7; color:#2a8075} .ex-chip.t-ga{background:#fdeee6; color:#c0562a} .ex-chip.t-fu{background:#fdf3e1; color:#a8661c}
.ex-chip.t-cl{background:#e9f6ef; color:#197c51} .ex-chip.t-tr{background:#ecf8f7; color:#3d8178} .ex-chip.t-mt{background:#f8edf2; color:#904b6b}
@media (max-width:900px){ .ex-wrap{grid-template-columns:1fr} .ex-side{position:static} }
.ex-c.t-ph > span,.ex-chip.t-ph{background:#eaf9f7; color:#2a8075} .ex-c.t-mk > span,.ex-chip.t-mk{background:#fdecf3; color:#b03a6f} .ex-c.t-re > span,.ex-chip.t-re{background:#f3ece2; color:#17734b}
.ex-c.t-ho > span,.ex-chip.t-ho{background:#fdf0e4; color:#a8661c} .ex-c.t-to > span,.ex-chip.t-to{background:#eef2f2; color:#3f5f5f} .ex-c.t-ot > span,.ex-chip.t-ot{background:#f1ede8; color:#398564}
.ex-c.t-wa > span{background:#e6faf8; color:#26af9d} .ex-chip.t-wa{background:#e6faf8; color:#26af9d}
.ex-c.on > span{background:#0e4a30!important; color:#e3c38b!important}
.ex-cats{grid-template-columns:repeat(auto-fill,minmax(112px,1fr))}
.ex-c{min-height:92px; justify-content:center}

/* ======================= المخازن ======================= */
.wh-cards{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:14px}
.wh-c{position:relative; display:flex; align-items:flex-start; gap:12px; padding:16px; border-radius:20px; background:#fff; border:1.5px solid var(--border); text-decoration:none; color:inherit; transition:border-color .15s,transform .1s,box-shadow .15s}
.wh-c:hover{transform:translateY(-1px); border-color:#d9c9b1}
.wh-c.on{border-color:var(--rv-gold,#c9a15e); box-shadow:0 0 0 3px #f6ead5; background:linear-gradient(180deg,#fffdf9,#fbf6ee)}
.wh-i{width:46px; height:46px; border-radius:14px; display:grid; place-items:center; flex:none; color:#fff} .wh-i svg{width:22px; height:22px}
.wh-c.t-finished .wh-i{background:linear-gradient(180deg,#c9a15e,#9c7540)} .wh-c.t-raw .wh-i{background:linear-gradient(180deg,#64afa5,#42847b)} .wh-c.t-packaging .wh-i{background:linear-gradient(180deg,#2fae6f,#207f56)} .wh-c.t-damaged .wh-i{background:linear-gradient(180deg,#d65a4f,#a8362c)}
.wh-c > div{min-width:0} .wh-c small{display:block; font-size:12px; color:var(--text-3); font-weight:700} .wh-c b{display:block; font-size:21px; color:var(--rv-dark,#0e4a30)} .wh-c em{display:block; font-style:normal; font-size:11.5px; color:var(--text-3)}
.wh-low{position:absolute; top:10px; left:10px; font-style:normal; font-size:10.5px; font-weight:800; padding:2px 8px; border-radius:999px; background:#fdecec; color:#c8323a}
.wh-src{display:inline-block; font-size:10.5px; font-weight:700; padding:1px 8px; border-radius:999px} .wh-src.m{background:#f3ece2; color:#17734b} .wh-src.b{background:#ecf8f7; color:#3d8178}
@media (max-width:1000px){ .wh-cards{grid-template-columns:repeat(2,minmax(0,1fr))} }
/* استيراد الأصناف */
.im-drop{position:relative; display:flex; flex-direction:column; align-items:center; gap:6px; padding:26px; border:2px dashed #e1d3bf; border-radius:18px; background:#fffdf9; text-align:center; cursor:pointer}
.im-drop svg{width:30px; height:30px; color:#c9a15e} .im-drop b{font-size:15px} .im-drop span{font-size:12.5px; color:var(--text-3)}
.im-drop input{position:absolute; inset:0; opacity:0; cursor:pointer} .im-drop.done{padding:12px; flex-direction:row; justify-content:center; border-style:solid; border-color:#bfe3cd; background:#f3fbf6}
.im-sum{display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin:14px 0 10px}
.im-c{display:inline-flex; align-items:center; gap:6px; padding:6px 12px; border-radius:12px; background:#f3ece2; font-size:12.5px; color:#2e7254} .im-c b{font-size:15px}
.im-c.t-raw{background:#ecf8f7; color:#3d8178} .im-c.t-packaging{background:#e9f6ef; color:#197c51} .im-c.t-made{background:#fbf0e0; color:#8a5214} .im-c.t-bought{background:#f8edf2; color:#904b6b}
.im-tw{max-height:52vh; overflow:auto; border:1px solid #eee4d6; border-radius:14px} .im-t thead th{position:sticky; top:0; z-index:1} .im-t tr.off td{opacity:.45} .im-t .inp{width:100%}
.im-up{display:inline-flex; align-items:center; gap:6px; font-size:12.5px; font-weight:700; color:#216547; padding:6px 10px; border-radius:10px; background:#faf5ee} .im-up input{width:16px; height:16px; accent-color:#0e4a30}

/* ======================= فورم الخامة ======================= */
.mf{display:flex; flex-direction:column; gap:12px} .mf .f label{display:block; font-size:12.5px; margin-bottom:5px; color:var(--text-2)} .mf .inp{width:100%}
.mf-name{height:48px; font-size:16px; font-weight:700}
.mf-sec{display:flex; align-items:center; gap:7px; font-weight:800; font-size:13.5px; color:var(--rv-dark,#0e4a30); margin-top:4px} .mf-sec svg{width:16px; height:16px; color:#17734b}
.mf-kinds{display:grid; grid-template-columns:1fr 1fr; gap:10px}
.mf-k{display:grid; grid-template-columns:auto 1fr; grid-template-rows:auto auto; column-gap:10px; align-items:center; text-align:start; padding:12px 14px; border:1.5px solid var(--border); border-radius:16px; background:#fff; font:inherit; cursor:pointer}
.mf-k > span{grid-row:span 2; width:40px; height:40px; border-radius:12px; display:grid; place-items:center; background:#f3ece2; color:#17734b} .mf-k > span svg{width:19px; height:19px}
.mf-k b{font-size:14px} .mf-k small{font-size:11.5px; color:var(--text-3)}
.mf-k.on{border-color:var(--rv-gold,#c9a15e); background:var(--rv-cream,#fbf6ee); box-shadow:0 0 0 3px #f6ead5} .mf-k.on > span{background:#0e4a30; color:#e3c38b}
.mf-units{display:flex; flex-wrap:wrap; gap:6px; align-items:center}
.mf-u{display:inline-flex; align-items:center; gap:5px; height:36px; padding:0 14px; border-radius:11px; border:1.5px solid var(--border); background:#fff; font:inherit; font-size:13px; font-weight:700; color:var(--text-2); cursor:pointer}
.mf-u svg{width:14px; height:14px} .mf-u:hover{border-color:#d9c9b1} .mf-u.on{background:linear-gradient(180deg,#145236,#0c2219); border-color:transparent; color:#fff}
.mf-units #mf-uo{width:150px; height:36px}
.mf-grid{display:grid; grid-template-columns:1fr 1fr; gap:12px}
.mf-money{position:relative} .mf-money .inp{padding-left:86px; font-weight:700} .mf-money span{position:absolute; top:50%; left:12px; transform:translateY(-50%); font-size:12px; color:var(--text-3); pointer-events:none}
@media (max-width:600px){ .mf-kinds,.mf-grid{grid-template-columns:1fr} }

/* ======================= إضافة / صرف / جرد ======================= */
.sa{display:flex; flex-direction:column; gap:12px} .sa .f label{display:block; font-size:12.5px; margin-bottom:5px; color:var(--text-2)} .sa .inp{width:100%}
.sa-bal{display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:10px; padding:12px 16px; border-radius:16px; background:#faf6f0; border:1px solid #eee4d6}
.sa-bal small{display:block; font-size:11.5px; color:var(--text-3)} .sa-bal b{font-size:22px; color:var(--rv-dark,#0e4a30)} .sa-bal > div:last-child{text-align:left} .sa-bal > span svg{width:18px; height:18px; color:#b9ada0}
.sa-modes{display:grid; grid-template-columns:repeat(auto-fit,minmax(0,1fr)); gap:8px}
.sa-m{display:flex; flex-direction:column; align-items:center; gap:3px; padding:12px 6px; border:1.5px solid var(--border); border-radius:16px; background:#fff; font:inherit; cursor:pointer}
.sa-m svg{width:19px; height:19px; color:#9a7b5c} .sa-m b{font-size:14px} .sa-m small{font-size:11px; color:var(--text-3)}
.sa-m.m-in.on{border-color:#207f56; background:#f0faf4; box-shadow:0 0 0 3px #dcf2e5} .sa-m.m-in.on svg{color:#207f56}
.sa-m.m-out.on{border-color:#c8323a; background:#fff4f4; box-shadow:0 0 0 3px #fbe1e2} .sa-m.m-out.on svg{color:#c8323a}
.sa-m.m-count.on{border-color:#3d8178; background:#f4fcfb; box-shadow:0 0 0 3px #e2f4f1} .sa-m.m-count.on svg{color:#3d8178}
.sa-step{display:flex; align-items:stretch; border:1.5px solid var(--border); border-radius:14px; overflow:hidden; background:#fff}
.sa-step .inp{border:0!important; text-align:center; font-size:22px; font-weight:800; height:54px; box-shadow:none!important}
.sa-step button{width:52px; border:0; background:#faf6f0; cursor:pointer; color:#0e4a30} .sa-step button svg{width:18px; height:18px}
.sa-step > span{display:grid; place-items:center; padding:0 14px; background:#faf6f0; font-weight:700; color:#2e7254; min-width:56px}
.sa-rs{display:flex; flex-wrap:wrap; gap:6px}
.sa-r{display:inline-flex; align-items:center; gap:6px; height:38px; padding:0 14px; border-radius:12px; border:1.5px solid var(--border); background:#fff; font:inherit; font-size:13px; font-weight:700; cursor:pointer; color:var(--text-2)}
.sa-r svg{width:15px; height:15px} .sa-r.on{background:linear-gradient(180deg,#145236,#0c2219); border-color:transparent; color:#fff} .sa-r.on svg{color:#e3c38b}
.sa-hint{display:flex; gap:7px; align-items:flex-start; padding:10px 12px; border-radius:12px; background:#f4fcfb; color:#3d8178; font-size:12.5px; line-height:1.6} .sa-hint svg{width:15px; height:15px; flex:none; margin-top:2px}
.sa-qk{display:flex; gap:6px; flex-wrap:wrap; margin-top:8px}
table.t [data-act].btn.sa-b{background:linear-gradient(180deg,#2fae6f,#207f56)!important; color:#fff!important; border:0!important} table.t [data-act].btn.sa-b svg{color:#fff!important}
table.t [data-act].btn.sa-p{background:linear-gradient(180deg,#d9963a,#a8661c)!important; color:#fff!important; border:0!important} table.t [data-act].btn.sa-p svg{color:#fff!important}
table.t [data-act].btn.sa-d{background:#fff!important; color:#c0473a!important; border:1px solid rgba(192,71,58,.35)!important} table.t [data-act].btn.sa-d svg{color:#c0473a!important}
table.t [data-act].btn.sa-h{background:#fff!important; color:#135438!important; border:1px solid #e4d8c6!important} table.t [data-act].btn.sa-h svg{color:#2b835d!important}
table.t [data-act].btn.sa-b,table.t [data-act].btn.sa-p,table.t [data-act].btn.sa-d,table.t [data-act].btn.sa-h{height:34px; border-radius:10px!important; padding:0 12px!important; gap:6px; font-size:12.5px; font-weight:700; white-space:nowrap}
/* أمر الإنتاج */
.us-chip.on{background:linear-gradient(180deg,#145236,#0c2219); border-color:transparent; color:#fff}

/* ===== المنتج: فورم الإضافة/التعديل (pd-) ===== */
.modal.pm.pd-modal{max-width:1180px}
.pd{display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:18px; align-items:start}
.pd-main{min-width:0; display:flex; flex-direction:column; gap:14px}
.pd-tabs{display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:6px; padding:6px; border-radius:18px; background:#f6f1ea; border:1px solid #eee4d6; position:sticky; top:-18px; z-index:3}
.pd-tabs button{display:flex; align-items:center; gap:10px; padding:9px 10px; border:0; border-radius:13px; background:transparent; font:inherit; text-align:start; cursor:pointer; color:var(--text-2); min-width:0}
.pd-tn{flex:none; width:28px; height:28px; border-radius:50%; display:grid; place-items:center; font-weight:800; font-size:13px; background:#fff; border:1.5px solid #e3d6c3; color:#17734b}
.pd-tx{display:flex; flex-direction:column; min-width:0} .pd-tx b{font-size:13.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis} .pd-tx small{font-size:11px; color:var(--text-3); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.pd-tabs button:hover{background:#fff}
.pd-tabs button.on{background:linear-gradient(180deg,#145236,#0c2219); color:#fff; box-shadow:0 6px 16px rgba(12,34,25,.22)} .pd-tabs button.on .pd-tn{background:#e3c38b; border-color:#e3c38b; color:#0e4a30} .pd-tabs button.on small{color:#d8c4a6}
.pd-p{display:flex; flex-direction:column; gap:14px; padding:18px; border:1px solid #eee4d6; border-radius:18px; background:#fff}
.pd-p[hidden]{display:none}
.pd-lbl{display:flex; align-items:center; gap:7px; font-weight:800; font-size:13px; color:#145236; margin-bottom:-6px} .pd-lbl svg{width:16px; height:16px; color:#b08a52}
.pd-src{display:grid; grid-template-columns:1fr 1fr; gap:10px}
.pd-sc{position:relative; display:flex; align-items:center; gap:12px; padding:14px; border:1.5px solid var(--border); border-radius:16px; background:#fff; font:inherit; text-align:start; cursor:pointer}
.pd-si{flex:none; width:44px; height:44px; border-radius:14px; display:grid; place-items:center; background:#f3ece2; color:#17734b} .pd-si svg{width:21px; height:21px}
.pd-st{display:flex; flex-direction:column} .pd-st b{font-size:14.5px} .pd-st small{font-size:11.5px; color:var(--text-3)}
.pd-ck{position:absolute; top:10px; left:10px; width:22px; height:22px; border-radius:50%; display:none; place-items:center; background:#207f56; color:#fff} .pd-ck svg{width:13px; height:13px}
.pd-sc.on{border-color:#c9a15e; background:#fbf6ee; box-shadow:0 0 0 3px #f6ead5} .pd-sc.on .pd-si{background:#0e4a30; color:#e3c38b} .pd-sc.on .pd-ck{display:grid}
.pd-name{height:52px; font-size:17px; font-weight:800}
.pd-code{display:inline-flex; align-items:center; gap:6px; align-self:flex-start; margin-top:-6px; padding:5px 12px; border-radius:999px; background:#f6f1ea; font-size:12px; color:var(--text-3)} .pd-code svg{width:13px; height:13px} .pd-code b{color:#145236}
.pd-chips{display:flex; flex-wrap:wrap; gap:7px; align-items:center}
.pd-chip{display:inline-flex; align-items:center; gap:6px; height:36px; padding:0 14px; border-radius:11px; border:1px solid var(--border); background:#fff; font:inherit; font-size:13px; font-weight:600; color:var(--text-2); cursor:pointer}
.pd-chip svg{width:14px; height:14px; color:#9a7b5c} .pd-chip:hover{border-color:#d9c9b1}
.pd-chip.on{background:linear-gradient(180deg,#145236,#0c2219); border-color:transparent; color:#fff} .pd-chip.on svg{color:#e3c38b}
.pd-chips .inp.sm{width:150px; height:36px}
.pd-g2{display:grid; grid-template-columns:1fr 1fr; gap:12px} .pd-g3{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px}
.pd-g2[hidden]{display:none}
.pd-nav{display:flex; align-items:center; gap:8px} .pd-nav .grow{flex:1}
.btn.dark{background:linear-gradient(180deg,#145236,#0c2219); color:#fff; border-color:transparent} .btn.dark svg{color:#e3c38b}
.pd-note{display:flex; gap:12px; align-items:center; padding:14px; border-radius:14px; background:#f4fcfb; border:1px solid #e1f3f0} .pd-note svg{width:22px; height:22px; color:#3d8178; flex:none} .pd-note div{display:flex; flex-direction:column} .pd-note small{color:var(--text-3); font-size:12px}
.pd-bought{display:flex; flex-direction:column; gap:14px} .pd-bought[hidden],#pd-made[hidden]{display:none}
.pd-yield{display:flex; align-items:center; gap:12px; padding:12px 14px; border-radius:14px; background:#fbf6ee; border:1px solid #f0e2c9}
.pd-yi{flex:none; width:40px; height:40px; border-radius:12px; display:grid; place-items:center; background:#0e4a30; color:#e3c38b} .pd-yi svg{width:19px; height:19px}
.pd-yield > div{flex:1; display:flex; flex-direction:column} .pd-yield em{font-style:normal; color:#17734b} .pd-yield small{font-size:11.5px; color:var(--text-3)}
.pd-yield .inp{width:96px; height:44px; text-align:center; font-size:17px; font-weight:800}
.pd-rh,.pd-r{display:grid; grid-template-columns:minmax(0,1fr) 150px 110px 96px 34px; gap:8px; align-items:center}
.pd-rh{padding:0 10px; font-size:11.5px; font-weight:700; color:var(--text-3); margin-bottom:-6px}
.pd-rec{display:flex; flex-direction:column; gap:7px}
.pd-r{padding:8px 10px; border:1px solid #eee4d6; border-radius:14px; background:#fffdfa; border-inline-start:4px solid #c9a15e}
.pd-r.k-pack{border-inline-start-color:#2f8f6b}
.pd-rn{display:flex; align-items:center; gap:8px; min-width:0} .pd-rn .combo{flex:1; min-width:0}
.pd-rk{flex:none; width:30px; height:30px; border-radius:9px; display:grid; place-items:center; background:#f6ead5; color:#17734b} .pd-rk svg{width:15px; height:15px}
.k-pack .pd-rk{background:#e6f4ee; color:#2f8f6b}
.pd-rq{position:relative} .pd-rq .inp{padding-left:52px; font-weight:700} .pd-rq em{position:absolute; left:10px; top:50%; transform:translateY(-50%); font-style:normal; font-size:11.5px; color:var(--text-3); pointer-events:none}
.pd-rp{font-size:13px; display:flex; flex-direction:column; line-height:1.25} .pd-rp small{font-size:10.5px; color:var(--text-3); font-family:var(--font)}
.pd-rc{font-size:14px; text-align:end} .pd-rc b{color:#145236}
.pd-rx{width:32px; height:32px; border-radius:10px; border:1px solid transparent; background:transparent; color:#b4a493; cursor:pointer; display:grid; place-items:center} .pd-rx svg{width:15px; height:15px} .pd-rx:hover{background:#fdecec; color:#c8323a}
.pd-add{display:flex; gap:8px; flex-wrap:wrap}
.pd-rsum{display:flex; flex-wrap:wrap; gap:8px} .pd-rsum:empty{display:none}
.pd-rsum span{display:inline-flex; align-items:center; gap:6px; padding:7px 12px; border-radius:11px; background:#f6f1ea; font-size:12.5px; color:var(--text-2)} .pd-rsum svg{width:14px; height:14px; color:#9a7b5c}
.pd-rsum span.t{background:#0e4a30; color:#f3dfbd} .pd-rsum span.t b{color:#fff}
.pd-empty{display:flex; flex-direction:column; align-items:center; gap:6px; text-align:center; padding:26px 16px; border:1.5px dashed #e3d6c3; border-radius:16px; background:#fffdfa; color:var(--text-3)}
.pd-empty > svg{width:30px; height:30px; color:#c9a15e} .pd-empty b{color:#145236; font-size:14.5px} .pd-empty span{font-size:12.5px; max-width:420px} .pd-empty .btn{margin-top:6px}
.pd-cost{display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px}
.pd-cc{position:relative; overflow:hidden; display:flex; flex-direction:column; gap:2px; padding:12px; border-radius:14px; border:1px solid #eee4d6; background:#fff}
.pd-cc > span{width:30px; height:30px; border-radius:9px; display:grid; place-items:center; background:#f6ead5; color:#17734b; margin-bottom:4px} .pd-cc > span svg{width:15px; height:15px}
.pd-cc small{font-size:11.5px; color:var(--text-3)} .pd-cc b{font-size:17px}
.pd-cc i{position:absolute; bottom:0; right:0; height:3px; background:#c9a15e}
.pd-cc.c-pack > span{background:#e6f4ee; color:#2f8f6b} .pd-cc.c-pack i{background:#2f8f6b}
.pd-cc.c-lab > span{background:#effaf8; color:#3d8178} .pd-cc.c-lab i{background:#3d8178}
.pd-cc.c-ov > span{background:#fdf3e1; color:#a8661c} .pd-cc.c-ov i{background:#a8661c}
.pd-cc.c-tot{background:linear-gradient(160deg,#145236,#0c2219); border-color:transparent; color:#fff} .pd-cc.c-tot > span{background:rgba(227,195,139,.18); color:#e3c38b} .pd-cc.c-tot small{color:#d8c4a6} .pd-cc.c-tot b{color:#fff}
.pd-sug{display:flex; flex-wrap:wrap; gap:7px; align-items:center} .pd-sl{font-size:12.5px; font-weight:700; color:var(--text-2)} .pd-sug .pd-chip b{color:#17734b} .pd-sug .muted{font-size:11.5px}
.pd-tiers{display:flex; flex-direction:column; gap:8px}
.pd-tier{position:relative; overflow:hidden; display:grid; grid-template-columns:130px 180px minmax(0,1fr) auto; gap:12px; align-items:center; padding:12px 14px; border:1px solid #eee4d6; border-radius:16px; background:#fff}
.pd-tl{display:flex; flex-direction:column} .pd-tl b{font-size:14.5px} .pd-tl small{font-size:11.5px; color:var(--text-3)}
.pd-res{display:flex; flex-direction:column} .pd-res b{font-size:17px} .pd-res small{font-size:11.5px; color:var(--text-3)}
.pd-vd{font-size:12px; font-weight:800; padding:4px 12px; border-radius:999px; background:#f1ede8; color:#398564} .pd-vd:empty{display:none}
.pd-bar{position:absolute; bottom:0; right:0; left:0; height:4px; background:#f6f1ea} .pd-bar i{display:block; height:100%; background:#c9a15e; transition:width .2s}
.pd-tier.v-good{border-color:#cfe9da} .pd-tier.v-good .pd-res b{color:#197c51} .pd-tier.v-good .pd-vd{background:#e9f6ef; color:#197c51} .pd-tier.v-good .pd-bar i{background:#22a35a}
.pd-tier.v-bad{border-color:#f5d0d2; background:#fffafa} .pd-tier.v-bad .pd-res b{color:#c8323a} .pd-tier.v-bad .pd-vd{background:#fdecec; color:#c8323a}
.pd-tier.v-mid .pd-vd{background:#fdf3e1; color:#a8661c}
/* الملخص الجانبي */
.pd-side{position:sticky; top:0}
.pds{border-radius:20px; padding:18px; background:linear-gradient(165deg,#145236 0%,#0c2219 100%); color:#f3e7d6; display:flex; flex-direction:column; gap:14px; box-shadow:0 14px 30px rgba(12,34,25,.22)}
.pds-h{display:flex; gap:12px; align-items:center} .pds-h > div{display:flex; flex-direction:column; min-width:0} .pds-h b{font-size:15.5px; color:#fff} .pds-h b i{color:#b8a48a; font-weight:600} .pds-h small{font-size:11.5px; color:#cdb894}
.pd-av{flex:none; width:44px; height:44px; border-radius:14px; display:grid; place-items:center; font-weight:800; font-size:19px; color:hsl(var(--h),45%,28%); background:hsl(var(--h),55%,90%); border:1px solid hsl(var(--h),40%,80%)}
.pds .pd-av{background:rgba(227,195,139,.16); color:#e3c38b; border-color:rgba(227,195,139,.3)}
.pds-tags{display:flex; flex-wrap:wrap; gap:6px} .pds-tags span{font-size:11px; font-weight:700; padding:3px 10px; border-radius:999px; background:rgba(255,255,255,.08); color:#e7d6bd}
.pds-tags .m{background:rgba(227,195,139,.18); color:#f0d7a6} .pds-tags .b{background:rgba(122,218,205,.2); color:#c2efe9} .pds-tags .on{background:rgba(34,163,90,.22); color:#9fe0b8} .pds-tags .off{background:rgba(200,50,58,.25); color:#f3b2b5}
.pds-big{padding:14px; border-radius:16px; background:rgba(255,255,255,.06); display:flex; flex-direction:column} .pds-big small{font-size:11.5px; color:#cdb894} .pds-big b{font-size:28px; color:#fff; line-height:1.2} .pds-big em{font-style:normal; font-size:11.5px; color:#b8a48a}
.pds-pf{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px} .pds-pf > div{padding:10px 8px; border-radius:12px; background:rgba(255,255,255,.05); display:flex; flex-direction:column; text-align:center} .pds-pf small{font-size:10.5px; color:#cdb894} .pds-pf b{font-size:14.5px; color:#fff}
.pds-pf.t-good > div:nth-child(n+2) b{color:#7fe0a6} .pds-pf.t-bad > div:nth-child(n+2) b{color:#ff9ca1}
.pds-100{display:flex; align-items:center; gap:7px; font-size:12.5px; padding:10px 12px; border-radius:12px; background:rgba(227,195,139,.12); color:#f0d7a6} .pds-100 svg{width:15px; height:15px; flex:none} .pds-100 b{color:#fff}
.pds-tiers{display:flex; flex-direction:column; gap:6px} .pds-tiers > div{display:grid; grid-template-columns:1fr auto 56px; gap:8px; align-items:center; font-size:12.5px} .pds-tiers span{color:#cdb894} .pds-tiers b{color:#fff}
.pds-tiers em{font-style:normal; font-size:11px; font-weight:800; text-align:center; padding:2px 6px; border-radius:999px; background:rgba(255,255,255,.08)} .pds-tiers em.good{color:#7fe0a6} .pds-tiers em.mid,.pds-tiers em.low{color:#f3c97a} .pds-tiers em.bad{color:#ff9ca1}
.pds-top{display:flex; flex-direction:column; gap:7px; padding-top:12px; border-top:1px solid rgba(255,255,255,.1)} .pds-top small{font-size:11px; color:#b8a48a}
.pds-top > div{position:relative; display:flex; justify-content:space-between; gap:8px; font-size:12px; padding-bottom:5px} .pds-top > div span{color:#e7d6bd; overflow:hidden; text-overflow:ellipsis; white-space:nowrap} .pds-top > div b{color:#fff}
.pds-top > div i{position:absolute; bottom:0; right:0; height:2px; border-radius:2px; background:#c9a15e}
.pd.ro .pd-add,.pd.ro .pd-sug{display:none}
/* تبويب «الربح» (pdp- / pdn-) — و«التسعير» بقى أسعار بس */
.pd-p[data-p="price"] .pd-res,.pd-p[data-p="price"] .pd-vd,.pd-p[data-p="price"] .pd-bar{display:none}
.pd-p[data-p="price"] .pd-tier{grid-template-columns:minmax(0,1fr) 200px}
.pdp-seg{display:flex; gap:6px; flex-wrap:wrap}
.pdp-per{display:flex; gap:10px; align-items:flex-start; padding:11px 14px; border-radius:14px; background:#f6f1ea; border:1px solid #eee4d6} .pdp-per:empty{display:none}
.pdp-per > svg{width:18px; height:18px; flex:none; color:#17734b; margin-top:2px} .pdp-per div{display:flex; flex-direction:column; gap:2px} .pdp-per b{font-size:13px} .pdp-per span{font-size:11.5px; color:var(--text-3); line-height:1.6}
/* ورقة الربح في الكارت الجانبي (pdsx-) */
.pdsx{border-radius:16px; background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.08); overflow:hidden}
.pdsx-r{display:grid; grid-template-columns:minmax(0,1fr) 74px 74px; gap:6px; align-items:center; padding:8px 12px; font-size:12px; border-top:1px solid rgba(255,255,255,.07)}
.pdsx-r:first-child{border-top:0} .pdsx-r > span{color:#cdb894; line-height:1.4} .pdsx-r > span small{display:block; font-size:10.5px; color:#9f8b70}
.pdsx-r > b{text-align:center; color:#fff; font-size:13px; display:flex; flex-direction:column; align-items:center; justify-content:center} .pdsx-r > b i{font-style:normal; font-size:10.5px; font-weight:800; opacity:.85}
.pdsx-h{background:rgba(255,255,255,.04)} .pdsx-h > b{font-size:11.5px; color:#e3c38b}
#pdp-chart circle{transition:stroke-width .15s, opacity .15s} #pdp-chart .dn-leg > div{cursor:pointer; padding:3px 6px; border-radius:8px; transition:background .15s} #pdp-chart .dn-leg > div.on{background:#f6f1ea}
#pdp-chart .dn-c small{line-height:1.5; max-width:120px} #pdp-chart.pdp-sel .dn-c b{font-size:20px}
.pdsx-m > b{color:#cdb894; font-weight:600}
.pdsx-g{background:rgba(127,224,166,.06)} .pdsx-n{background:rgba(227,195,139,.1)} .pdsx-n > span{color:#f3e7d6; font-weight:800}
.pdsx-r > b.ok{color:#7fe0a6} .pdsx-r > b.bad{color:#ff9ca1}
.pdsx-f{display:flex; gap:6px; align-items:center; padding:8px 12px; font-size:10.5px; color:#9f8b70; border-top:1px solid rgba(255,255,255,.07)} .pdsx-f svg{width:12px; height:12px; flex:none}
.pdp-top{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px}
.pdp-hint{grid-column:1 / -1; color:var(--text-2); background:#f6f1ea; border-radius:14px; padding:12px 14px; display:flex; gap:8px; align-items:center; font-size:13px} .pdp-hint svg{width:16px; height:16px; flex:none}
.pdp-c{position:relative; display:flex; flex-direction:column; gap:2px; padding:14px 16px; border-radius:18px; border:1px solid #eee4d6; background:#fff; min-width:0}
.pdp-hd{display:flex; align-items:center; gap:8px; margin-bottom:6px}
.pdp-c .pdp-i{flex:none; width:30px; height:30px; border-radius:10px; display:grid; place-items:center; background:#f6f1ea; color:#17734b} .pdp-c .pdp-i svg{width:16px; height:16px}
.pdp-c small{font-size:12.5px; font-weight:700; color:var(--text-2); line-height:1.5} .pdp-c b{font-size:26px; line-height:1.3} .pdp-c em{font-style:normal; font-size:12px; font-weight:800; color:var(--text-3)}
.pdp-c p{margin:6px 0 0; font-size:11.5px; color:var(--text-3); line-height:1.6}
.pdp-c.ok b{color:#197c51} .pdp-c.bad{border-color:#f5d0d2; background:#fffafa} .pdp-c.bad b{color:#c8323a}
.pdp-c.dk{background:linear-gradient(165deg,#145236,#0c2219); border-color:transparent} .pdp-c.dk small{color:#e7d6bd} .pdp-c.dk p,.pdp-c.dk em{color:#cdb894} .pdp-c.dk b{color:#fff} .pdp-c.dk .pdp-i{background:rgba(227,195,139,.16); color:#e3c38b}
.pdp-c.dk.ok b{color:#7fe0a6} .pdp-c.dk.bad b{color:#ff9ca1}
.pdp-ch{padding:14px; border-radius:18px; border:1px solid #eee4d6; background:#fff; display:flex; flex-direction:column; gap:10px} .pdp-ch .pd-lbl{margin:0}
.pdn{padding:14px; border-radius:18px; border:1px solid #eadcc6; background:linear-gradient(180deg,#fffaf2,#fff); display:flex; flex-direction:column; gap:12px}
.pdn-h{display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:8px} .pdn-h .pd-lbl{margin:0}
.pdn-pct{font-size:12.5px; font-weight:700; padding:5px 12px; border-radius:999px; background:#fdf3e1; color:#8a5a1c} .pdn-pct b{font-size:14px}
.pdn-src{display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:8px}
.pdn-src > div{display:flex; flex-direction:column; padding:10px 12px; border-radius:14px; background:#fff; border:1px solid #f0e6d8; min-width:0}
.pdn-src small{font-size:11.5px; color:var(--text-3)} .pdn-src b{font-size:16px} .pdn-src em{font-style:normal; font-size:11px; color:var(--text-3); line-height:1.5}
.pdn-src .pdn-tot{background:#145236; border-color:transparent} .pdn-tot small,.pdn-tot em{color:#d8c4a6} .pdn-tot b{color:#fff}
.pdn-rows{display:flex; flex-direction:column; gap:8px}
.pdn-r{display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:18px; align-items:center; padding:10px 14px; border-radius:14px; background:#fff; border:1px solid #eee4d6}
.pdn-r > b{font-size:14px}
.pdn-v,.pdn-v2{display:flex; flex-direction:column; align-items:flex-end; text-align:left; min-width:92px} .pdn-v b,.pdn-v2 b{font-size:16px} .pdn-v small,.pdn-v2 small{font-size:11px; color:var(--text-3)} .pdn-v em,.pdn-v2 em{font-style:normal; font-size:11px; color:var(--text-3)}
.pdn-v2.ok b{color:#197c51} .pdn-v2.bad b{color:#c8323a}
.pdn-r.ok{border-color:#cfe9da} .pdn-r.ok .pdn-v b{color:#197c51} .pdn-r.bad{border-color:#f5d0d2; background:#fffafa} .pdn-r.bad .pdn-v b{color:#c8323a}
.pdn-note{display:flex; gap:7px; align-items:flex-start; font-size:12px; color:var(--text-2); line-height:1.6} .pdn-note svg{width:15px; height:15px; flex:none; margin-top:2px}
.pds-net{display:flex; justify-content:space-between; align-items:center; gap:8px; padding:10px 12px; border-radius:12px; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.1)}
.pds-net > div{display:flex; flex-direction:column} .pds-net small{font-size:11px; color:#cdb894} .pds-net b{font-size:18px; color:#fff}
.pds-net em{font-style:normal; font-size:11.5px; font-weight:800; padding:2px 8px; border-radius:999px; background:rgba(255,255,255,.08)}
.pds-net.ok b,.pds-net.ok em{color:#7fe0a6} .pds-net.bad b,.pds-net.bad em{color:#ff9ca1}
@media (max-width:640px){ .pdp-top{grid-template-columns:1fr} .pdn-r{grid-template-columns:1fr 1fr; gap:8px} .pdn-r > b{grid-column:1 / -1} .pdn-v,.pdn-v2{align-items:flex-start; text-align:right} .pd-p[data-p="price"] .pd-tier{grid-template-columns:1fr} }
@media (max-width:980px){ .pd{grid-template-columns:1fr} .pd-side{position:static; order:-1} .pds-top{display:none} .pd-cost{grid-template-columns:repeat(2,minmax(0,1fr))} .pd-cc.c-tot{grid-column:span 2} }
@media (max-width:640px){
  .pd-tabs{grid-template-columns:repeat(5,minmax(0,1fr)); top:-14px} .pd-tabs button{flex-direction:column; gap:4px; padding:8px 4px; text-align:center} .pd-tx small{display:none} .pd-tx b{font-size:11.5px}
  .pd-src,.pd-g2,.pd-g3{grid-template-columns:1fr} .pd-p{padding:14px}
  .pd-rh{display:none} .pd-r{grid-template-columns:minmax(0,1fr) 34px; grid-template-areas:"n x" "q q" "p c"} .pd-rn{grid-area:n} .pd-rq{grid-area:q} .pd-rp{grid-area:p} .pd-rc{grid-area:c} .pd-rx{grid-area:x}
  .pd-tier{grid-template-columns:1fr 1fr; } .pd-tier .pd-vd{justify-self:end}
}
/* ===== بروفايل المنتج (pv-) ===== */
.pv{display:flex; flex-direction:column; gap:16px}
.pv-hero{display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; padding:18px 20px; border-radius:20px; background:#fff; border:1px solid #eee4d6}
.pv-id{display:flex; align-items:center; gap:14px; min-width:0} .pv-id .pd-av{width:60px; height:60px; font-size:26px; border-radius:18px}
.pv-id h2{margin:4px 0 2px; font-size:21px} .pv-id small{color:var(--text-3); font-size:12.5px}
.pv-src{display:inline-flex; align-items:center; gap:5px; font-size:11.5px; font-weight:700; padding:3px 10px; border-radius:999px; background:#fbf1de; color:#17734b; margin-inline-end:6px} .pv-src svg{width:13px; height:13px}
.pv-src.b{background:#effaf8; color:#3d8178} .pv-src.off{background:#fdecec; color:#c8323a}
.pv-acts{display:flex; gap:8px; flex-wrap:wrap}
.pv-kpis{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px}
.pv-k{display:flex; flex-direction:column; padding:16px; border-radius:18px; background:#fff; border:1px solid #eee4d6}
.pv-k > span{width:36px; height:36px; border-radius:11px; display:grid; place-items:center; background:#f6ead5; color:#17734b; margin-bottom:8px} .pv-k > span svg{width:18px; height:18px}
.pv-k small{font-size:12px; color:var(--text-3)} .pv-k b{font-size:24px; line-height:1.25} .pv-k em{font-style:normal; font-size:11.5px; color:var(--text-3)} .pv-k em i.bad,.bad{color:#c8323a; font-style:normal}
.pv-k.t-good{background:linear-gradient(160deg,#f0faf4,#fff); border-color:#cfe9da} .pv-k.t-good b{color:#197c51} .pv-k.t-good > span{background:#dcf2e5; color:#197c51}
.pv-k.t-bad{background:linear-gradient(160deg,#fff4f4,#fff); border-color:#f5d0d2} .pv-k.t-bad b{color:#c8323a} .pv-k.t-bad > span{background:#fbe1e2; color:#c8323a}
.pv-grid{display:grid; grid-template-columns:minmax(0,1.35fr) minmax(0,1fr); gap:16px; align-items:start} .pv-col{display:flex; flex-direction:column; gap:16px}
.pv-grid3{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; align-items:start}
.pv-card{padding:16px 18px; display:flex; flex-direction:column; gap:12px}
.pv-ch{display:flex; align-items:center; gap:10px} .pv-ch > svg{width:20px; height:20px; color:#b08a52; flex:none} .pv-ch > div{flex:1; display:flex; flex-direction:column} .pv-ch b{font-size:15px} .pv-ch small{font-size:11.5px; color:var(--text-3)}
.pv-ing{display:flex; flex-direction:column; gap:8px}
.pv-i{display:flex; align-items:center; gap:10px; padding:9px 12px; border-radius:14px; background:#fffdfa; border:1px solid #f1e8db}
.pv-ik{flex:none; width:34px; height:34px; border-radius:10px; display:grid; place-items:center; background:#f6ead5; color:#17734b} .pv-ik svg{width:16px; height:16px} .pv-i.k-pack .pv-ik{background:#e6f4ee; color:#2f8f6b}
.pv-in{flex:1; min-width:0; display:flex; flex-direction:column; gap:3px} .pv-in b{font-size:13.5px} .pv-in small{font-size:11.5px; color:var(--text-3)}
.pv-in em{font-style:normal; font-size:10.5px; font-weight:700; padding:1px 7px; border-radius:999px; background:#f1ede8; color:#398564} .pv-in em.bs-last{background:#e9f6ef; color:#197c51} .pv-in em.bs-prep{background:#fdf3e1; color:#a8661c} .pv-in em.bs-none{background:#fdecec; color:#c8323a}
.pv-bar{height:5px; border-radius:5px; background:#f3ece2; overflow:hidden} .pv-bar i{display:block; height:100%; border-radius:5px; background:linear-gradient(90deg,#e3c38b,#b08a52)} .pv-i.k-pack .pv-bar i{background:linear-gradient(90deg,#8fd3b4,#2f8f6b)}
.pv-ic{display:flex; flex-direction:column; align-items:flex-end} .pv-ic b{font-size:14.5px} .pv-ic small{font-size:11px; color:var(--text-3)}
.pv-tot{display:flex; flex-wrap:wrap; gap:8px; padding-top:12px; border-top:1px dashed #e3d6c3}
.pv-tot > div{display:flex; align-items:center; gap:8px; padding:8px 12px; border-radius:12px; background:#f6f1ea; font-size:12.5px} .pv-tot span{display:inline-flex; align-items:center; gap:5px; color:var(--text-2)} .pv-tot svg{width:14px; height:14px; color:#9a7b5c}
.pv-tot > div.t{margin-inline-start:auto; background:#0e4a30; color:#f3dfbd} .pv-tot > div.t span{color:#d8c4a6} .pv-tot > div.t b{color:#fff; font-size:15px}
.pv-bought{display:flex; flex-direction:column; align-items:center; padding:20px; border-radius:16px; background:#f4fcfb} .pv-bought b{font-size:28px; color:#3d8178} .pv-bought small{color:var(--text-3)}
.pv-calc{display:grid; grid-template-columns:1fr 1fr; gap:10px} .pv-calc .inp{font-weight:800; font-size:16px; height:46px}
.pv-qk{display:flex; gap:6px; flex-wrap:wrap}
.pv-res{display:grid; grid-template-columns:1fr 1fr 1.4fr; gap:8px}
.pv-res > div{display:flex; flex-direction:column; padding:12px; border-radius:14px; background:#f6f1ea} .pv-res small{font-size:11.5px; color:var(--text-3)} .pv-res b{font-size:16px}
.pv-res > div.big{background:#0e4a30; color:#f3dfbd} .pv-res > div.big small{color:#d8c4a6} .pv-res > div.big b{font-size:21px; color:#fff} .pv-res > div.big em{font-style:normal; font-size:11px; color:#cdb894}
.pv-res.t-good > div.big{background:linear-gradient(160deg,#197c51,#125639)} .pv-res.t-good > div.big b,.pv-res.t-good > div.big small,.pv-res.t-good > div.big em{color:#fff}
.pv-res.t-bad > div.big{background:linear-gradient(160deg,#c8323a,#8f1f26)} .pv-res.t-bad > div.big b,.pv-res.t-bad > div.big small,.pv-res.t-bad > div.big em{color:#fff}
.pv-be{display:flex; align-items:center; gap:7px; font-size:12.5px; color:var(--text-2); padding:9px 12px; border-radius:12px; background:#fffdfa; border:1px solid #f1e8db} .pv-be svg{width:15px; height:15px; color:#b08a52; flex:none}
.pv-tiers{display:flex; flex-direction:column; gap:7px}
.pv-t{display:grid; grid-template-columns:1fr auto 120px; gap:10px; align-items:center; padding:10px 12px; border-radius:14px; border:1px solid #f1e8db; background:#fffdfa}
.pv-t > div:first-child{display:flex; flex-direction:column} .pv-t small{font-size:11px; color:var(--text-3)} .pv-tr{display:flex; flex-direction:column; align-items:flex-end}
.pv-t.v-good .pv-tr b{color:#197c51} .pv-t.v-bad{background:#fffafa; border-color:#f5d0d2} .pv-t.v-bad .pv-tr b{color:#c8323a}
.pv-wh{display:flex; flex-direction:column; gap:6px} .pv-wh > div{display:flex; justify-content:space-between; padding:9px 12px; border-radius:12px; background:#f6f1ea; font-size:13px} .pv-wh .w-damaged{background:#fdecec; color:#c8323a} .pv-wh .w-rep{background:#fdf3e1}
.pv-sales{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px} .pv-sales > div{display:flex; flex-direction:column; padding:10px; border-radius:12px; background:#f6f1ea} .pv-sales small{font-size:11px; color:var(--text-3)} .pv-sales b{font-size:15px}
.pv-po{display:flex; flex-direction:column; gap:6px} .pv-po a{display:grid; grid-template-columns:auto 1fr auto auto; gap:8px; align-items:center; padding:8px 10px; border-radius:12px; background:#fffdfa; border:1px solid #f1e8db; font-size:12.5px; color:inherit; text-decoration:none} .pv-po a:hover{border-color:#d9c9b1}
.pv-none{padding:16px; text-align:center; color:var(--text-3); font-size:12.5px; border-radius:12px; background:#fffdfa}
@media (max-width:1100px){ .pv-grid{grid-template-columns:1fr} .pv-grid3{grid-template-columns:1fr} }
@media (max-width:760px){ .pv-kpis{grid-template-columns:1fr 1fr} .pv-k b{font-size:19px} .pv-res{grid-template-columns:1fr 1fr} .pv-res > div.big{grid-column:span 2} .pv-hero{padding:14px} .pv-acts .btn{flex:1} }
/* ===== سجل الصنف (ih-) ===== */
.ih-bar{display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:12px 14px; margin-bottom:14px}
.ih-type{display:flex; gap:4px; padding:4px; border-radius:13px; background:#f6f1ea} .ih-type button{display:inline-flex; align-items:center; gap:6px; height:34px; padding:0 12px; border:0; border-radius:10px; background:transparent; font:inherit; font-size:13px; font-weight:700; color:var(--text-2); cursor:pointer} .ih-type svg{width:15px; height:15px}
.ih-type button.on{background:linear-gradient(180deg,#145236,#0c2219); color:#fff} .ih-type button.on svg{color:#e3c38b}
.ih-pick{flex:1; min-width:240px; display:flex; align-items:center; gap:8px} .ih-pick > svg{width:17px; height:17px; color:#b08a52; flex:none} .ih-pick .combo{flex:1} .ih-pick .inp{font-weight:700}
.ih-bar #cw{width:auto; min-width:150px} .ih-dr{display:flex}
.ih-hero{display:grid; grid-template-columns:auto minmax(0,1fr); gap:16px 20px; align-items:center; padding:16px 18px; margin-bottom:12px}
.ih-id{display:flex; align-items:center; gap:12px} .ih-id .pd-av{width:52px; height:52px; font-size:22px; border-radius:16px} .ih-id > div{display:flex; flex-direction:column} .ih-id b{font-size:17px} .ih-id small{font-size:12px; color:var(--text-3)}
.ih-stats{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px}
.ih-stats > div{display:flex; flex-direction:column; padding:10px 12px; border-radius:14px; background:#f6f1ea} .ih-stats small{font-size:11.5px; color:var(--text-3)} .ih-stats b{font-size:19px} .ih-stats em{font-style:normal; font-size:11px; color:var(--text-3)}
.ih-stats .s-now{background:#0e4a30; color:#f3dfbd} .ih-stats .s-now small,.ih-stats .s-now em{color:#cdb894} .ih-stats .s-now b{color:#fff}
.ih-stats .s-in b{color:#197c51} .ih-stats .s-out b{color:#c8323a}
.ih-wh{grid-column:1 / -1; display:flex; flex-wrap:wrap; gap:6px} .ih-wh span{font-size:12px; padding:5px 11px; border-radius:999px; background:#fbf6ee; border:1px solid #f0e2c9} .ih-wh .w-damaged{background:#fdecec; border-color:#f5d0d2} .ih-wh .w-rep{background:#fdf3e1}
.ih-flt{display:flex; gap:6px; flex-wrap:wrap; margin-bottom:10px} .ih-flt .pd-chip{height:32px; font-size:12.5px}
.ih-mt{display:inline-flex; align-items:center; gap:6px; padding:4px 10px; border-radius:999px; font-size:12px; font-weight:700; background:#f1ede8; color:#398564; white-space:nowrap} .ih-mt svg{width:13px; height:13px}
.ih-mt.g-in{background:#e9f6ef; color:#197c51} .ih-mt.g-out{background:#fdecec; color:#c8323a} .ih-mt.g-prod{background:#fbf1de; color:#17734b} .ih-mt.g-cnt{background:#effaf8; color:#3d8178} .ih-mt.g-tr{background:#faeff4; color:#945070} .ih-mt.g-bad{background:#0e4a30; color:#f3dfbd}
.ih-in{color:#197c51} .ih-out{color:#c8323a}
.btn.xs.ih-del{background:#fff4f4; border-color:#f5d0d2; color:#c8323a} .btn.xs.ih-del svg{color:#c8323a} .btn.xs.ih-del:hover{background:#c8323a; color:#fff} .btn.xs.ih-del:hover svg{color:#fff}
.ih-lock{display:inline-grid; place-items:center; width:30px; height:30px; border-radius:9px; color:#c4b6a6} .ih-lock svg{width:15px; height:15px}
@media (max-width:900px){ .ih-hero{grid-template-columns:1fr} .ih-stats{grid-template-columns:1fr 1fr} .ih-pick{min-width:100%} }
/* ===== أمر الإنتاج (po-) ===== */
.po{display:flex; flex-direction:column; gap:14px}
.po-sec{padding:16px 18px; border:1px solid #eee4d6; border-radius:18px; background:#fff; display:flex; flex-direction:column; gap:14px}
.po-hd{display:flex; align-items:center; gap:12px; flex-wrap:wrap} .po-hd > div{flex:1; display:flex; flex-direction:column; min-width:160px} .po-hd b{font-size:15px} .po-hd small{font-size:12px; color:var(--text-3)}
.po-n{flex:none; width:32px; height:32px; border-radius:50%; display:grid; place-items:center; font-weight:800; background:linear-gradient(180deg,#145236,#0c2219); color:#e3c38b}
.po-search{display:flex; align-items:center; gap:8px; width:260px; max-width:100%; padding:0 12px; border:1px solid var(--border); border-radius:12px; background:#fffdfa} .po-search svg{width:16px; height:16px; color:#b08a52; flex:none} .po-search .inp{border:0; background:transparent; padding:0; height:40px; box-shadow:none}
.po-tiles{display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:10px; max-height:300px; overflow:auto; padding:2px}
.po-t{position:relative; display:flex; align-items:center; gap:10px; padding:10px 12px; border:1.5px solid #eee4d6; border-radius:16px; background:#fff; font:inherit; text-align:start; cursor:pointer; transition:border-color .15s, box-shadow .15s}
.po-t .pd-av{width:40px; height:40px; font-size:17px; border-radius:12px}
.po-tx{display:flex; flex-direction:column; min-width:0} .po-tx b{font-size:13.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis} .po-tx small{font-size:11.5px; color:var(--text-3)}
.po-ck{position:absolute; top:-7px; left:-7px; width:22px; height:22px; border-radius:50%; display:none; place-items:center; background:#207f56; color:#fff; box-shadow:0 0 0 3px #fff} .po-ck svg{width:12px; height:12px}
.po-t:hover{border-color:#d9c9b1; box-shadow:0 4px 12px rgba(24,65,47,.07)}
.po-t.on{border-color:#c9a15e; background:#fbf6ee; box-shadow:0 0 0 3px #f6ead5} .po-t.on .po-ck{display:grid}
.po-row{display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,1fr); gap:16px; align-items:start}
.po-qbox > label,.po-side label{display:block; font-size:13px; font-weight:700; margin-bottom:6px}
.po-qin{display:flex; align-items:center; gap:8px} .po-qin .inp{flex:1; height:58px; font-size:24px; font-weight:800; text-align:center}
.po-qin button{flex:none; width:50px; height:58px; border-radius:14px; border:1px solid var(--border); background:#f6f1ea; color:#145236; cursor:pointer; display:grid; place-items:center} .po-qin button svg{width:18px; height:18px}
.po-qin em{font-style:normal; font-size:13px; font-weight:700; color:#17734b; min-width:34px}
.po-qk{display:flex; gap:6px; flex-wrap:wrap; margin-top:10px}
.po-side{display:flex; flex-direction:column; gap:10px} .po-shs{display:flex; gap:8px; flex-wrap:wrap}
.po-shb{display:flex; align-items:center; gap:7px; padding:9px 12px; border:1.5px solid var(--border); border-radius:13px; background:#fff; font:inherit; cursor:pointer} .po-shb svg{width:15px; height:15px; color:#b08a52} .po-shb b{font-size:13px} .po-shb small{font-size:11px; color:var(--text-3)}
.po-shb.on{border-color:#c9a15e; background:#fbf6ee; box-shadow:0 0 0 3px #f6ead5}
.po-adv{border:1px dashed #e3d6c3; border-radius:14px; padding:0 14px} .po-adv summary{display:flex; align-items:center; gap:7px; cursor:pointer; padding:11px 0; font-size:13px; font-weight:700; color:var(--text-2)} .po-adv summary svg{width:15px; height:15px; color:#b08a52} .po-adv summary small{font-weight:500; color:var(--text-3)}
.po-g{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; padding-bottom:14px} .po-g .wide{grid-column:1 / -1}
.po-sum{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px}
.po-sum > div{display:flex; flex-direction:column; padding:12px; border-radius:14px; background:#f6f1ea} .po-sum small{font-size:11.5px; color:var(--text-3)} .po-sum b{font-size:18px}
.po-sum > div:first-child{background:#0e4a30} .po-sum > div:first-child small{color:#cdb894} .po-sum > div:first-child b{color:#fff}
.po-sum .ok b{color:#197c51} .po-sum .bad b{color:#c8323a}
.po-short{display:flex; gap:10px; align-items:flex-start; padding:12px 14px; border-radius:14px; background:#fff4f4; border:1px solid #f5d0d2} .po-short > svg{width:20px; height:20px; color:#c8323a; flex:none} .po-short div{display:flex; flex-direction:column} .po-short b{color:#c8323a} .po-short span{font-size:12.5px; color:var(--text-2)}
.po-okm{display:flex; align-items:center; gap:8px; padding:10px 14px; border-radius:14px; background:#f0faf4; color:#197c51; font-weight:700; font-size:13px} .po-okm svg{width:17px; height:17px}
.po-nt td{vertical-align:middle} .po-nt tr.short{background:#fffafa}
.po-ik{display:inline-grid; place-items:center; width:26px; height:26px; border-radius:8px; margin-inline-end:8px; vertical-align:middle; background:#f6ead5; color:#17734b} .po-ik svg{width:13px; height:13px} .po-ik.k-pack{background:#e6f4ee; color:#2f8f6b}
.po-acts{display:flex; gap:8px; flex-wrap:wrap}
@media (max-width:860px){ .po-row{grid-template-columns:1fr} .po-g{grid-template-columns:1fr 1fr} .po-sum{grid-template-columns:1fr 1fr} .po-tiles{grid-template-columns:1fr 1fr} .po-search{width:100%} }
@media (max-width:480px){ .po-tiles{grid-template-columns:1fr} .po-g{grid-template-columns:1fr} }

/* ===== v120: إصلاح شبكة الحقول + منتقي المكونات + أمر إنتاج متعدد ===== */
.pd .f,.po .f{grid-column:auto}
.pd-av{font-size:22px; line-height:1}
.pd-r{grid-template-columns:44px minmax(0,1fr) 170px 96px 36px; gap:10px; padding:9px 12px; border-inline-start-width:1px; border-color:#eee4d6; transition:box-shadow .2s, border-color .2s}
.pd-r .pd-av{width:44px; height:44px; font-size:22px}
.pd-r.flash{border-color:#c9a15e; box-shadow:0 0 0 3px #f6ead5}
.pd-rn{flex-direction:column; align-items:flex-start; gap:2px} .pd-rn b{font-size:13.5px; line-height:1.3} .pd-rn small{font-size:11px; color:var(--text-3)}
.pd-rq .inp{height:42px; padding-left:58px; text-align:center}
.pd-rc{display:flex; flex-direction:column; align-items:flex-end; line-height:1.2} .pd-rc b{font-size:15px} .pd-rc small{font-size:10.5px; color:var(--text-3); font-family:var(--font)}
.pd-addb{display:grid; grid-template-columns:auto 1fr; grid-template-rows:auto auto; column-gap:12px; align-items:center; text-align:start; width:100%; padding:12px 14px; border:1.5px dashed #d9c9b1; border-radius:16px; background:#fffdfa; font:inherit; cursor:pointer}
.pd-addb > span{grid-row:span 2; width:38px; height:38px; border-radius:12px; display:grid; place-items:center; background:#0e4a30; color:#e3c38b} .pd-addb > span svg{width:18px; height:18px}
.pd-addb b{font-size:14px} .pd-addb small{font-size:11.5px; color:var(--text-3)} .pd-addb:hover{border-color:#c9a15e; background:#fbf6ee}
.pd-addb[hidden],.pd-pk[hidden]{display:none}
.pd-pk{border:1.5px solid #e3d6c3; border-radius:18px; background:#fffdfa; padding:12px; display:flex; flex-direction:column; gap:10px}
.pd-pkh{display:flex; align-items:center; gap:8px; flex-wrap:wrap} .pd-pkh .po-search{flex:1; min-width:200px; width:auto; background:#fff}
.pd-pkg{display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:8px; max-height:280px; overflow:auto; padding:4px}
.pd-pt{position:relative; display:flex; align-items:center; gap:9px; padding:8px 10px; border:1.5px solid #eee4d6; border-radius:14px; background:#fff; font:inherit; text-align:start; cursor:pointer}
.pd-pt .pd-av{width:38px; height:38px; font-size:19px; border-radius:11px} .pd-pt > span:last-of-type{display:flex; flex-direction:column; min-width:0} .pd-pt b{font-size:12.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis} .pd-pt small{font-size:11px; color:var(--text-3)}
.pd-pt:hover{border-color:#d9c9b1} .pd-pt.on{border-color:#207f56; background:#f0faf4} .pd-pt.on .po-ck{display:grid}
/* الملخص الجانبي */
.pds-stk{display:flex; height:8px; border-radius:8px; overflow:hidden; margin-top:12px; background:rgba(255,255,255,.08)} .pds-stk i{display:block; height:100%}
.pds-lg{display:flex; flex-wrap:wrap; gap:6px 12px; margin-top:8px} .pds-lg span{display:inline-flex; align-items:center; gap:5px; font-size:11px; color:#cdb894} .pds-lg span i{width:8px; height:8px; border-radius:3px} .pds-lg b{color:#fff; font-weight:700}
.pds-hint{display:flex; align-items:flex-start; gap:8px; font-size:12.5px; line-height:1.6; padding:12px; border-radius:14px; background:rgba(255,255,255,.06); color:#e7d6bd} .pds-hint svg{width:16px; height:16px; flex:none; margin-top:3px; color:#e3c38b}
.pds-100.t-bad{background:rgba(200,50,58,.2); color:#ffb8bc}
.pds-tiers{padding-top:12px; border-top:1px solid rgba(255,255,255,.1)} .pds-tiers > small{font-size:11px; color:#b8a48a} .pds-tiers b i{font-style:normal; font-weight:500; color:#9c8a74; font-size:11.5px}
/* أمر الإنتاج */
.po-dt{display:flex; align-items:center; gap:8px} .po-dt label{font-size:12.5px; font-weight:700; color:var(--text-2)} .po-dt .inp{width:170px}
.po-t.norec{border-style:dashed} .po-t.norec small em{font-style:normal; color:#a8661c}
.po-lines{display:flex; flex-direction:column; gap:10px}
.po-none{display:flex; align-items:center; justify-content:center; gap:8px; padding:20px; border:1.5px dashed #e3d6c3; border-radius:16px; color:var(--text-3); font-size:13px} .po-none svg{width:18px; height:18px; color:#c9a15e}
.po-l{border:1px solid #eee4d6; border-radius:16px; background:#fffdfa; padding:12px 14px; display:flex; flex-direction:column; gap:10px}
.po-lh{display:flex; align-items:center; gap:10px} .po-lh .pd-av{width:42px; height:42px} .po-lh > div{flex:1; display:flex; flex-direction:column} .po-lh b{font-size:14.5px} .po-lh small{font-size:11.5px; color:var(--text-3)} .po-lh small em{font-style:normal; color:#a8661c}
.po-lb{display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); gap:14px; align-items:start}
.po-lqw .po-qin .inp{height:50px; font-size:20px} .po-lqw .po-qin button{height:50px; width:46px}
.po-lsw > label{display:block; font-size:12.5px; font-weight:700; margin-bottom:6px; color:var(--text-2)}
.po-tot{display:block; margin-top:6px; font-size:12px; color:#17734b} .po-tot:empty{display:none}
.po-per{display:flex; flex-wrap:wrap; gap:6px} .po-per span{display:inline-flex; align-items:center; gap:7px; padding:5px 10px 5px 6px; border-radius:12px; background:#f6f1ea; font-size:12px} .po-per .pd-av{width:26px; height:26px; font-size:14px; border-radius:8px} .po-per em{font-style:normal; color:var(--text-3)} .po-per i{font-style:normal; font-weight:700; color:#145236}
.po-im{display:inline-flex; align-items:center; gap:8px} .po-im .pd-av{width:30px; height:30px; font-size:16px; border-radius:9px}
.po-short.warn{background:#fdf6e9; border-color:#f3dfb7} .po-short.warn > svg,.po-short.warn b{color:#a8661c}
@media (max-width:760px){ .po-lb{grid-template-columns:1fr} .po-dt{width:100%} .po-dt .inp{flex:1; width:auto}
  .pd-r{grid-template-columns:40px minmax(0,1fr) 34px; grid-template-areas:"a n x" "q q c"} .pd-r .pd-av{grid-area:a; width:40px; height:40px} .pd-rn{grid-area:n} .pd-rq{grid-area:q} .pd-rc{grid-area:c; align-self:center} .pd-rx{grid-area:x}
  .pd-pkg{grid-template-columns:1fr 1fr} }

/* ===== v121: صور المنتجات + تنظيف أوامر الإنتاج ===== */
.pd-av.ph{padding:0; overflow:hidden; background:#f6f1ea} .pd-av.ph img{width:100%; height:100%; object-fit:cover; display:block}
.pt-ic,.pi-ic,.iq-ic{overflow:hidden} .pt-ic img,.pi-ic img,.iq-ic img{width:100%; height:100%; object-fit:cover; display:block; border-radius:inherit}
.pd-photo{display:flex; align-items:center; gap:14px; padding:12px; border:1px solid #eee4d6; border-radius:16px; background:#fffdfa}
.pd-ph{flex:none; width:84px; height:84px; border-radius:18px; overflow:hidden; display:grid; place-items:center; background:#f6ead5; border:1px solid #efe0c6; font-size:40px}
.pd-ph img{width:100%; height:100%; object-fit:cover}
.pd-phx{display:flex; flex-direction:column; gap:3px; min-width:0} .pd-phx b{font-size:14px} .pd-phx small{font-size:11.5px; color:var(--text-3)}
.pd-phb{display:flex; gap:8px; flex-wrap:wrap; margin-top:6px} .pd-phb label{cursor:pointer} .pd-phb [hidden]{display:none}
.wh-pn{display:flex; align-items:center; gap:10px} .wh-pn .pd-av{width:40px; height:40px; font-size:20px; border-radius:12px} .wh-pn > div{display:flex; flex-direction:column; gap:3px; min-width:0}
.wh-tg{border:0; font:inherit; cursor:pointer} .wh-tg:hover{filter:brightness(.95); box-shadow:0 0 0 2px #e3d6c3}
.po-nrb{display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:14px; background:#fdf6e9; border:1px solid #f3dfb7; font-size:12.5px; color:#2e7254; margin-bottom:10px}
.po-nrb > svg{width:17px; height:17px; color:#a8661c; flex:none} .po-nrb span{flex:1}
.sd-list{display:flex; flex-direction:column; gap:7px; max-height:56vh; overflow:auto}
.sd-r{display:flex; align-items:center; gap:10px; padding:8px 10px; border:1px solid #eee4d6; border-radius:14px; background:#fffdfa} .sd-r .pd-av{width:38px; height:38px; font-size:19px; border-radius:11px} .sd-r > b{flex:1; font-size:13.5px}
.sd-seg{display:flex; gap:4px; padding:3px; border-radius:11px; background:#f6f1ea} .sd-seg button{display:inline-flex; align-items:center; gap:5px; height:32px; padding:0 10px; border:0; border-radius:9px; background:transparent; font:inherit; font-size:12.5px; font-weight:700; color:var(--text-2); cursor:pointer} .sd-seg svg{width:14px; height:14px}
.sd-seg button.on[data-s="made"]{background:#0e4a30; color:#f3dfbd} .sd-seg button.on[data-s="bought"]{background:#3d8178; color:#fff}
.sd-all{display:flex; justify-content:flex-end; margin-top:10px}
@media (max-width:560px){ .sd-r{flex-wrap:wrap} .sd-seg{width:100%} .sd-seg button{flex:1; justify-content:center} }

/* ===== v122: فورم المنتج (هيدر بالصورة) + احتياج الخامات مجمّع ===== */
.pd-hero{display:flex; align-items:center; gap:18px; padding:16px; border-radius:18px; background:linear-gradient(135deg,#fbf6ee,#fff); border:1px solid #f0e2c9}
.pd-hero .pd-ph{width:104px; height:104px; border-radius:24px; font-size:50px; box-shadow:0 8px 20px rgba(24,65,47,.12); background:#fff}
.pd-hx{flex:1; min-width:0; display:flex; flex-direction:column; gap:10px}
.pd-hx .pd-name{height:54px; font-size:18px}
.pd-hm{display:flex; align-items:center; gap:8px; flex-wrap:wrap} .pd-hm .pd-code{margin:0} .pd-hm [hidden]{display:none} .pd-hm label{cursor:pointer}
.pd-sc{padding:12px 14px} .pd-si{width:40px; height:40px}
.pd-p{gap:16px}
.pd-tabs button{padding:10px 12px}
@media (max-width:640px){ .pd-hero{flex-direction:column; align-items:stretch; text-align:center} .pd-hero .pd-ph{align-self:center} .pd-hm{justify-content:center} }
/* احتياج الخامات */
.po-ngs{display:flex; flex-direction:column; gap:12px; border:0; overflow:visible}
.po-ng{border:1px solid #eee4d6; border-radius:16px; overflow:hidden; background:#fff}
.po-ngh{display:flex; align-items:center; gap:8px; padding:10px 14px; background:#f6f1ea; font-size:13.5px} .po-ngh svg{width:16px; height:16px; color:#b08a52} .po-ngh span{font-size:11px; font-weight:800; padding:1px 8px; border-radius:999px; background:#fff; color:#17734b} .po-ngh em{margin-inline-start:auto; font-style:normal; font-weight:800; color:#145236}
.po-ng .po-nt{margin:0} .po-ng .po-nt thead th{background:#fffdfa; color:var(--text-3); font-size:11.5px; font-weight:700; border-bottom:1px solid #f1e8db}
.po-ng .po-nt td{padding-top:9px; padding-bottom:9px}
.po-av{display:flex; align-items:center; gap:8px; min-width:200px} .po-avb{flex:1; max-width:110px; height:7px; border-radius:7px; background:#f3ece2; overflow:hidden} .po-avb i{display:block; height:100%; border-radius:7px; background:#22a35a}
.po-nt tr.short .po-avb i{background:#c8323a} .po-av .num{min-width:44px; font-weight:700}
.po-nrb{display:block; padding:0} .po-nrb summary{display:flex; align-items:center; gap:10px; padding:10px 12px; cursor:pointer; list-style:none} .po-nrb summary::-webkit-details-marker{display:none} .po-nrb summary span{flex:1}
.po-nrl{display:flex; flex-wrap:wrap; gap:6px; padding:0 12px 12px}
.po-nrp{display:inline-flex; align-items:center; gap:7px; padding:5px 10px 5px 6px; border:1px solid #f0dcb4; border-radius:12px; background:#fff; font:inherit; font-size:12.5px; cursor:pointer} .po-nrp .pd-av{width:26px; height:26px; font-size:14px; border-radius:8px} .po-nrp em{font-style:normal; font-size:11px; color:#a8661c; display:inline-flex; align-items:center; gap:3px} .po-nrp em svg{width:11px; height:11px} .po-nrp:hover{border-color:#c9a15e}

/* ===== v123: كروت الأصناف في فاتورة الشراء ===== */
.mt-bar{display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:12px}
.mt-tabs{display:flex; gap:4px; padding:4px; border-radius:14px; background:#f6f1ea; flex-wrap:wrap}
.mt-tabs button{display:inline-flex; align-items:center; gap:6px; height:36px; padding:0 12px; border:0; border-radius:11px; background:transparent; font:inherit; font-size:13px; font-weight:700; color:var(--text-2); cursor:pointer}
.mt-tabs svg{width:15px; height:15px; color:#9a7b5c} .mt-tabs em{font-style:normal; font-size:11px; padding:0 7px; border-radius:999px; background:#fff; color:#17734b}
.mt-tabs button.on{background:linear-gradient(180deg,#145236,#0c2219); color:#fff} .mt-tabs button.on svg{color:#e3c38b} .mt-tabs button.on em{background:rgba(255,255,255,.14); color:#f3dfbd}
.mt-search{flex:1; min-width:200px; display:flex; align-items:center; gap:8px; padding:0 12px; border:1px solid var(--border); border-radius:12px; background:#fffdfa} .mt-search svg{width:16px; height:16px; color:#b08a52; flex:none} .mt-search .inp{border:0; background:transparent; box-shadow:none; padding:0; height:40px}
.mt-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(205px,1fr)); gap:8px; max-height:320px; overflow:auto; padding:3px}
.mt{position:relative; display:flex; flex-direction:row; align-items:center; gap:10px; padding:9px 10px; border:1.5px solid #eee4d6; border-radius:16px; background:#fff; font:inherit; text-align:start; cursor:pointer; transition:border-color .15s, box-shadow .15s, transform .1s}
.mt .pd-av{width:44px; height:44px; font-size:22px; border-radius:13px; flex:none}
.mt-tx{flex:1; min-width:0; display:flex; flex-direction:column; gap:2px} .mt-tx b{font-size:13px; line-height:1.3; white-space:nowrap; overflow:hidden; text-overflow:ellipsis} .mt-tx small{font-size:11px; color:var(--text-3); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.mt-tx small i{font-style:normal; font-weight:700; font-size:10px; padding:1px 6px; border-radius:999px; margin-inline-end:4px; background:#f6ead5; color:#17734b}
.mt.k-pack .mt-tx small i{background:#e6f4ee; color:#2f8f6b} .mt.k-prod .mt-tx small i{background:#effaf8; color:#3d8178}
.mt-add{flex:none; width:26px; height:26px; border-radius:9px; display:grid; place-items:center; background:#f6f1ea; color:#9a7b5c; transition:background .15s} .mt-add svg{width:14px; height:14px}
.mt:hover{border-color:#d9c9b1; box-shadow:0 4px 12px rgba(24,65,47,.07); transform:translateY(-1px)} .mt:hover .mt-add{background:#0e4a30; color:#e3c38b}
.mt.in{border-color:#c9a15e; background:#fbf6ee; box-shadow:0 0 0 3px #f6ead5}
.mt em{position:static; flex:none; font-style:normal; font-size:12px; font-weight:800; min-width:30px; height:26px; padding:0 8px; display:grid; place-items:center; border-radius:999px; background:#0e4a30; color:#e3c48d}
.mt-empty{grid-column:1 / -1; display:flex; flex-direction:column; align-items:center; gap:5px; padding:24px; text-align:center; color:var(--text-3); border:1.5px dashed #e3d6c3; border-radius:16px} .mt-empty svg{width:24px; height:24px; color:#c9a15e} .mt-empty b{color:#145236} .mt-empty span{font-size:12px}
@media (max-width:640px){ .mt-grid{grid-template-columns:1fr 1fr} .mt .pd-av{width:36px; height:36px; font-size:18px} .mt-add{display:none} .mt-tabs{width:100%} .mt-tabs button{flex:1; justify-content:center; padding:0 6px} .mt-tabs button span{font-size:11.5px} }

/* ===== v124: فلترة بالشرائح + جدول المخازن ===== */
.wh-fl{display:flex; gap:4px; padding:4px; border-radius:14px; background:#f6f1ea; flex-wrap:wrap}
.wh-fl button{display:inline-flex; align-items:center; gap:6px; height:36px; padding:0 13px; border:0; border-radius:11px; background:transparent; font:inherit; font-size:13px; font-weight:700; color:var(--text-2); cursor:pointer; white-space:nowrap; transition:background .15s}
.wh-fl button svg{width:15px; height:15px; color:#9a7b5c} .wh-fl em{font-style:normal; font-size:11px; min-width:22px; padding:0 7px; border-radius:999px; background:#fff; color:#17734b; text-align:center}
.wh-fl button:hover{background:#fff}
.wh-fl button.on{background:linear-gradient(180deg,#145236,#0c2219); color:#fff; box-shadow:0 4px 10px rgba(12,34,25,.18)} .wh-fl button.on svg{color:#e3c38b} .wh-fl button.on em{background:rgba(255,255,255,.14); color:#f3dfbd}
.wh-tbl tbody tr{transition:background .12s} .wh-tbl tbody tr:hover{background:#fffaf2}
.wh-tbl tbody td{padding-top:12px; padding-bottom:12px; vertical-align:middle}
.wh-tbl .wh-pn b{font-size:14px} .wh-tbl .wh-pn small{font-size:11.5px; display:flex; align-items:center; gap:4px} .wh-tbl .wh-pn small svg{width:12px; height:12px}
.wh-tbl .wh-pn .pd-av{width:44px; height:44px; font-size:22px; border-radius:13px}
.wh-src{display:inline-flex; align-items:center; gap:4px; font-size:11.5px; font-weight:700; padding:2px 10px; border-radius:999px}
.wh-src.m{background:#fbf1de; color:#17734b} .wh-src.b{background:#effaf8; color:#3d8178}
.wh-mg{display:inline-flex; flex-direction:column; align-items:flex-end; line-height:1.25} .wh-mg small{font-size:10.5px; font-weight:800; padding:0 7px; border-radius:999px}
.wh-mg.g b{color:#197c51} .wh-mg.g small{background:#e9f6ef; color:#197c51} .wh-mg.m b{color:#a8661c} .wh-mg.m small{background:#fdf3e1; color:#a8661c} .wh-mg.b b{color:#c8323a} .wh-mg.b small{background:#fdecec; color:#c8323a}
@media (max-width:760px){ .wh-fl{width:100%; overflow-x:auto; flex-wrap:nowrap} .wh-fl button{padding:0 10px} }

/* ===== v125: شرائح الفلترة وزراير Excel/طباعة في صف واحد ===== */
.wh-tbl .toolbar{flex-wrap:wrap; row-gap:10px}
.wh-tbl .toolbar .tb-extra{order:1; flex:0 1 auto; min-width:0}
.wh-tbl .toolbar .grow{order:2}
.wh-tbl .toolbar .tb-btns{order:3; display:flex; gap:8px; flex:none}
.wh-tbl .toolbar .search{order:4; flex:1 1 100%}
.wh-tbl .toolbar .search input{width:100%}
@media (max-width:760px){ .wh-tbl .toolbar .tb-extra{flex:1 1 100%} .wh-tbl .toolbar .grow{display:none} }

/* ===== v126: الموردين • فواتير الشراء • المصروفات ===== */
.sp-av{background:linear-gradient(160deg,hsl(var(--h,215),45%,52%),hsl(var(--h,215),45%,36%))}
.sp-av.lg{width:48px; height:48px; border-radius:15px; font-size:19px}
.sp-card{padding:0; overflow:hidden}
.sp-bar{display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:14px 16px; border-bottom:1px solid var(--border)} .sp-bar .mt-search{flex:1 1 260px}
.sp-vw{display:flex; gap:4px; padding:4px; border-radius:12px; background:#f6f1ea} .sp-vw button{width:36px; height:32px; border:0; border-radius:9px; background:transparent; display:grid; place-items:center; cursor:pointer; color:#9a7b5c} .sp-vw svg{width:16px; height:16px} .sp-vw button.on{background:#0e4a30; color:#e3c38b}
#sp-body{padding:16px} #sp-body .card{box-shadow:none; border:0}
#sp-t .toolbar{padding-top:0}
.sp-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:12px}
.sp-c{display:flex; flex-direction:column; gap:12px; padding:14px; border:1px solid #eee4d6; border-radius:18px; background:#fff; cursor:pointer; transition:border-color .15s, box-shadow .15s, transform .1s; border-top:3px solid #d9c9b1}
.sp-c:hover{border-color:#d9c9b1; box-shadow:0 8px 20px rgba(24,65,47,.08); transform:translateY(-1px)}
.sp-c.due{border-top-color:#c8323a} .sp-c.off{opacity:.6}
.sp-ch{display:flex; align-items:center; gap:10px} .sp-cn{flex:1; min-width:0; display:flex; flex-direction:column} .sp-cn b{font-size:15px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis} .sp-cn small{font-size:12px; color:var(--text-3)}
.sp-st{flex:none; font-size:11.5px; font-weight:800; padding:3px 10px; border-radius:999px} .sp-st.due{background:#fdecec; color:#c8323a} .sp-st.ok{background:#e9f6ef; color:#197c51} .sp-st.nw{background:#f1ede8; color:#398564} .sp-st.cr{background:#effaf8; color:#3d8178}
.sp-cs{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px}
.sp-cs > div{display:flex; flex-direction:column; padding:9px 10px; border-radius:12px; background:#f6f1ea; min-width:0} .sp-cs small{font-size:11px; color:var(--text-3)} .sp-cs b{font-size:15px} .sp-cs b.ok{color:#197c51} .sp-cs b.bad{color:#c8323a} .sp-cs em{font-style:normal; font-size:10.5px; color:var(--text-3); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.sp-pb{height:6px; border-radius:6px; background:#f3ece2; overflow:hidden} .sp-pb i{display:block; height:100%; border-radius:6px; background:linear-gradient(90deg,#7fd1a8,#207f56)}
.sp-ca{display:flex; gap:6px; justify-content:flex-end; padding-top:10px; border-top:1px dashed #eee4d6}
/* فواتير */
.iv-no{display:flex; align-items:center; gap:10px} .iv-no > div{display:flex; flex-direction:column} .iv-no small{font-size:11px; color:var(--text-3)}
.iv-ic{flex:none; width:36px; height:36px; border-radius:11px; display:grid; place-items:center} .iv-ic svg{width:17px; height:17px}
.iv-ic.pur{background:#fbf1de; color:#17734b} .iv-ic.sale{background:#e9f6ef; color:#197c51} .iv-ic.ret{background:#fdecec; color:#c8323a}
.iv-pay{display:flex; flex-direction:column; align-items:flex-start; gap:3px; min-width:110px} .iv-pay small{font-size:11px; color:var(--text-3)}
.iv-pb{width:100%; max-width:120px; height:5px; border-radius:5px; background:#f3ece2; overflow:hidden} .iv-pb i{display:block; height:100%; background:#22a35a}
#tbl .toolbar .wh-fl{flex:0 1 auto}
/* المصروفات */
.ex-quick{display:block; padding:14px 16px; margin-bottom:14px; border:1px solid #eee4d6; border-radius:18px; background:#fff}
.ex-qh{display:flex; align-items:center; gap:8px; margin-bottom:10px} .ex-qh svg{width:16px; height:16px; color:#c9a15e} .ex-qh b{font-size:14px} .ex-qh small{font-size:12px; color:var(--text-3)}
.ex-qg{display:grid; grid-template-columns:repeat(auto-fill,minmax(112px,1fr)); gap:8px}
.ex-qt{display:flex; align-items:center; gap:8px; padding:8px 10px; border:1px solid #eee4d6; border-radius:13px; background:#fffdfa; font:inherit; cursor:pointer; transition:border-color .15s, transform .1s, box-shadow .15s}
.ex-qt > span{flex:none; width:30px; height:30px; border-radius:10px; display:grid; place-items:center; background:#f3ece2; color:#17734b} .ex-qt > span svg{width:15px; height:15px} .ex-qt b{font-size:12.5px; text-align:start; line-height:1.25}
.ex-qt:hover{border-color:#d9c9b1; transform:translateY(-1px); box-shadow:0 4px 10px rgba(24,65,47,.07)}
.ex-qt.t-el > span,.ex-b.t-el .ex-bi{background:#fdf6dd; color:#a8800f} .ex-qt.t-wa > span,.ex-b.t-wa .ex-bi{background:#eaf9f7; color:#2a8075} .ex-qt.t-ga > span,.ex-b.t-ga .ex-bi{background:#fdeee6; color:#c0562a} .ex-qt.t-fu > span,.ex-b.t-fu .ex-bi{background:#fdf3e1; color:#a8661c}
.ex-qt.t-cl > span,.ex-b.t-cl .ex-bi{background:#e9f6ef; color:#197c51} .ex-qt.t-tr > span,.ex-b.t-tr .ex-bi{background:#ecf8f7; color:#3d8178} .ex-qt.t-mt > span,.ex-b.t-mt .ex-bi{background:#f8edf2; color:#904b6b}
.ex-qt.t-ph > span,.ex-b.t-ph .ex-bi{background:#eaf9f7; color:#2a8075} .ex-qt.t-mk > span,.ex-b.t-mk .ex-bi{background:#fcebf3; color:#b03a73} .ex-qt.t-re > span,.ex-b.t-re .ex-bi{background:#f1ede8; color:#398564} .ex-qt.t-ho > span,.ex-b.t-ho .ex-bi{background:#fdf0e6; color:#b5651d}
.ex-grid{display:grid; grid-template-columns:minmax(0,2fr) minmax(280px,1fr); gap:16px; align-items:start}
.ex-by{padding:16px} .ex-byh{display:flex; align-items:center; gap:10px; margin-bottom:12px} .ex-byh > svg{width:20px; height:20px; color:#b08a52} .ex-byh > div{display:flex; flex-direction:column} .ex-byh b{font-size:15px} .ex-byh small{font-size:11.5px; color:var(--text-3)}
.ex-bl{display:flex; flex-direction:column; gap:10px}
.ex-b{display:flex; align-items:center; gap:10px} .ex-bi{flex:none; width:36px; height:36px; border-radius:11px; display:grid; place-items:center; background:#f3ece2; color:#17734b} .ex-bi svg{width:17px; height:17px}
.ex-bt{flex:1; min-width:0; display:flex; flex-direction:column; gap:4px} .ex-bt > div:first-child{display:flex; justify-content:space-between; gap:8px} .ex-bt b{font-size:13px} .ex-bt em{font-style:normal; font-weight:800; font-size:13px} .ex-bt small{font-size:10.5px; color:var(--text-3)}
.ex-bb{height:6px; border-radius:6px; background:#f3ece2; overflow:hidden} .ex-bb i{display:block; height:100%; border-radius:6px; background:linear-gradient(90deg,#e3c38b,#b08a52)}
.ex-amw{position:relative} .ex-amw .inp{height:58px; font-size:26px; font-weight:800; padding-left:70px} .ex-amw span{position:absolute; left:14px; top:50%; transform:translateY(-50%); font-size:13px; font-weight:700; color:var(--text-3)}
.ex-qa{display:flex; gap:6px; flex-wrap:wrap; margin-top:8px} .ex-qa .pd-chip{height:32px; font-size:12.5px}
.ex-cats{grid-template-columns:repeat(auto-fill,minmax(120px,1fr)); gap:10px}
.ex-c{padding:14px 8px; border-radius:16px; border-color:#eee4d6} .ex-c > span{width:44px; height:44px; border-radius:14px} .ex-c > span svg{width:21px; height:21px}
.ex-c.t-ph > span{background:#eaf9f7; color:#2a8075} .ex-c.t-mk > span{background:#fcebf3; color:#b03a73} .ex-c.t-re > span{background:#f1ede8; color:#398564} .ex-c.t-ho > span{background:#fdf0e6; color:#b5651d} .ex-c.t-to > span{background:#eef3f3; color:#3d6b6b}
.ex-c.on > span{background:#0e4a30 !important; color:#e3c38b !important}
@media (max-width:1000px){ .ex-grid{grid-template-columns:1fr} }
@media (max-width:640px){ .sp-grid{grid-template-columns:1fr} .ex-qg{grid-template-columns:1fr 1fr} .sp-cs b{font-size:13.5px} }

/* ===== v127: التسجيل السريع + نافذة المصروف ===== */
.ex-quick{padding:16px 18px}
.ex-qh{margin-bottom:12px}
.ex-qg{display:grid; grid-template-columns:repeat(auto-fill,minmax(96px,1fr)); gap:10px}
.ex-qt{flex-direction:column; justify-content:center; gap:8px; padding:14px 6px 12px; border-radius:16px; background:#fff; min-height:92px; text-align:center}
.ex-qt > span{width:40px; height:40px; border-radius:13px} .ex-qt > span svg{width:19px; height:19px}
.ex-qt b{font-size:12.5px; text-align:center; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%; line-height:1.3}
.ex-qt:hover{border-color:#c9a15e; background:#fffaf2}
.ex-qt:hover > span{transform:scale(1.06)} .ex-qt > span{transition:transform .15s}
/* نافذة المصروف */
.ex-wrap .card{border-radius:18px; border:1px solid #eee4d6; box-shadow:none}
.ex-wrap .card-head{padding:14px 18px 0; border:0} .ex-wrap .card-head h3{font-size:14.5px; display:flex; align-items:center; gap:7px} .ex-wrap .card-head h3 svg{width:16px; height:16px; color:#b08a52}
.ex-wrap .card-body{padding:12px 18px 18px}
.ex-main{display:flex; flex-direction:column; gap:14px}
.ex-cats{grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:8px}
.ex-c{flex-direction:row; justify-content:flex-start; gap:10px; padding:9px 12px; min-height:56px; border-radius:14px; text-align:start}
.ex-c > span{flex:none; width:38px; height:38px; border-radius:12px} .ex-c > span svg{width:18px; height:18px}
.ex-c b{font-size:13px; text-align:start; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.ex-c.on{box-shadow:0 0 0 3px #f6ead5, 0 6px 14px rgba(24,65,47,.08)}
.ex-amw .inp{height:64px; font-size:30px; border-radius:16px; background:#fffdfa}
.ex-amw .inp:focus{background:#fff}
.ex-qa .pd-chip.on{background:linear-gradient(180deg,#145236,#0c2219); color:#fff; border-color:transparent}
@media (max-width:640px){ .ex-cats{grid-template-columns:1fr 1fr} .ex-qg{grid-template-columns:repeat(3,minmax(0,1fr))} }

/* ===== v129: اختيار مخزن تاني من نافذة الصنف ===== */
.iq-alt{display:flex; flex-direction:column; gap:6px; margin-top:8px}
.iq-alt button{display:flex; align-items:center; gap:7px; justify-content:center; width:100%; padding:9px 12px; border:1px solid #cfe9da; border-radius:12px; background:#f0faf4; color:#197c51; font:inherit; font-weight:700; font-size:13px; cursor:pointer}
.iq-alt button svg{width:15px; height:15px} .iq-alt button b{color:#125639} .iq-alt button:hover{background:#dcf2e5}

/* ===== v130: أزرار الفاتورة في القايمة ===== */

/* ===== v131: الخزائن والحسابات • التحويلات • دليل الحسابات • الأصول الثابتة ===== */
.t-own{--c1:#297454; --c2:#e7f4ec}
.fn-own-note{display:flex; gap:6px; align-items:flex-start; margin:10px 0 0; font-size:12.5px; color:#297454; line-height:1.6}
.fn-own-note svg{width:15px; height:15px; flex:none; margin-top:2px}
.fn-own-k{display:flex; gap:12px; align-items:center; background:#e7f4ec; border:1px solid #cfe7d8; border-radius:14px; padding:12px 14px; margin-bottom:12px}
.fn-own-k .fn-own-i{width:38px; height:38px; border-radius:11px; background:#297454; color:#fff; display:grid; place-items:center; flex:none}
.fn-own-k .fn-own-i svg{width:20px; height:20px}
.fn-own-k small{display:block; color:#4d6b5a; font-size:12px}
.fn-own-k b{display:block; font-size:14px; color:#194331}
.fn-own-k em{display:block; font-style:normal; font-size:11.5px; color:#6b8577; margin-top:2px}
.t-cash{--c1:#17734b; --c2:#fbf1de} .t-bank{--c1:#3d8178; --c2:#effaf8} .t-wal{--c1:#b03a73; --c2:#fcebf3} .t-ip{--c1:#904b6b; --c2:#f8edf2} .t-cus{--c1:#a8661c; --c2:#fdf3e1}
.fn-hero{display:grid; grid-template-columns:minmax(220px,.8fr) 2fr; gap:14px; margin-bottom:16px}
.fn-total{display:flex; flex-direction:column; justify-content:center; padding:18px 20px; border-radius:20px; background:linear-gradient(160deg,#145236,#0c2219); color:#f3dfbd} .fn-total small{color:#cdb894} .fn-total b{font-size:30px; color:#fff; line-height:1.25} .fn-total em{font-style:normal; font-size:12px; color:#b8a48a}
.fn-kinds{display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:10px}
.fn-kd{display:flex; align-items:center; gap:10px; padding:14px; border-radius:18px; background:#fff; border:1px solid #eee4d6; border-top:3px solid var(--c1)}
.fn-kd > span{flex:none; width:40px; height:40px; border-radius:12px; display:grid; place-items:center; background:var(--c2); color:var(--c1)} .fn-kd > span svg{width:19px; height:19px}
.fn-kd div{display:flex; flex-direction:column} .fn-kd small{font-size:12px; color:var(--text-3)} .fn-kd b{font-size:18px} .fn-kd em{font-style:normal; font-size:11px; color:var(--text-3)}
.fn-grp{margin-bottom:16px} .fn-gh{display:flex; align-items:center; gap:8px; margin-bottom:10px; font-size:14px; cursor:default} .fn-gh svg{width:17px; height:17px; color:#b08a52} .fn-gh span{font-size:11px; font-weight:800; padding:1px 8px; border-radius:999px; background:#f6f1ea; color:#17734b} .fn-gh small{color:var(--text-3); font-size:12px}
details.fn-grp summary{list-style:none; cursor:pointer} details.fn-grp summary::-webkit-details-marker{display:none}
.fn-cards{display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:10px}
.fn-ac{display:flex; flex-direction:column; gap:6px; padding:14px 16px; border-radius:18px; background:#fff; border:1.5px solid #eee4d6; cursor:pointer; transition:border-color .15s, box-shadow .15s, transform .1s; position:relative; overflow:hidden}
.fn-ac::before{content:''; position:absolute; inset:0 0 auto 0; height:3px; background:var(--c1)}
.fn-ac:hover{box-shadow:0 8px 18px rgba(24,65,47,.08); transform:translateY(-1px)} .fn-ac.on{border-color:var(--c1); box-shadow:0 0 0 3px var(--c2)} .fn-ac.off{opacity:.55}
.fn-ah{display:flex; align-items:center; gap:10px} .fn-ah > div{flex:1; min-width:0; display:flex; flex-direction:column} .fn-ah b{font-size:14.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis} .fn-ah small{font-size:11.5px; color:var(--text-3)}
.fn-ai{flex:none; width:40px; height:40px; border-radius:12px; display:grid; place-items:center; background:var(--c2); color:var(--c1)} .fn-ai svg{width:19px; height:19px}
.fn-ed{width:32px; height:32px; border-radius:10px; border:1px solid #eee4d6; background:#fff; color:#9a7b5c; cursor:pointer; display:grid; place-items:center} .fn-ed svg{width:15px; height:15px} .fn-ed:hover{background:#0e4a30; color:#e3c38b}
.fn-ab{font-size:22px} .fn-ab.bad,.bad{color:#c8323a} .fn-ainfo{font-size:11.5px; color:var(--text-3); min-height:16px}
/* نافذة الحساب */
.fn-f{display:flex; flex-direction:column; gap:12px}
.fn-types{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px}
.fn-ty{display:flex; flex-direction:column; align-items:center; gap:5px; padding:12px 8px; border-radius:16px; border:1.5px solid #eee4d6; background:#fff; font:inherit; cursor:pointer; text-align:center}
.fn-ty > span{width:42px; height:42px; border-radius:13px; display:grid; place-items:center; background:var(--c2); color:var(--c1)} .fn-ty > span svg{width:20px; height:20px} .fn-ty b{font-size:13.5px} .fn-ty small{font-size:10.5px; color:var(--text-3); line-height:1.35}
.fn-ty.on{border-color:var(--c1); box-shadow:0 0 0 3px var(--c2)} .fn-ty.on > span{background:var(--c1); color:#fff}
.fn-sec{display:flex; align-items:center; gap:7px; font-weight:800; font-size:13px; color:#145236} .fn-sec svg{width:16px; height:16px; color:#b08a52}
.fn-g{display:grid; grid-template-columns:1fr 1fr; gap:10px} .fn-g .wide{grid-column:1 / -1} .fn-f .f,.fn-g .f,.fn-tr .f{grid-column:auto}
.fn-name{height:48px; font-weight:800; font-size:15px}
.fn-fund button{flex:1}
/* التحويل */
.fn-tr{display:grid; grid-template-columns:1fr 44px 1fr; gap:10px; align-items:start}
.fn-mid{align-self:center; width:44px; height:44px; border-radius:50%; display:grid; place-items:center; background:#0e4a30; color:#e3c38b} .fn-mid svg{width:20px; height:20px}
.fn-tl{display:flex; flex-direction:column; gap:6px; max-height:300px; overflow:auto; padding:2px}
.fn-tc{display:flex; align-items:center; gap:10px; padding:9px 11px; border-radius:14px; border:1.5px solid #eee4d6; background:#fff; font:inherit; text-align:start; cursor:pointer}
.fn-tc > span{flex:none; width:34px; height:34px; border-radius:10px; display:grid; place-items:center; background:var(--c2); color:var(--c1)} .fn-tc > span svg{width:16px; height:16px}
.fn-tc div{display:flex; flex-direction:column; min-width:0} .fn-tc b{font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis} .fn-tc small{font-size:11.5px; color:var(--text-3)}
.fn-tc.on{border-color:var(--c1); box-shadow:0 0 0 3px var(--c2); background:var(--c2)}
.fn-cus summary{cursor:pointer; font-size:12px; color:var(--text-3); padding:6px 4px} .fn-cus .fn-tc{margin-top:6px}
.fn-sum{display:flex; align-items:center; justify-content:center; gap:14px; margin-top:12px; padding:12px; border-radius:14px; background:#f6f1ea} .fn-sum:empty{display:none} .fn-sum div{display:flex; flex-direction:column; align-items:center} .fn-sum small{font-size:11.5px; color:var(--text-3)} .fn-sum b{font-size:17px} .fn-sum > span svg{width:18px; height:18px; color:#b08a52}
.fn-pill{display:inline-flex; align-items:center; gap:5px; padding:3px 10px; border-radius:999px; background:var(--c2); color:var(--c1); font-size:12px; font-weight:700} .fn-pill svg{width:13px; height:13px}
/* دليل الحسابات */
.ct-k{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-bottom:14px}
.ct-kc{display:flex; align-items:center; gap:10px; padding:14px; border-radius:18px; background:#fff; border:1px solid #eee4d6; border-top:3px solid var(--c1)} .ct-kc > span{width:40px; height:40px; border-radius:12px; display:grid; place-items:center; background:var(--c2); color:var(--c1)} .ct-kc > span svg{width:19px; height:19px} .ct-kc div{display:flex; flex-direction:column} .ct-kc small{font-size:12px; color:var(--text-3)} .ct-kc b{font-size:18px}
.t-as{--c1:#3d8178; --c2:#effaf8} .t-li{--c1:#c8323a; --c2:#fdecec} .t-eq{--c1:#904b6b; --c2:#f8edf2} .t-re{--c1:#197c51; --c2:#e9f6ef} .t-ex{--c1:#a8661c; --c2:#fdf3e1}
.ct-eq{grid-column:1 / -1; display:flex; align-items:center; gap:8px; padding:10px 14px; border-radius:14px; font-size:13px; font-weight:700} .ct-eq svg{width:17px; height:17px} .ct-eq.ok{background:#f0faf4; color:#197c51} .ct-eq.bad{background:#fff4f4; color:#c8323a}
.ct-card{padding:0; overflow:hidden}
.ct-bar{display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:14px 16px; border-bottom:1px solid var(--border)} .ct-bar .mt-search{flex:1 1 240px} .ct-x{display:flex; gap:6px; align-items:center} .ct-x .inp.sm{width:150px; height:36px}
.ct-h,.ct-r{display:grid; grid-template-columns:minmax(0,1fr) 110px 130px 130px 150px; gap:10px; align-items:center; padding:0 16px}
.ct-h{height:42px; background:#0e4a30; color:#f3dfbd; font-size:12.5px; font-weight:700} .ct-h .n,.ct-r .n{text-align:end}
.ct-r{min-height:44px; border-bottom:1px solid #f3ece2; font-size:13.5px}
.ct-r:hover{background:#fffaf2}
.ct-n{display:flex; align-items:center; gap:8px; min-width:0; padding-inline-start:calc(var(--d) * 22px)}
.ct-n a{color:inherit; text-decoration:none; font-weight:600} .ct-n a:hover{color:#17734b; text-decoration:underline} .ct-n small{font-size:11px; color:var(--text-3); white-space:nowrap; overflow:hidden; text-overflow:ellipsis} .ct-n em{font-style:normal; font-size:10.5px; font-weight:800; padding:0 7px; border-radius:999px; background:#f6f1ea; color:#17734b}
.ct-c{flex:none; font-size:12px; color:var(--text-3); min-width:34px}
.ct-tg{flex:none; width:24px; height:24px; border-radius:7px; border:1px solid #eee4d6; background:#fff; display:grid; place-items:center; cursor:pointer; color:#9a7b5c; transition:transform .15s} .ct-tg svg{width:13px; height:13px} .ct-tg.on{transform:rotate(-90deg); background:#0e4a30; color:#e3c38b; border-color:transparent}
.ct-dot{flex:none; width:24px; display:grid; place-items:center} .ct-dot::before{content:''; width:6px; height:6px; border-radius:50%; background:#d9c9b1}
.ct-r.lv1{background:var(--c2); font-size:15px; min-height:52px; border-bottom:1px solid #eee4d6} .ct-r.lv1 b,.ct-r.lv1 a{color:var(--c1); font-weight:800} .ct-r.lv1 .num{font-weight:800}
.ct-r.lv2{background:#fffdfa} .ct-r.lv2 b{font-weight:800}
.ct-r.grp.lv4 b{font-weight:700; color:#398564}
.ct-ty{font-size:11px; font-weight:800; padding:2px 9px; border-radius:999px; background:#fff; color:var(--c1)}
.ct-r .neg{color:#c8323a}
.fn-ai2{flex:none; width:40px; height:40px; border-radius:12px; display:grid; place-items:center; background:#fbf1de; color:#17734b} .fn-ai2 svg{width:19px; height:19px}
@media (max-width:900px){ .fn-hero{grid-template-columns:1fr} .ct-k{grid-template-columns:1fr 1fr} .ct-h,.ct-r{grid-template-columns:minmax(0,1fr) 120px} .ct-h > :nth-child(2),.ct-h > :nth-child(3),.ct-h > :nth-child(4),.ct-r > :nth-child(2),.ct-r > :nth-child(3),.ct-r > :nth-child(4){display:none} }
@media (max-width:640px){ .fn-types{grid-template-columns:1fr 1fr} .fn-g{grid-template-columns:1fr} .fn-tr{grid-template-columns:1fr} .fn-mid{transform:rotate(-90deg); justify-self:center} .ct-n{padding-inline-start:calc(var(--d) * 12px)} }

/* ===== v132: الخزائن والحسابات (كروت زي كروت البنوك) + دليل الحسابات ===== */
.fn-svg{display:inline-grid; place-items:center; flex:none} .fn-svg svg{width:100%; height:100%}
.fn-ty > span .fn-svg,.fn-tc > span .fn-svg{width:20px; height:20px} .fn-sec .fn-svg{width:16px; height:16px; color:#b08a52} .fn-gh .fn-svg{width:18px; height:18px; color:#b08a52} .fn-pill .fn-svg{width:13px; height:13px}
.t-cash,.k-cash{--g1:#1b533b; --g2:#0e4a30; --ac:#e3c38b} .t-bank,.k-bank{--g1:#37766e; --g2:#1d4540; --ac:#b0e9e1} .t-wal,.k-wallet{--g1:#b3263b; --g2:#6e1222; --ac:#ffc2cb} .t-ip,.k-instapay{--g1:#99466d; --g2:#59223c; --ac:#fbcce2} .t-cus,.k-custody{--g1:#a8661c; --g2:#5e380b; --ac:#ffd9a3}
/* الهيرو */
.fn-hero2{display:grid; grid-template-columns:minmax(300px,1.1fr) 1.4fr; gap:14px; margin-bottom:18px}
.fn-tot2{display:flex; flex-direction:column; gap:14px; padding:20px; border-radius:22px; background:radial-gradient(120% 140% at 100% 0%,#206547 0%,#0e4a30 55%,#062015 100%); color:#f3dfbd; box-shadow:0 14px 30px rgba(12,34,25,.25)}
.fn-t2h{display:flex; align-items:center; gap:14px} .fn-t2h .fn-svg{width:50px; height:50px; padding:12px; border-radius:16px; background:rgba(227,195,139,.14); color:#e3c38b}
.fn-t2h div{display:flex; flex-direction:column} .fn-t2h small{font-size:12.5px; color:#cdb894} .fn-t2h b{font-size:32px; color:#fff; line-height:1.2}
.fn-dist{display:flex; height:10px; border-radius:10px; overflow:hidden; background:rgba(255,255,255,.08)} .fn-dist i{display:block; height:100%; background:linear-gradient(90deg,var(--g1),var(--ac))}
.fn-leg{display:flex; flex-wrap:wrap; gap:6px 14px} .fn-leg span{display:inline-flex; align-items:center; gap:6px; font-size:11.5px; color:#cdb894} .fn-leg i{width:9px; height:9px; border-radius:3px; background:var(--ac)} .fn-leg b{color:#fff}
.fn-kinds2{display:grid; grid-template-columns:1fr 1fr; gap:10px}
.fn-kd2{display:flex; align-items:center; gap:12px; padding:14px 16px; border-radius:18px; background:#fff; border:1px solid #eee4d6}
.fn-kd2 > .fn-svg{width:46px; height:46px; padding:11px; border-radius:14px; background:linear-gradient(160deg,var(--g1),var(--g2)); color:var(--ac)}
.fn-kd2 div{display:flex; flex-direction:column} .fn-kd2 small{font-size:12px; color:var(--text-3)} .fn-kd2 b{font-size:19px} .fn-kd2 em{font-style:normal; font-size:11px; color:var(--text-3)}
/* كروت الحسابات */
.fn-cards{grid-template-columns:repeat(auto-fill,minmax(270px,1fr)); gap:14px}
.fn-bc{position:relative; display:flex; flex-direction:column; gap:6px; min-height:168px; padding:16px 18px; border-radius:20px; color:#fff; cursor:pointer; overflow:hidden;
  background:linear-gradient(135deg,var(--g1) 0%,var(--g2) 100%); box-shadow:0 10px 22px rgba(12,34,25,.16); transition:transform .15s, box-shadow .15s}
.fn-bc::after{content:''; position:absolute; width:220px; height:220px; border-radius:50%; left:-70px; bottom:-120px; background:rgba(255,255,255,.07); pointer-events:none}
.fn-bc::before{content:''; position:absolute; width:140px; height:140px; border-radius:50%; left:40px; top:-80px; background:rgba(255,255,255,.05); pointer-events:none}
.fn-bc:hover{transform:translateY(-2px); box-shadow:0 16px 30px rgba(12,34,25,.22)}
.fn-bc.on{outline:3px solid var(--ac); outline-offset:3px} .fn-bc.off{filter:grayscale(.6); opacity:.7}
.fn-bch{display:flex; align-items:center; gap:10px; position:relative; z-index:1} .fn-bch > .fn-svg{width:40px; height:40px; padding:9px; border-radius:12px; background:rgba(255,255,255,.14); color:var(--ac)}
.fn-bct{flex:1; min-width:0; font-size:11.5px; color:rgba(255,255,255,.75); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.fn-bc .fn-ed{background:rgba(255,255,255,.14); border-color:transparent; color:#fff} .fn-bc .fn-ed:hover{background:#fff; color:var(--g2)}
.fn-bcn{position:relative; z-index:1; font-size:15.5px; margin-top:6px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.fn-bcno{position:relative; z-index:1; font-size:13.5px; letter-spacing:1.5px; color:rgba(255,255,255,.8); min-height:18px; text-align:start}
.fn-bcb{position:relative; z-index:1; margin-top:auto; display:flex; flex-direction:column} .fn-bcb small{font-size:11px; color:rgba(255,255,255,.65)} .fn-bcb b{font-size:24px; line-height:1.2} .fn-bcb b.bad{color:#ffb3b8}
.fn-bcip{position:absolute; z-index:1; left:16px; bottom:16px; font-size:11px; padding:3px 9px; border-radius:999px; background:rgba(255,255,255,.14)}
/* لوحة حركات الحساب */
#mov{padding:0; overflow:hidden}
.fn-mh{display:flex; align-items:center; gap:12px; flex-wrap:wrap; padding:16px 18px; background:linear-gradient(135deg,var(--g1),var(--g2)); color:#fff}
.fn-mh > .fn-svg{width:44px; height:44px; padding:10px; border-radius:13px; background:rgba(255,255,255,.14); color:var(--ac)} .fn-mh > div:nth-child(2){display:flex; flex-direction:column} .fn-mh small{font-size:11.5px; color:rgba(255,255,255,.7)} .fn-mh b{font-size:16px}
.fn-mst{margin-inline-start:auto; display:flex; gap:8px; flex-wrap:wrap} .fn-mst > div{display:flex; flex-direction:column; padding:8px 12px; border-radius:12px; background:rgba(255,255,255,.1); min-width:96px} .fn-mst b{font-size:15px} .fn-mst .in b{color:#9fe0b8} .fn-mst .out b{color:#ffb3b8} .fn-mst .cl{background:rgba(255,255,255,.2)}
#mov .toolbar{border-bottom:1px solid var(--border)}
/* دليل الحسابات */
.ct-card{border-radius:20px}
.ct-h{position:sticky; top:0; z-index:2}
.ct-r{position:relative} .ct-r:nth-child(even):not(.lv1):not(.lv2){background:#fffdfa}
.ct-n::before{content:''; position:absolute; inset-inline-start:calc(var(--d) * 22px + 4px); top:0; bottom:0; width:0; border-inline-start:1px dashed #e8dccb; opacity:calc(var(--d) * 1)}
.ct-r.lv1 .ct-n::before{display:none}
.ct-ri{flex:none; width:30px; height:30px; border-radius:9px; display:grid; place-items:center; background:#fff; color:var(--c1)} .ct-ri svg{width:16px; height:16px}
.ct-r.lv1{border-inline-start:4px solid var(--c1)}
.ct-side{display:block; font-size:10px; font-weight:700; color:var(--text-3)}
.ct-r .n b{font-size:13.5px}
.ct-kc{border-radius:18px} .ct-kc b{font-size:19px}
@media (max-width:900px){ .fn-hero2{grid-template-columns:1fr} }
@media (max-width:560px){ .fn-kinds2{grid-template-columns:1fr 1fr} .fn-kd2{padding:12px} .fn-kd2 > .fn-svg{width:38px; height:38px; padding:9px} .fn-mst{margin-inline-start:0; width:100%} .fn-mst > div{flex:1; min-width:0} }

/* ===== v133: كروت الحسابات جنب بعض ===== */
#fn-a .fn-cards{display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:14px; width:100%}
#fn-a .fn-grp{width:100%}
@media (min-width:1200px){ #fn-a .fn-cards{grid-template-columns:repeat(4,minmax(0,1fr))} }
@media (max-width:560px){ #fn-a .fn-cards{grid-template-columns:1fr} }

/* ===== v134: مركز التقارير ===== */
.rp-hero{display:flex; align-items:center; gap:14px; flex-wrap:wrap; padding:16px 18px; margin-bottom:18px; border-radius:20px; background:radial-gradient(120% 140% at 100% 0%,#206547 0%,#0e4a30 60%,#062015 100%); color:#f3dfbd}
.rp-hi{width:48px; height:48px; border-radius:15px; display:grid; place-items:center; background:rgba(227,195,139,.15); color:#e3c38b} .rp-hi svg{width:23px; height:23px}
.rp-hero > div:nth-child(2){display:flex; flex-direction:column; flex:1; min-width:200px} .rp-hero b{font-size:18px; color:#fff} .rp-hero small{font-size:12px; color:#cdb894}
.rp-hero .mt-search{flex:0 1 340px; background:rgba(255,255,255,.95)}
.rp-sec{margin-bottom:20px} .rp-sh{display:flex; align-items:center; gap:9px; margin-bottom:10px} .rp-sh > span{width:32px; height:32px; border-radius:10px; display:grid; place-items:center; background:var(--c2); color:var(--c1)} .rp-sh > span svg{width:16px; height:16px}
.rp-sh b{font-size:15.5px} .rp-sh em{font-style:normal; font-size:11px; font-weight:800; padding:1px 8px; border-radius:999px; background:var(--c2); color:var(--c1)}
.rp-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:10px}
.rp-c{display:flex; flex-direction:column; gap:10px; padding:14px; border-radius:18px; background:#fff; border:1px solid #eee4d6; border-top:3px solid var(--c1); transition:box-shadow .15s, transform .1s}
.rp-c:hover{box-shadow:0 8px 20px rgba(24,65,47,.08); transform:translateY(-1px)}
.rp-cl{display:flex; align-items:flex-start; gap:11px; color:inherit; text-decoration:none} .rp-cl > div{display:flex; flex-direction:column; gap:2px; min-width:0} .rp-cl b{font-size:14.5px} .rp-cl small{font-size:12px; color:var(--text-3); line-height:1.5}
.rp-ci{flex:none; width:42px; height:42px; border-radius:13px; display:grid; place-items:center; background:var(--c2); color:var(--c1)} .rp-ci svg{width:20px; height:20px}
.rp-ca{display:flex; gap:6px; justify-content:flex-end; padding-top:10px; border-top:1px dashed #eee4d6}
@media (max-width:640px){ .rp-grid{grid-template-columns:1fr} .rp-hero .mt-search{flex:1 1 100%} }

/* ===== v135: هيدر الـPDF من غير تداخل ===== */
.pdf-hd2 .ph-m{white-space:nowrap; min-width:150px}
.pdf-hd2 .ph-m span{gap:8px} .pdf-hd2 .ph-m b{font-size:11px}
.pdf-hd2 .ph-t p{font-size:11px; color:#f0d7a6; direction:rtl}

/* ===== v137: سجل العمليات + سلة المحذوفات ===== */
.au-a{display:inline-flex; align-items:center; gap:6px; padding:4px 10px; border-radius:999px; font-size:12px; font-weight:700; background:#f1ede8; color:#398564; max-width:280px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap} .au-a svg{width:13px; height:13px; flex:none}
.au-a.a-add{background:#e9f6ef; color:#197c51} .au-a.a-edit{background:#fdf3e1; color:#a8661c} .au-a.a-del{background:#fdecec; color:#c8323a} .au-a.a-auth{background:#effaf8; color:#3d8178}
.au-d{display:block; max-width:380px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.au-det{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-bottom:12px} .au-det > div{display:flex; flex-direction:column; padding:10px 12px; border-radius:12px; background:#f6f1ea} .au-det label{font-size:11px; color:var(--text-3)} .au-det b{font-size:13px}
.au-pre{margin:0; padding:12px 14px; border-radius:12px; background:#0e4a30; color:#f3dfbd; font-size:12px; direction:ltr; text-align:left; white-space:pre-wrap; word-break:break-word; max-height:50vh; overflow:auto}
#tbl .wh-fl{flex:0 1 auto}
@media (max-width:640px){ .au-det{grid-template-columns:1fr} .au-d{max-width:200px} }

/* v140: تاريخ آخر شراء لكل مكوّن */
.pv-lp{display:inline-flex; align-items:center; gap:4px; font-size:10.5px; color:var(--text-3)} .pv-lp svg{width:11px; height:11px} .pv-lp.bad{color:#c8323a; font-weight:700}

/* ===== v141: خط السير للمندوب + المرتجع في نفس الزيارة ===== */
.rt-wait,.rt-start{display:flex; flex-direction:column; align-items:center; text-align:center; gap:8px; padding:34px 20px; margin-top:14px; border-radius:22px; background:#fff; border:1px solid #eee4d6}
.rt-wi,.rt-si{width:72px; height:72px; border-radius:22px; display:grid; place-items:center; margin-bottom:6px} .rt-wi svg,.rt-si svg{width:34px; height:34px}
.rt-wi{background:#fdf3e1; color:#a8661c} .rt-si{background:linear-gradient(160deg,#145236,#0c2219); color:#e3c38b}
.rt-wait b,.rt-start > b{font-size:19px} .rt-wait small,.rt-start > small{font-size:13px; color:var(--text-3); max-width:420px; line-height:1.7}
.rt-wa{display:flex; gap:8px; flex-wrap:wrap; justify-content:center; margin-top:10px}
.rt-prev{display:flex; flex-wrap:wrap; gap:6px; justify-content:center; margin:8px 0 4px; max-width:560px} .rt-prev span{display:inline-flex; align-items:center; gap:6px; padding:5px 11px 5px 6px; border-radius:999px; background:#f6f1ea; font-size:12.5px}
.rt-prev i{font-style:normal; width:20px; height:20px; border-radius:50%; display:grid; place-items:center; background:#0e4a30; color:#e3c38b; font-size:11px; font-weight:800} .rt-prev .more{background:#0e4a30; color:#f3dfbd}
.rt-go{height:56px; padding:0 34px; font-size:17px; border-radius:16px; margin-top:8px}
.rt-card .card-body{display:flex; flex-direction:column; gap:10px}
.rt-seg{display:grid; grid-template-columns:1fr 1fr; gap:6px; padding:4px; border-radius:14px; background:#f6f1ea}
.rt-seg button{display:inline-flex; align-items:center; justify-content:center; gap:6px; height:42px; border:0; border-radius:11px; background:transparent; font:inherit; font-weight:700; font-size:14px; color:var(--text-2); cursor:pointer} .rt-seg svg{width:16px; height:16px}
.rt-seg button.on{background:#0e4a30; color:#fff} .rt-seg button.on svg{color:#e3c38b}
.rt-rows{display:flex; flex-direction:column; gap:8px}
.rt-r{display:grid; grid-template-columns:minmax(0,1fr) 100px auto 80px 34px; gap:8px; align-items:center; padding:8px; border:1px solid #eee4d6; border-radius:14px; background:#fffdfa}
.rt-cond{display:flex; gap:4px} .rt-cond button{display:inline-flex; align-items:center; gap:4px; height:38px; padding:0 10px; border:1px solid var(--border); border-radius:10px; background:#fff; font:inherit; font-size:12.5px; font-weight:700; cursor:pointer; color:var(--text-2)} .rt-cond svg{width:13px; height:13px}
.rt-cond button.on.bad{background:#fdecec; border-color:#f5c2c5; color:#c8323a} .rt-cond button.on.ok{background:#e9f6ef; border-color:#bfe3cf; color:#197c51}
.rt-v{text-align:end; font-weight:800} .rt-x{width:34px; height:34px; border-radius:10px; border:0; background:transparent; color:#b4a493; cursor:pointer; display:grid; place-items:center} .rt-x svg{width:15px; height:15px} .rt-x:hover{background:#fdecec; color:#c8323a}
.rt-sum{display:flex; flex-direction:column; gap:4px; font-size:13px} .rt-sum:empty{display:none} .rt-sum span{padding:8px 12px; border-radius:12px; background:#f6f1ea} .rt-sum .bad{background:#fdecec; color:#c8323a; font-weight:700}
@media (max-width:640px){ .rt-r{grid-template-columns:1fr 90px 34px; grid-template-areas:"p q x" "c c v"} .rt-r select{grid-area:p} .rt-r input{grid-area:q} .rt-r .rt-x{grid-area:x} .rt-r .rt-cond{grid-area:c} .rt-r .rt-v{grid-area:v; align-self:center} }

/* v142 — فواتير المناديب المستنية التسوية */
.db-ac-h{font-size:12px;font-weight:700;color:var(--muted);display:flex;align-items:center;gap:6px;margin:10px 2px 4px}
.db-ac-h svg{width:14px;height:14px}
.db-ac.rc{opacity:.85}
.db-ac.pend{background:#fff7e6;border:1px dashed #f0b44c;border-radius:12px;text-decoration:none;color:inherit;margin-top:8px}
.db-ac.pend .db-ac-i{background:#fde7bd;color:#9a5b00}
.pnd-b{display:inline-flex;align-items:center;gap:4px;font-size:11px;font-weight:700;padding:2px 8px;border-radius:999px;background:#fff1d6;color:#8a5200;white-space:nowrap}
.pnd-b svg{width:12px;height:12px}
.cnf-b{display:inline-flex;align-items:center;gap:4px;font-size:11px;font-weight:700;padding:2px 8px;border-radius:999px;background:#e5f6ec;color:#1d7a46;white-space:nowrap}
.se-it .pnd-b{margin-inline-end:6px}
.iv-no .pnd-b{display:flex;width:max-content;margin-top:3px}
.se-inv .se-i b.ret{color:#b4232a}
.se-tot{display:flex;justify-content:space-between;align-items:center;padding:8px 12px;margin-top:6px;border-radius:10px;background:var(--bg2,#f4f8f7);font-size:13px}
.se-tot b{font-size:15px}
.se-all{font-size:12px;margin-inline-start:auto}
.inv-pend-bar{display:flex;align-items:center;flex-wrap:wrap;gap:10px 12px;padding:12px 14px;border-radius:14px;background:#fff7e6;border:1px solid #f1d39a;margin-bottom:12px;font-size:13px;color:#4a2c10}
.inv-pend-bar .ipb-ic{width:36px;height:36px;border-radius:11px;display:grid;place-items:center;background:#fde7bf;color:#a5620a;flex:none} .inv-pend-bar .ipb-ic svg{width:19px;height:19px}
.inv-pend-bar .ipb-n{min-width:38px;height:38px;padding:0 10px;border-radius:12px;display:grid;place-items:center;background:#a5620a;color:#fff;font-size:19px;font-weight:800;flex:none}
.inv-pend-bar .ipb-t{flex:1;min-width:200px;display:flex;flex-direction:column;gap:1px} .inv-pend-bar .ipb-t > b{font-size:14px;color:#3a2208} .inv-pend-bar .ipb-t small{font-size:12px;color:#208056} .inv-pend-bar .ipb-t small b{color:#3a2208;font-weight:800}
.inv-pend-bar .btn{margin-inline-start:auto}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]) .db-ac.pend,:root:not([data-theme="light"]) .inv-pend-bar{background:#0a4029;border-color:#176e48;color:#ffe7b8}:root:not([data-theme="light"]) .inv-pend-bar .ipb-t > b,:root:not([data-theme="light"]) .inv-pend-bar .ipb-t small b{color:#fff}:root:not([data-theme="light"]) .inv-pend-bar .ipb-t small{color:#f3d49a}:root:not([data-theme="light"]) .inv-pend-bar .ipb-ic{background:#135f3e;color:#ffd38a}:root:not([data-theme="light"]) .inv-pend-bar .ipb-n{background:#e0a03a;color:#2a1a08}:root:not([data-theme="light"]) .pnd-b{background:#104c32;color:#ffd38a}}
:root[data-theme="dark"] .db-ac.pend,:root[data-theme="dark"] .inv-pend-bar{background:#0a4029;border-color:#176e48}:root[data-theme="dark"] .inv-pend-bar{color:#ffe7b8}:root[data-theme="dark"] .inv-pend-bar .ipb-t > b,:root[data-theme="dark"] .inv-pend-bar .ipb-t small b{color:#fff}:root[data-theme="dark"] .inv-pend-bar .ipb-t small{color:#f3d49a}:root[data-theme="dark"] .inv-pend-bar .ipb-ic{background:#135f3e;color:#ffd38a}:root[data-theme="dark"] .inv-pend-bar .ipb-n{background:#e0a03a;color:#2a1a08}
:root[data-theme="dark"] .pnd-b{background:#104c32;color:#ffd38a}

/* ---------- خطوط السير الأسبوعية بالمناطق ---------- */
.ws-reps{margin-bottom:12px}
.ws-reps .us-chip{text-decoration:none; color:inherit}
.ws-reps .us-chip.on{background:#0e4a30; border-color:#0e4a30; color:#e3c48d}
.ws-reps .us-chip svg.i{width:15px; height:15px}
.pl-stats .warn{border-color:#f0d2a8; background:#fffaf2} .pl-stats .warn b{color:#b5651d}
.ws-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:12px; margin-bottom:14px}
.ws-day{padding:0; overflow:hidden; display:flex; flex-direction:column}
.ws-day.today{border-color:#d7b98a; box-shadow:0 0 0 3px rgba(184,146,90,.16)}
.ws-day.off{background:#fbf8f3}
.ws-dh{display:flex; align-items:center; gap:8px; padding:12px 14px; border-bottom:1px solid #f1eae0}
.ws-dh > b{font:700 15px 'Readex Pro',var(--font); color:#0e4a30}
.ws-tg{font-size:10.5px; font-weight:700; padding:2px 8px; border-radius:999px; background:#0e4a30; color:#e3c48d}
.ws-dn{font-size:11.5px; color:var(--text-3); margin-inline-start:auto; white-space:nowrap}
.ws-dh .btn{flex:none}
.ws-al{list-style:none; margin:0; padding:6px 8px 10px; display:flex; flex-direction:column; gap:2px}
.ws-al li{display:flex; align-items:center; gap:9px; padding:7px 6px; border-radius:10px}
.ws-al li:hover{background:#faf6f0}
.ws-n{flex:none; width:22px; height:22px; border-radius:50%; display:grid; place-items:center; background:#f3ebdf; color:#17734b; font-size:11px; font-weight:800}
.ws-an{flex:1; min-width:0; display:flex; flex-direction:column; line-height:1.35}
.ws-an b{font-size:13.5px; color:#0b462c; font-weight:600}
.ws-var{font-size:11px; color:#b5651d}
.lnk{border:0; background:none; padding:0; font:inherit; font-weight:700; color:#17734b; text-decoration:underline; cursor:pointer}
.ws-c{flex:none; font-size:11.5px; font-weight:700; color:#197c51; background:#eaf6ef; padding:2px 8px; border-radius:999px}
.ws-c.z{color:var(--text-3); background:#f4f0ea; font-weight:600}
.ws-off{display:flex; align-items:center; gap:8px; padding:18px 14px; color:var(--text-3); font-size:12.5px}
.ws-off svg.i{width:16px; height:16px}
.ws-un{margin-bottom:14px}
.ws-hint{margin:0; padding:10px 16px 0; font-size:12.5px; color:var(--text-3); line-height:1.7}
.ws-ul{display:flex; flex-direction:column; padding:8px 10px 12px}
.ws-u{display:flex; align-items:center; gap:10px; padding:9px 8px; border-bottom:1px dashed #f0e8dc}
.ws-u:last-child{border-bottom:0}
.ws-u > div{flex:1; min-width:0; display:flex; flex-direction:column; line-height:1.5}
.ws-u b{font-size:13.5px; color:#0b462c}
.ws-u small{font-size:11.5px; color:var(--text-3)}
.ws-u small a{color:inherit}
.ws-u > span{font-weight:700; color:#b5651d}
.ws-ta{min-height:180px; line-height:1.9; resize:vertical}
.ws-sug{margin-top:12px} .ws-sug > small{display:block; margin-bottom:6px; font-size:12px; color:var(--text-3)}
.ws-sug .us-chip{height:30px; font-size:12px}
.ws-pg{display:grid; grid-template-columns:1fr 1fr; gap:14px; align-items:start}
.ws-pg .ws-ta{min-height:340px}
.ws-pv{display:flex; flex-direction:column; gap:6px; max-height:420px; overflow:auto}
.ws-pd{padding:9px 11px; border:1px solid #efe6d9; border-radius:12px; background:#fff}
.ws-pd.off{opacity:.55}
.ws-pd b{display:block; font-size:13px; color:#0e4a30; margin-bottom:4px}
.ws-pd span{font-size:12px; color:#20563f; line-height:2}
.ws-pd i{font-style:normal; display:inline-grid; place-items:center; width:18px; height:18px; margin:0 6px 0 2px; border-radius:50%; background:#f3ebdf; color:#17734b; font-size:10px; font-weight:800}
@media (max-width:760px){ .ws-pg{grid-template-columns:1fr} .ws-pg .ws-ta{min-height:220px} .ws-grid{grid-template-columns:1fr} }
/* شريط الخط الأسبوعي في صفحة خط سير اليوم */
.pl-wk{display:flex; align-items:center; gap:12px; padding:12px 14px; margin-bottom:12px; border-radius:16px; background:#fbf6ee; border:1px solid #efe1cc}
.pl-wk > svg.i{width:20px; height:20px; color:#17734b; flex:none}
.pl-wk > div{flex:1; min-width:0; display:flex; flex-direction:column; gap:3px}
.pl-wk b{font-size:13.5px; color:#0e4a30}
.pl-wk span{font-size:12.5px; color:#20563f; line-height:2}
.pl-wk i{font-style:normal; display:inline-grid; place-items:center; width:18px; height:18px; margin-inline-end:4px; border-radius:50%; background:#0e4a30; color:#e3c38b; font-size:10px; font-weight:800}
.pl-wk em{font-style:normal; color:var(--text-3); font-size:11px}
@media (max-width:760px){ .pl-wk{flex-wrap:wrap} .pl-wk .btn{width:100%} }
/* تطبيق المندوب: مناطق النهارده */
.rt-areas{display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:6px; margin:10px 0 4px; max-width:620px}
.rt-areas span{display:inline-flex; align-items:center; gap:6px; padding:5px 10px 5px 6px; border-radius:999px; background:#0e4a30; color:#f3dfbd; font-size:12.5px; font-weight:600}
.rt-areas span i{font-style:normal; width:20px; height:20px; border-radius:50%; display:grid; place-items:center; background:#e3c38b; color:#0e4a30; font-size:11px; font-weight:800}
.rt-areas span em{font-style:normal; font-size:11px; color:#c9ad83}
.rt-ar{color:#b8925a; font-size:13px}
.f-areas{margin:10px 0 12px; padding:10px 12px; border-radius:16px; background:#fff; border:1px solid var(--border)}
.fa-l{display:flex; align-items:center; gap:6px; font-size:12px; font-weight:700; color:#17734b; margin-bottom:8px}
.fa-l svg.i{width:15px; height:15px}
.fa-c{display:flex; gap:6px; overflow-x:auto; padding-bottom:2px; scrollbar-width:thin}
.fa-i{flex:none; display:inline-flex; align-items:center; gap:6px; height:34px; padding:0 11px 0 6px; border-radius:999px; border:1px solid #ebe1d3; background:#faf6f0; font:600 12.5px var(--font); color:#0b462c; cursor:pointer; white-space:nowrap}
.fa-i:first-child{padding:0 12px}
.fa-i i{font-style:normal; width:22px; height:22px; border-radius:50%; display:grid; place-items:center; background:#e9dccb; color:#156743; font-size:11px; font-weight:800}
.fa-i em{font-style:normal; font-size:11px; color:var(--text-3)}
.fa-i.on{background:#0e4a30; border-color:#0e4a30; color:#f3dfbd} .fa-i.on i{background:#e3c38b; color:#0e4a30} .fa-i.on em{color:#c9ad83}
.fa-i.done{border-color:#bfe3cd; background:#eef8f2} .fa-i.done i{background:#22a35a; color:#fff}

/* خط سير اليوم بالمناطق */
.pl-new{display:flex; gap:6px; margin-top:8px} .pl-new .inp{flex:1; min-width:0; height:38px}
.pl-src{font-size:10.5px; font-weight:700; padding:2px 8px; border-radius:999px; background:#f3ebdf; color:#17734b; white-space:nowrap}
.pl-src.day{background:#fff1dc; color:#b5651d}
.pl-note{display:flex; gap:8px; align-items:flex-start; margin:0 14px 10px; padding:9px 11px; border-radius:12px; background:#f7f2ea; font-size:12px; color:#28684c; line-height:1.7}
.pl-note svg.i{width:15px; height:15px; flex:none; margin-top:3px; color:#17734b}
.pl-wkc{display:flex; align-items:center; gap:8px; font-size:12.5px; font-weight:600; color:#20563f; margin-bottom:8px; cursor:pointer}
.pl-save .btn.ghost{margin-top:6px; width:100%}

/* ---------- اختيار منطقة العميل ---------- */
.ap{position:relative}
.ap-t{width:100%; min-height:46px; display:flex; align-items:center; gap:10px; padding:6px 12px; border:1px solid var(--border); border-radius:12px; background:#fff; cursor:pointer; font:inherit; color:var(--text); text-align:start; transition:border-color .15s, box-shadow .15s}
.ap-t:hover:not(:disabled){border-color:#d9c9b2}
.ap.open .ap-t,.ap-t:focus-visible{border-color:var(--gold,#b8925a); box-shadow:0 0 0 4px rgba(184,146,90,.14); outline:0}
.ap.err .ap-t{border-color:#d9534f; box-shadow:0 0 0 4px rgba(217,83,79,.12)}
.ap-t:disabled{background:#faf7f2; cursor:not-allowed}
.ap-ic{flex:none; width:30px; height:30px; border-radius:9px; display:grid; place-items:center; background:#f6efe4; color:#17734b}
.ap-ic svg.i{width:16px; height:16px}
.ap-t.has .ap-ic{background:#0e4a30; color:#e3c48d}
.ap-v{flex:1; min-width:0; display:flex; flex-direction:column; line-height:1.35}
.ap-v b{font-size:14px; color:#0e4a30; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.ap-v small{display:flex; flex-wrap:wrap; align-items:center; gap:4px; margin-top:2px}
.ap-v small i{font-style:normal; font-size:10.5px; font-weight:700; padding:1px 7px; border-radius:999px; background:#f3ebdf; color:#17734b}
.ap-v small em{font-style:normal; font-size:11px; color:var(--text-3); margin-inline-start:4px}
.ap-ph{font-size:13.5px; color:#ad9c88}
.ap-chev{flex:none; width:16px; height:16px; color:#a8957f; transform:rotate(-90deg); transition:transform .2s}
.ap.open .ap-chev{transform:rotate(90deg)}
.ap-p{position:absolute; top:calc(100% + 6px); right:0; left:0; min-width:300px; z-index:90; background:#fff; border:1px solid #ebe3d7; border-radius:16px; box-shadow:0 30px 60px -24px rgba(7,42,27,.45),0 2px 6px rgba(7,42,27,.06); overflow:hidden; animation:tbIn .16s cubic-bezier(.2,.8,.2,1)}
.ap-p[hidden]{display:none}
.ap-h{display:flex; align-items:center; gap:10px; padding:12px 14px; background:linear-gradient(135deg,#0e4a30,#135438)}
.ap-hi{width:32px; height:32px; border-radius:10px; display:grid; place-items:center; background:rgba(227,196,141,.16); color:#e3c48d; flex:none}
.ap-hi svg.i{width:17px; height:17px}
.ap-h > div{display:flex; flex-direction:column; line-height:1.35; min-width:0}
.ap-h b{font-size:13.5px; color:#f3dfbd} .ap-h small{font-size:11px; color:#c9ad83}
.ap-s{display:flex; align-items:center; gap:8px; margin:10px 10px 6px; padding:0 12px; height:40px; border:1px solid var(--border); border-radius:11px; background:#faf6f0}
.ap-s:focus-within{border-color:var(--gold,#b8925a); background:#fff}
.ap-s svg.i{width:16px; height:16px; color:#a8957f; flex:none}
.ap-s input{flex:1; min-width:0; border:0; outline:0; background:none; font:inherit; font-size:13.5px; color:var(--text)}
.ap-days{display:flex; gap:5px; padding:2px 10px 8px; overflow-x:auto; scrollbar-width:none}
.ap-days button{flex:none; height:28px; padding:0 11px; border-radius:999px; border:1px solid #ebe1d3; background:#fff; font:600 12px var(--font); color:#28684c; cursor:pointer}
.ap-days button:hover{background:#faf6f0}
.ap-days button.on{background:#0e4a30; border-color:#0e4a30; color:#e3c48d}
.ap-l{max-height:300px; overflow:auto; padding:0 6px 6px; border-top:1px solid #f3ece2}
.ap-g{position:sticky; top:0; z-index:1; display:flex; align-items:center; gap:6px; padding:9px 8px 5px; background:#fff; font-size:11.5px; font-weight:700; color:#17734b}
.ap-g em{font-style:normal; font-size:10.5px; color:var(--text-3); font-weight:600}
.ap-i{width:100%; display:flex; align-items:center; gap:10px; padding:8px; border:0; border-radius:10px; background:none; cursor:pointer; font:inherit; text-align:start; color:var(--text)}
.ap-i:hover,.ap-i.hi{background:#f8f2e9}
.ap-i.sel{background:#0e4a30} .ap-i.sel .ap-nm{color:#f3dfbd} .ap-i.sel .ap-n{background:#e3c48d; color:#0e4a30} .ap-i.sel .ap-c{background:rgba(227,196,141,.16); color:#e3c48d}
.ap-n{flex:none; width:24px; height:24px; border-radius:50%; display:grid; place-items:center; background:#f3ebdf; color:#17734b; font-size:11px; font-weight:800}
.ap-n svg.i{width:13px; height:13px; stroke-width:3}
.ap-nm{flex:1; min-width:0; display:flex; flex-direction:column; font-size:13.5px; font-weight:600; color:#0b462c; line-height:1.4}
.ap-nm small{font-size:11px; font-weight:500; color:var(--text-3)}
.ap-nm mark{background:#f5e3c4; color:inherit; border-radius:3px; padding:0 1px}
.ap-c{flex:none; font-size:11px; font-weight:700; padding:2px 8px; border-radius:999px; background:#eaf6ef; color:#197c51}
.ap-c.z{background:#f4f0ea; color:var(--text-3); font-weight:600}
.ap-none{display:flex; flex-direction:column; align-items:center; gap:4px; padding:22px 12px; text-align:center; color:var(--text-3)}
.ap-none svg.i{width:20px; height:20px} .ap-none b{font-size:13px; color:#20563f} .ap-none small{font-size:12px}
.ap-f{border-top:1px solid #f3ece2}
.ap-f a{display:flex; align-items:center; justify-content:center; gap:6px; padding:10px; font-size:12.5px; font-weight:700; color:#17734b; text-decoration:none}
.ap-f a:hover{background:#faf6f0}
.ap-f a svg.i{width:15px; height:15px}
.ap-f:empty{display:none}
@media (max-width:860px){ .ap-p{min-width:0} .ap-l{max-height:46vh} }

/* ---------- سند التحصيل / السداد (vch — أسماء مختلفة عن فورمة المنتج .pf) ---------- */
.vch{display:flex; flex-direction:column; gap:14px; width:100%}
.vch-card{display:flex; align-items:center; gap:14px; padding:16px 18px; border-radius:18px; background:linear-gradient(135deg,#0e4a30 0%,#135438 100%); box-shadow:0 14px 30px -18px rgba(7,42,27,.8)}
.vch-av{flex:none; width:50px; height:50px; border-radius:15px; display:grid; place-items:center; font:700 20px 'Readex Pro',var(--font); color:#fff; background:hsl(var(--h,30) 42% 44%); box-shadow:0 0 0 2px rgba(227,196,141,.4)}
.vch-who{flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; line-height:1.4}
.vch-who b{font:700 17px 'Readex Pro',var(--font); color:#fff; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.vch-who span{font-size:12.5px; color:#cdb48f}
.vch-kind{align-self:flex-start; font-size:10.5px; font-weight:700; padding:1px 9px; border-radius:999px; background:rgba(227,196,141,.18); color:#e3c48d}
.vch-bal{flex:none; min-width:130px; padding:10px 14px; border-radius:14px; background:rgba(255,255,255,.07); border:1px solid rgba(227,196,141,.18); display:flex; flex-direction:column; align-items:center; line-height:1.35}
.vch-bal small{font-size:11px; color:#cdb48f} .vch-bal b{font:700 20px 'Readex Pro',var(--font); color:#fff} .vch-bal em{font-style:normal; font-size:11.5px; font-weight:600; color:#cdb48f}
.vch-bal.owe b{color:#ffcf8a}
.vch-amt{display:flex; flex-direction:column; align-items:center; gap:10px; padding:18px 16px 16px; border-radius:18px; background:#fff; border:1px solid #ece4d8}
.vch-amt > label{font-size:12.5px; font-weight:700; color:#8a7764; letter-spacing:.2px}
.vch-ai{display:flex; align-items:baseline; justify-content:center; gap:8px; width:100%; max-width:360px; padding:6px 0 10px; border-bottom:2px solid #eadfce; transition:border-color .15s}
.vch-ai:focus-within{border-color:#b8925a}
.vch-ai input{flex:1; min-width:0; width:100%; border:0; outline:0; background:none; text-align:center; font:700 38px/1.1 'Readex Pro',var(--font); color:#0e4a30; -moz-appearance:textfield; appearance:textfield}
.vch-ai input::-webkit-outer-spin-button,.vch-ai input::-webkit-inner-spin-button{-webkit-appearance:none; margin:0}
.vch-ai input::placeholder{color:#d6cabb}
.vch-ai span{flex:none; font-size:14px; font-weight:700; color:#a8957f}
.vch-quick{display:flex; gap:6px; flex-wrap:wrap; justify-content:center} .vch-quick:empty{display:none}
.vch-quick button{display:inline-flex; align-items:center; gap:6px; height:32px; padding:0 14px; border-radius:999px; border:1px solid #e6d6bd; background:#faf6f0; font:600 12.5px var(--font); color:#17734b; cursor:pointer}
.vch-quick button:hover{background:#f3e9da} .vch-quick button svg.i{width:14px; height:14px}
.vch-sec{display:flex; flex-direction:column; gap:8px}
.vch-l{font-size:12.5px; font-weight:700; color:#2a6e51}
.vch-pm{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px}
.vch-pm button{display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; height:64px; border-radius:14px; border:1px solid #e6dccd; background:#fff; font:600 12.5px var(--font); color:#28684c; cursor:pointer; transition:background .15s, border-color .15s, color .15s}
.vch-pm button svg.i{width:19px; height:19px; color:#a8814a}
.vch-pm button:hover{background:#faf6f0}
.vch-pm button.on{background:#0e4a30; border-color:#0e4a30; color:#f3dfbd; box-shadow:0 10px 20px -14px rgba(7,42,27,.9)} .vch-pm button.on svg.i{color:#e3c48d}
.vch-grid{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 14px}
.vch-f{display:flex; flex-direction:column; gap:6px; min-width:0} .vch-f.wide{grid-column:1 / -1} .vch-f[hidden]{display:none}
.vch-f > label{display:flex; align-items:center; gap:6px; font-size:12.5px; font-weight:700; color:#2a6e51}
.vch-f > label svg.i{width:14px; height:14px; color:#a8814a}
.vch-f .inp{height:46px; border-radius:12px; border-color:#e6dccd; background:#fff}
.vch-f .inp:focus{border-color:#b8925a!important; box-shadow:0 0 0 4px rgba(184,146,90,.14)!important}
.vch-dir{align-self:center; display:inline-flex; align-items:center; gap:6px; border:0; background:none; padding:4px 8px; border-radius:8px; font:600 12px var(--font); color:#9a8a78; cursor:pointer}
.vch-dir svg.i{width:14px; height:14px} .vch-dir:hover{color:#17734b; background:#f3ece2}
.vch-dir.on{color:#b5651d}
.vch-rev .vch-amt{background:#fff8ee; border-color:#f0d2a8} .vch-rev .vch-ai input{color:#b5651d}
@media (max-width:560px){
  .vch-card{flex-wrap:wrap; padding:14px} .vch-bal{flex:1 1 100%; flex-direction:row; justify-content:space-between; gap:8px}
  .vch-pm{grid-template-columns:repeat(2,minmax(0,1fr))} .vch-pm button{height:52px; flex-direction:row}
  .vch-grid{grid-template-columns:1fr} .vch-ai input{font-size:32px}
}

/* فاتورة الشراء: كل صنف في مخزنه */
.pur-wh{flex-direction:row!important; align-items:flex-start; gap:10px; padding:11px 14px; border-radius:12px; background:#faf6f0; border:1px dashed #e6d6bd; font-size:12.5px; line-height:1.8; color:#28684c}
.pur-wh > svg.i{flex:none; width:17px; height:17px; margin-top:4px; color:#a8814a}
.pur-wh b{color:#0b462c}

/* خامة بتتصنع عندنا: المكونات */
.mfr-wrap[hidden]{display:none}
.mfr{margin-top:10px; padding:14px; border-radius:16px; background:#fcf9f4; border:1px solid #efe6d9; display:flex; flex-direction:column; gap:10px}
.mfr[hidden]{display:none}
.mfr-h{display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap}
.mfr-h > div{display:flex; flex-direction:column; line-height:1.4}
.mfr-h b{display:flex; align-items:center; gap:6px; font-size:14px; color:#0e4a30} .mfr-h b svg.i{width:16px; height:16px; color:#a8814a}
.mfr-h small{font-size:11.5px; color:var(--text-3)}
.mfr-y{display:flex; align-items:center; gap:8px; font-size:12.5px; font-weight:700; color:#2a6e51}
.mfr-y .inp{width:96px; height:40px; text-align:center; font-weight:700}
.mfr-y em{font-style:normal; color:#8a7764}
.mfr-l{display:flex; flex-direction:column; gap:8px}
.mfr-r{display:grid; grid-template-columns:24px minmax(0,1fr) 150px 84px 34px; align-items:center; gap:8px; padding:8px; border-radius:12px; background:#fff; border:1px solid #efe6d9}
.mfr-n{width:24px; height:24px; border-radius:50%; display:grid; place-items:center; background:#f3ebdf; color:#17734b; font-size:11px; font-weight:800}
.mfr-pick .combo,.mfr-pick .inp{width:100%}
.mfr-q{display:flex; align-items:center; gap:6px} .mfr-q .inp{min-width:0; text-align:center} .mfr-q span{flex:none; font-size:12px; color:#8a7764; min-width:28px}
.mfr-c{text-align:center; font-size:12.5px; color:#28684c}
.mfr-x{width:34px; height:34px; border:0; border-radius:10px; background:#fbeeec; color:#c0473a; display:grid; place-items:center; cursor:pointer} .mfr-x svg.i{width:15px; height:15px}
.mfr-add{align-self:flex-start; display:inline-flex; align-items:center; gap:6px; height:36px; padding:0 14px; border-radius:11px; border:1px dashed #d9c4a3; background:#fff; font:600 12.5px var(--font); color:#17734b; cursor:pointer}
.mfr-add:hover{background:#f6efe4} .mfr-add svg.i{width:15px; height:15px}
.mfr-sum{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px}
.mfr-sum > div{padding:9px 12px; border-radius:12px; background:#fff; border:1px solid #efe6d9; display:flex; flex-direction:column; line-height:1.35}
.mfr-sum small{font-size:11px; color:var(--text-3)} .mfr-sum b{font:700 16px 'Readex Pro',var(--font); color:#0e4a30}
.mfr-sum .on{background:#0e4a30; border-color:#0e4a30} .mfr-sum .on small{color:#cdb48f} .mfr-sum .on b{color:#e3c48d}
.mfr-e{grid-column:1 / -1; display:flex; align-items:center; gap:6px; font-size:12.5px; color:var(--text-3)} .mfr-e svg.i{width:15px; height:15px}
@media (max-width:640px){ .mfr-r{grid-template-columns:24px minmax(0,1fr) 34px; } .mfr-q{grid-column:2 / 3} .mfr-c{grid-column:3 / 4; grid-row:2} .mfr-sum{grid-template-columns:1fr 1fr} }

/* أمر الإنتاج: خامات بتتصنع عندنا */
.po-mh{display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:16px 0 10px; padding-top:14px; border-top:1px dashed #ece4d8}
.po-mh svg.i{width:17px; height:17px; color:#a8814a} .po-mh b{font-size:14px; color:#0e4a30} .po-mh small{font-size:12px; color:var(--text-3)}
.po-mt{position:relative} .po-mtag{position:absolute; top:6px; left:8px; font-style:normal; font-size:10px; font-weight:700; padding:1px 7px; border-radius:999px; background:#f3ebdf; color:#17734b}

/* ---------- مركز الإشعارات ---------- */
.nfc-tabs{display:flex; align-items:center; gap:6px; margin-bottom:12px}
.nfc-tabs > button[data-t]{display:inline-flex; align-items:center; gap:6px; height:38px; padding:0 14px; border-radius:11px; border:1px solid #ebe1d3; background:#fff; font:600 13px var(--font); color:#28684c; cursor:pointer}
.nfc-tabs > button[data-t] svg.i{width:15px; height:15px}
.nfc-tabs > button[data-t] em{font-style:normal; min-width:20px; height:20px; padding:0 6px; border-radius:10px; display:grid; place-items:center; background:#c0473a; color:#fff; font-size:11px}
.nfc-tabs > button[data-t].on{background:#0e4a30; border-color:#0e4a30; color:#f3dfbd}
.nfc-sp{flex:1}
.nfc-all{display:inline-flex; align-items:center; gap:5px; border:0; background:none; font:600 12px var(--font); color:#17734b; cursor:pointer; padding:6px 8px; border-radius:8px} .nfc-all:hover{background:#f6efe4} .nfc-all svg.i{width:14px; height:14px}
.nfc-set{width:36px; height:36px; border:1px solid #ebe1d3; border-radius:10px; background:#fff; display:grid; place-items:center; cursor:pointer; color:#8a7764} .nfc-set svg.i{width:16px; height:16px}
.nfc-l{display:flex; flex-direction:column; gap:6px; max-height:60vh; overflow:auto}
.nfc-i{position:relative; display:flex; align-items:flex-start; gap:10px; padding:11px 12px; border-radius:14px; border:1px solid #f0e8dc; background:#fff; text-decoration:none; color:inherit}
.nfc-i:hover{background:#faf6f0}
.nfc-i.new{background:#fffaf2; border-color:#efd9b6}
.nfc-ic{flex:none; width:36px; height:36px; border-radius:11px; display:grid; place-items:center; background:#f3ebdf; color:#17734b} .nfc-ic svg.i{width:17px; height:17px}
.nfc-i.new .nfc-ic{background:#0e4a30; color:#e3c48d}
.nfc-tx{flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; line-height:1.45}
.nfc-tx b{font-size:13.5px; color:#0e4a30} .nfc-tx span{font-size:12.5px; color:#28684c} .nfc-tx small{font-size:11px; color:var(--text-3)}
.nfc-dot{position:absolute; top:14px; left:12px; width:9px; height:9px; border-radius:50%; background:#c0473a}
.nfc-empty{display:flex; flex-direction:column; align-items:center; gap:6px; padding:34px 16px; text-align:center; color:var(--text-3)}
.nfc-empty svg.i{width:26px; height:26px; color:#c9b39a} .nfc-empty b{font-size:14px; color:#20563f} .nfc-empty span{font-size:12.5px; max-width:300px; line-height:1.7}
[data-alerts] .dot.nf-new{animation:nfPulse 1.6s ease-in-out infinite}
@keyframes nfPulse{0%,100%{box-shadow:0 0 0 0 rgba(192,71,58,.45)}50%{box-shadow:0 0 0 5px rgba(192,71,58,0)}}
/* إعدادات الإشعارات */
.nfs{display:flex; flex-direction:column; gap:12px}
.nfs-dev{display:flex; align-items:center; gap:12px; flex-wrap:wrap; padding:14px; border-radius:16px; background:#fdf6ec; border:1px solid #f0dcbc}
.nfs-dev.on{background:#eef8f2; border-color:#bfe3cd}
.nfs-di{flex:none; width:42px; height:42px; border-radius:13px; display:grid; place-items:center; background:#b5651d; color:#fff} .nfs-di svg.i{width:20px; height:20px}
.nfs-dev.on .nfs-di{background:#197c51}
.nfs-dev > div:nth-child(2){flex:1; min-width:180px; display:flex; flex-direction:column; line-height:1.5} .nfs-dev b{font-size:14px; color:#0e4a30} .nfs-dev small{font-size:12px; color:#28684c}
.nfs-da{display:flex; gap:6px; flex-wrap:wrap}
.nfs-msg{display:flex; flex-direction:column; gap:4px; padding:10px 12px; border-radius:12px; font-size:12.5px; line-height:1.7} .nfs-msg svg.i{width:15px; height:15px; vertical-align:-3px}
.nfs-msg.ok{background:#eef8f2; color:#197c51} .nfs-msg.bad{background:#fdecea; color:#a8352a} .nfs-msg small{color:inherit; opacity:.85; direction:ltr; text-align:right}
.nfs-h{display:flex; align-items:center; gap:6px; font-size:13px; font-weight:700; color:#2a6e51} .nfs-h svg.i{width:15px; height:15px; color:#a8814a}
.nfs-cats{display:flex; flex-direction:column; gap:6px}
.nfs-c{display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:13px; border:1px solid #efe6d9; background:#fff; cursor:pointer}
.nfs-c input{position:absolute; opacity:0; pointer-events:none}
.nfs-ci{flex:none; width:34px; height:34px; border-radius:10px; display:grid; place-items:center; background:#f3ebdf; color:#17734b} .nfs-ci svg.i{width:16px; height:16px}
.nfs-ct{flex:1; min-width:0; display:flex; flex-direction:column; line-height:1.45} .nfs-ct b{font-size:13.5px; color:#0e4a30} .nfs-ct small{font-size:11.5px; color:var(--text-3)}
.nfs-sw{flex:none; position:relative; width:40px; height:22px; border-radius:11px; background:#ddd2c4; transition:background .15s}
.nfs-sw::after{content:''; position:absolute; top:3px; right:3px; width:16px; height:16px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.2); transition:right .15s}
.nfs-c.on .nfs-sw{background:#197c51} .nfs-c.on .nfs-sw::after{right:21px}
.nfs-adv{border:1px solid #efe6d9; border-radius:13px; background:#fcf9f4; padding:10px 12px} .nfs-adv summary{display:flex; align-items:center; gap:6px; cursor:pointer; font-size:12.5px; font-weight:700; color:#2a6e51} .nfs-adv summary svg.i{width:14px; height:14px}
.nfs-dl{display:flex; flex-direction:column; gap:6px; margin-top:8px} .nfs-dl > div{display:flex; flex-direction:column; padding:8px 10px; border-radius:10px; background:#fff; font-size:12px; line-height:1.5} .nfs-dl b{font-weight:600; direction:ltr; text-align:right} .nfs-dl small{color:var(--text-3)} .nfs-dl .bad{color:#a8352a; direction:ltr}
.nfs-p{font-size:12.5px; line-height:1.8; color:#28684c; margin:8px 0 6px}
.nfs-code{display:block; padding:8px 10px; border-radius:9px; background:#0e4a30; color:#e3c48d; font-size:11.5px; word-break:break-all}

/* شريط «فعّل الإشعارات» */
.nfb{display:flex; align-items:center; gap:12px; margin:12px 18px 0; padding:11px 14px; border-radius:16px; background:linear-gradient(135deg,#0e4a30,#135438); color:#f3dfbd; box-shadow:0 14px 28px -20px rgba(7,42,27,.9); animation:tbIn .2s ease}
.nfb-ic{flex:none; width:38px; height:38px; border-radius:12px; display:grid; place-items:center; background:rgba(227,196,141,.16); color:#e3c48d} .nfb-ic svg.i{width:18px; height:18px}
.nfb-tx{flex:1; min-width:0; display:flex; flex-direction:column; line-height:1.5} .nfb-tx b{font-size:13.5px; color:#fff} .nfb-tx small{font-size:12px; color:#cdb48f}
.nfb .btn{flex:none}
.nfb-x{flex:none; width:32px; height:32px; border:0; border-radius:10px; background:rgba(255,255,255,.08); color:#cdb48f; display:grid; place-items:center; cursor:pointer} .nfb-x svg.i{width:15px; height:15px}
@media (max-width:860px){ .nfb{margin:10px 12px 0; flex-wrap:wrap} .nfb .btn{order:3; width:100%} }

/* ===== تحميل عربية (lvx) ===== */
.lvx{display:flex; flex-direction:column; gap:12px}
.lvx-head{display:flex; gap:10px; align-items:stretch; flex-wrap:wrap}
.lvx-rep{position:relative; display:flex; align-items:center; gap:10px; flex:1 1 260px; padding:8px 12px 8px 36px; border-radius:16px; background:#fff; border:1.5px solid #e9dcc8; cursor:pointer; transition:border-color .15s,box-shadow .15s}
.lvx-rep:focus-within,.lvx-rep:hover{border-color:#c79a5c; box-shadow:0 0 0 4px rgba(199,154,92,.12)}
.lvx-chev{position:absolute; inset-inline-end:16px; top:50%; width:8px; height:8px; margin-top:-6px; border-right:1.8px solid #9a7b5c; border-bottom:1.8px solid #9a7b5c; transform:rotate(45deg); pointer-events:none}
.lvx-av{flex:none; width:40px; height:40px; border-radius:13px; display:grid; place-items:center; font-weight:800; font-size:18px; color:#0e4a30; background:linear-gradient(135deg,#ecd09d,#c08d4f)}
.lvx-rep-t{display:flex; flex-direction:column; min-width:0; flex:1}
.lvx-rep-t small{font-size:11.5px; color:var(--text-3)}
.lvx-rep-t select{appearance:none; -webkit-appearance:none; border:0; background:transparent; font:inherit; font-size:15.5px; font-weight:800; color:#0e4a30; padding:0; outline:0; cursor:pointer; width:100%}
.lvx-trip{display:flex; align-items:center; gap:8px; flex:1 1 260px; padding:8px 14px; border-radius:16px; font-size:13px; color:#296d50; background:#f6faf7; border:1px dashed #b9dcc6}
.lvx-trip.open{background:#fdf7ec; border-color:#e6cfa6}
.lvx-new{width:26px; height:26px; border-radius:9px; display:grid; place-items:center; background:#e3f3e9; color:#197c51} .lvx-new svg{width:14px; height:14px}
.lvx-bar{display:flex; gap:8px; align-items:center; flex-wrap:wrap}
.lvx-search{flex:1 1 240px; display:flex; align-items:center; gap:8px; height:44px; padding:0 14px; border-radius:14px; background:#faf6f0; border:1px solid #eee4d6}
.lvx-search svg{width:17px; height:17px; color:#9a7b5c} .lvx-search input{flex:1; border:0; background:transparent; font:inherit; font-size:14px; outline:0; min-width:0}
.lvx-search:focus-within{background:#fff; border-color:#c79a5c}
.lvx-tools{display:flex; gap:6px; flex-wrap:wrap}
.lvx-chip{display:inline-flex; align-items:center; gap:6px; height:38px; padding:0 13px; border-radius:999px; border:1px solid #e6d8c3; background:#fff; color:#296d50; font:inherit; font-size:12.5px; font-weight:700; cursor:pointer; transition:all .15s}
.lvx-chip svg{width:15px; height:15px}
.lvx-chip:hover{border-color:#c79a5c; color:#17734b}
.lvx-chip.on{background:#0e4a30; color:#ecd09d; border-color:#0e4a30}
.lvx-chip.ghost{border-color:transparent; background:transparent; color:var(--text-3)}
.lvx-list{display:flex; flex-direction:column; gap:8px; max-height:min(46vh,430px); overflow:auto; padding:2px; margin:0 -2px; scrollbar-width:thin}
.lvx-row{display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius:16px; background:#fff; border:1px solid #efe6d9; border-inline-start:4px solid transparent; transition:border-color .15s,background .15s,box-shadow .15s}
.lvx-row:hover{box-shadow:0 4px 14px rgba(9,51,33,.06)}
.lvx-row.on{background:linear-gradient(90deg,#fffaf1,#fdf3e2); border-color:#ead6b4; border-inline-start-color:#c08d4f}
.lvx-row.out{opacity:.55}
.lvx-ic{flex:none; width:42px; height:42px; border-radius:13px; display:grid; place-items:center; font-weight:800; font-size:17px; color:#17734b; background:#f6eee2}
.lvx-row.on .lvx-ic{background:#0e4a30; color:#ecd09d}
.lvx-nm{flex:1; min-width:0; display:flex; flex-direction:column; gap:5px}
.lvx-nm > b{font-size:14.5px; color:#0e4a30; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.lvx-tags{display:flex; gap:5px; flex-wrap:wrap}
.lvx-tags > *{display:inline-flex; align-items:center; gap:4px; height:24px; padding:0 9px; border-radius:999px; font:inherit; font-size:11.5px; color:#398564; background:#f6f1ea; border:0}
.lvx-tags svg{width:12px; height:12px; opacity:.75} .lvx-tags em{font-style:normal; font-weight:800; color:#0e4a30}
.lvx-tags .van{background:#f0fdfb; color:#389c8e} .lvx-tags .van em{color:#298a7d}
.lvx-tags .last{cursor:pointer; background:#fff6e6; color:#17734b} .lvx-tags .last:hover{background:#f7e6c7}
.lvx-step{flex:none; display:grid; grid-template-columns:36px 76px 36px; grid-template-rows:auto auto; align-items:center; gap:4px 0; justify-items:center}
.lvx-step button{width:36px; height:38px; border:1px solid #e6d8c3; background:#fff; color:#17734b; display:grid; place-items:center; cursor:pointer; transition:background .15s}
.lvx-step button:first-child{border-radius:0 12px 12px 0} .lvx-step button:nth-of-type(2){border-radius:12px 0 0 12px}
.lvx-step button:hover{background:#f6eee2} .lvx-step button svg{width:15px; height:15px}
.lvx-step .lv-in{width:76px; height:38px; border:1px solid #e6d8c3; border-inline:0; text-align:center; font:inherit; font-size:15px; font-weight:800; color:#0e4a30; background:#fff; outline:0; -moz-appearance:textfield; border-radius:0}
.lvx-step .lv-in::-webkit-outer-spin-button,.lvx-step .lv-in::-webkit-inner-spin-button{-webkit-appearance:none; margin:0}
.lvx-step .lv-in:focus{background:#fffaf1}
.lvx-row.on .lvx-step .lv-in{color:#17734b}
.lvx-step small{grid-column:1 / -1; font-size:10.5px; color:var(--text-3)} .lvx-step small b{color:#398564}
.lvx-out{grid-column:1 / -1; font-size:12px; font-weight:800; color:#c8323a; background:#fff1f1; padding:6px 14px; border-radius:999px}
.lvx-empty{display:flex; flex-direction:column; align-items:center; gap:6px; padding:34px 10px; color:var(--text-3); text-align:center}
.lvx-empty svg{width:34px; height:34px; color:#d4bfa0} .lvx-empty b{color:#296d50} .lvx-empty.sm{padding:22px}
.lvx-foot{display:flex; gap:10px; align-items:stretch; flex-wrap:wrap}
.lvx-sum{flex:1 1 380px; display:flex; align-items:center; gap:6px; margin:0; padding:8px; border-radius:16px; background:linear-gradient(135deg,#13422e,#082418); color:#f3e6d3}
.lvx-s{display:flex; flex-direction:column; padding:4px 14px; border-inline-start:1px solid rgba(227,195,139,.18)} .lvx-s:first-child{border:0}
.lvx-s small{font-size:11px; color:#cdb894} .lvx-s b{font-size:18px; color:#fff}
.lvx-s.gold b{color:#ecd09d}
.lvx-sn{margin-inline-start:auto; padding:0 10px; font-size:11.5px; color:#bfa985}
.lvx-go{flex:0 1 auto; display:flex; align-items:center; gap:10px; padding:10px 14px; border-radius:16px; background:#faf6f0; border:1px solid #eee4d6; cursor:pointer}
.lvx-go input{display:none}
.lvx-go i{flex:none; width:40px; height:23px; border-radius:999px; background:#d9cbb7; position:relative; transition:background .2s}
.lvx-go i::after{content:''; position:absolute; top:3px; inset-inline-start:3px; width:17px; height:17px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.2); transition:inset-inline-start .2s}
.lvx-go input:checked + i{background:#249162} .lvx-go input:checked + i::after{inset-inline-start:20px}
.lvx-go span{display:flex; flex-direction:column} .lvx-go b{font-size:13.5px} .lvx-go small{font-size:11.5px; color:var(--text-3)}
@media (max-width:640px){
  .lvx-tools{width:100%} .lvx-tools .lvx-chip{flex:1; justify-content:center; padding:0 8px}
  .lvx-row{flex-wrap:wrap; gap:10px} .lvx-nm{flex:1 1 calc(100% - 60px)}
  .lvx-step{width:100%; grid-template-columns:44px 1fr 44px} .lvx-step button{width:44px} .lvx-step .lv-in{width:100%}
  .lvx-list{max-height:52vh}
  .lvx-s{padding:4px 10px} .lvx-s b{font-size:16px} .lvx-sn{display:none}
  .lvx-go{flex-basis:100%}
}

/* ===== صفحة الحركات المخزنية (smv) ===== */
.smv-new{display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:10px; margin:0 0 14px}
.smv-nb{display:flex; align-items:center; gap:10px; min-width:0; padding:12px; border-radius:16px; border:1px solid #eee4d6; background:#fff; font:inherit; text-align:start; cursor:pointer; transition:transform .15s,box-shadow .15s,border-color .15s}
.smv-nb i{flex:none; width:38px; height:38px; border-radius:12px; display:grid; place-items:center; background:var(--b); color:var(--c)}
.smv-nb i svg{width:18px; height:18px}
.smv-nb span{display:flex; flex-direction:column; min-width:0}
.smv-nb b{font-size:13.5px; color:#0e4a30; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.smv-nb small{font-size:11px; color:var(--text-3); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.smv-nb:hover{transform:translateY(-2px); border-color:var(--c); box-shadow:0 8px 20px rgba(9,51,33,.08)}
.smv-k{display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; margin-bottom:14px}
.smv-kc{display:flex; align-items:center; gap:12px; padding:12px 14px; border-radius:16px; background:#fff; border:1px solid #eee4d6; border-top:3px solid var(--c)}
.smv-kc i{flex:none; width:36px; height:36px; border-radius:11px; display:grid; place-items:center; background:var(--b); color:var(--c)} .smv-kc i svg{width:17px; height:17px}
.smv-kc div{display:flex; flex-direction:column; min-width:0} .smv-kc small{font-size:11.5px; color:var(--text-3)} .smv-kc b{font-size:20px; line-height:1.2; color:#0e4a30} .smv-kc em{font-style:normal; font-size:11px; color:var(--text-3)}
.smv-card{border-radius:20px; overflow:hidden}
.smv-no{display:flex; flex-direction:column; gap:2px} .smv-no b{font-size:13.5px; color:#0e4a30} .smv-no small{font-size:11.5px; color:var(--text-3)}
.smv-chip{display:inline-flex; align-items:center; gap:6px; height:28px; padding:0 11px; border-radius:999px; background:var(--b); color:var(--c); font-size:12px; font-weight:800; white-space:nowrap}
.smv-chip svg{width:14px; height:14px}
.smv-path{display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:13px}
.smv-path span{padding:3px 10px; border-radius:9px; background:#faf6f0; color:#184431; white-space:nowrap} .smv-path span.nil{background:transparent; color:var(--text-3); padding:3px 4px}
.smv-path em{display:grid; place-items:center; color:#c08d4f} .smv-path em svg{width:15px; height:15px}
.smv-n{display:inline-grid; place-items:center; min-width:28px; height:24px; padding:0 8px; border-radius:8px; background:#f6f1ea; font-size:12px; font-weight:800; color:#398564}
.smv-note{display:inline-block; max-width:220px; font-size:12.5px; color:var(--text-2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; vertical-align:middle}
.smv-by{font-size:12.5px; color:var(--text-2)}
@media (max-width:1280px){ .smv-new{grid-template-columns:repeat(4,minmax(0,1fr))} }
@media (max-width:860px){ .smv-new{grid-template-columns:repeat(2,minmax(0,1fr))} .smv-k{grid-template-columns:repeat(2,minmax(0,1fr))} .smv-k .smv-kc:last-child{grid-column:1 / -1} }

/* ======================= مكنة طباعة الإيصالات (بلوتوث) ======================= */
.btp-err{display:flex; gap:8px; align-items:flex-start; background:var(--danger-50,#fdecec); color:var(--danger,#c8323a); border-radius:10px; padding:9px 12px; margin-bottom:12px; font-size:13px}
.btp-tap{display:flex; flex-direction:column; align-items:center; gap:6px; text-align:center; padding:10px 4px}
.btp-tap svg{width:42px; height:42px; color:var(--primary,#17734b)}
.btp-tap b{font-size:15px}
.btp-tap small{color:var(--muted,#566f63); font-size:12.5px}
.btp-once{display:flex; gap:8px; align-items:flex-start; background:var(--info-50,#effaf8); color:var(--text,#133828); border-radius:10px; padding:9px 12px; margin-top:10px; font-size:12.5px; line-height:1.6}
.btp-once svg{width:16px; height:16px; flex:none; margin-top:2px}
.btp-cur{display:flex; gap:8px; align-items:center; background:var(--success-50,#e8f6ef); color:var(--success,#0f8a5f); border-radius:10px; padding:8px 12px; margin-bottom:12px; font-size:13px}
.btp-err svg,.btp-cur svg,.btp-hint svg{width:16px; height:16px; flex:none}
.btp-lbl{font-size:12.5px; font-weight:700; margin-bottom:6px}
.btp-seg{display:inline-flex; gap:4px; margin-bottom:14px}
.btp-list{display:flex; flex-direction:column; gap:8px}
.btp-w{display:flex; gap:12px; align-items:center; text-align:start; width:100%; padding:12px 14px; border:1.5px solid var(--border,#e6dccf); border-radius:12px; background:var(--surface,#fff); color:inherit; cursor:pointer; font:inherit}
.btp-w.on{border-color:var(--rv-gold,#c49a5a); background:var(--rv-cream,#faf4ea)}
.btp-w:disabled{opacity:.6}
.btp-ic{width:38px; height:38px; border-radius:10px; display:grid; place-items:center; background:var(--rv-cream,#f6efe6); flex:none} .btp-ic svg{width:20px; height:20px}
.btp-tx{display:flex; flex-direction:column; gap:2px; min-width:0} .btp-tx b{font-size:14px} .btp-tx small{font-size:12px; opacity:.75}
.btp-hint{display:flex; gap:6px; font-size:12px; opacity:.8; margin-top:12px}

/* ======================= «الجديد في التطبيق» بعد التحديث ======================= */
.wn{position:fixed; inset:0; z-index:400; display:flex; align-items:flex-end; justify-content:center; padding:16px; pointer-events:none}
.wn-back{position:absolute; inset:0; background:rgba(4,27,17,.45); opacity:0; transition:opacity .25s; pointer-events:auto}
.wn-card{position:relative; width:100%; max-width:440px; background:#fff; border-radius:22px; overflow:hidden; box-shadow:0 24px 60px rgba(4,27,17,.35); transform:translateY(30px) scale(.97); opacity:0; transition:transform .3s cubic-bezier(.2,.9,.3,1.2),opacity .25s; pointer-events:auto; font-family:var(--font)}
.wn.on .wn-back{opacity:1} .wn.on .wn-card{transform:none; opacity:1}
@media (min-width:861px){.wn{align-items:center}}
.wn-hd{display:flex; align-items:center; gap:12px; padding:16px 16px 14px; background:radial-gradient(400px 160px at 85% -20%,rgba(227,196,141,.35),transparent),linear-gradient(135deg,#0e4a30,#135438); color:#fff}
.wn-hd small{display:block; color:var(--rv-gold-2,#e3c48d); font-size:12px; font-weight:600} .wn-hd b{font-size:17px}
.wn-hd > div{flex:1; min-width:0}
.wn-spark{width:42px; height:42px; border-radius:13px; display:grid; place-items:center; background:linear-gradient(145deg,#e3c48d,#c49a5a); color:#0e4a30; flex:none; animation:wnp 1.6s ease-in-out infinite} .wn-spark svg{width:22px; height:22px}
@keyframes wnp{50%{transform:scale(1.08) rotate(-6deg)}}
.wn-x{width:34px; height:34px; border-radius:10px; border:0; background:rgba(255,255,255,.1); color:#fff; display:grid; place-items:center; cursor:pointer} .wn-x svg{width:16px; height:16px}
.wn-bd{padding:16px; display:flex; flex-direction:column; gap:12px; max-height:60vh; overflow:auto}
.wn-it{display:flex; gap:12px; align-items:flex-start}
.wn-ic{width:40px; height:40px; border-radius:12px; display:grid; place-items:center; background:var(--rv-cream,#fbf6ee); color:var(--rv-brown,#135438); border:1px solid #efe3d1; flex:none} .wn-ic svg{width:20px; height:20px}
.wn-tx{min-width:0} .wn-tx b{font-size:15px; color:#0e4a30} .wn-tx p{margin:4px 0 0; font-size:13px; line-height:1.7; color:#2f6d52}
.wn-st{margin:8px 0 0; padding:0; list-style:none; counter-reset:wn; display:flex; flex-direction:column; gap:6px}
.wn-st li{counter-increment:wn; display:flex; gap:8px; align-items:center; font-size:12.5px; color:#145236}
.wn-st li::before{content:counter(wn); width:20px; height:20px; border-radius:50%; background:var(--rv-gold,#c49a5a); color:#fff; font-size:11px; font-weight:700; display:grid; place-items:center; flex:none}
.wn-note{display:flex; gap:8px; align-items:flex-start; background:#e8f6f0; color:#0f6e4c; border-radius:12px; padding:9px 11px; font-size:12px; line-height:1.6} .wn-note svg{width:15px; height:15px; flex:none; margin-top:2px}
.wn-ft{display:flex; gap:8px; padding:0 16px 16px} .wn-ft .btn{flex:1; justify-content:center; height:44px}

/* ======================= بضاعة العربية (المندوب) ======================= */
.fvan{margin-bottom:14px; overflow:hidden}
.fvan > summary{list-style:none; display:flex; align-items:center; gap:12px; padding:12px 14px; cursor:pointer}
.fvan > summary::-webkit-details-marker{display:none}
.fvan-ic{width:40px; height:40px; border-radius:12px; display:grid; place-items:center; background:linear-gradient(145deg,#f7efe3,#efe3d1); color:var(--rv-brown,#135438); flex:none} .fvan-ic svg{width:20px; height:20px}
.fvan-t{flex:1; min-width:0; display:flex; flex-direction:column} .fvan-t b{font-size:15px} .fvan-t small{font-size:12px; color:var(--text-3,#5f7d6e)}
.fvan-chev{width:18px; height:18px; transition:transform .2s; color:var(--text-3,#5f7d6e)} .fvan[open] .fvan-chev{transform:rotate(180deg)}
.fvan-list{display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:6px; padding:0 14px 10px}
.fvan-r{display:flex; justify-content:space-between; align-items:center; gap:8px; padding:8px 11px; border-radius:10px; background:var(--rv-cream,#fbf6ee); border:1px solid #efe3d1; font-size:13px}
.fvan-r span{min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600}
.fvan-r b{font-size:15px; color:var(--rv-brown,#135438); white-space:nowrap} .fvan-r b small{font-size:11px; font-weight:500; margin-inline-start:3px; color:var(--text-3,#5f7d6e)}
.fvan-more{display:flex; align-items:center; gap:4px; justify-content:flex-end; padding:0 14px 12px; font-size:12.5px; font-weight:600; color:var(--rv-brown,#135438)} .fvan-more svg{width:14px; height:14px}
.fvan-empty{padding:0 14px 14px; font-size:12.5px; color:var(--text-3,#5f7d6e)}

/* ======================= قفل الرحلة (تصميم الأقسام) ======================= */
.tcx{display:flex; flex-direction:column; gap:14px}
.tcx-kpi{display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:8px}
.tcx-kpi > div{display:flex; align-items:center; gap:10px; padding:11px 12px; border-radius:14px; background:#faf6f0; border:1px solid #f0e6d8}
.tcx-kpi > div > span{width:34px; height:34px; border-radius:10px; display:grid; place-items:center; background:#fff; color:#17734b; flex:none} .tcx-kpi svg{width:17px; height:17px}
.tcx-kpi small{display:block; font-size:11px; color:var(--text-3)} .tcx-kpi b{font-size:17px; color:var(--rv-dark,#0e4a30)}
.tcx-sec{border:1px solid #efe5d7; border-radius:16px; padding:14px; background:#fff}
.tcx-sh{display:flex; align-items:flex-start; gap:10px; margin-bottom:12px}
.tcx-n{width:26px; height:26px; border-radius:50%; background:var(--rv-gold,#c49a5a); color:#fff; font-weight:800; font-size:13px; display:grid; place-items:center; flex:none}
.tcx-st{flex:1; min-width:0} .tcx-st b{display:flex; align-items:center; gap:6px; font-size:14.5px; color:var(--rv-dark,#0e4a30)} .tcx-st b svg{width:16px; height:16px; color:#17734b}
.tcx-st small{display:block; font-size:12px; color:var(--text-3); margin-top:2px; line-height:1.6}
.tcx-t td{vertical-align:middle}
.tcx-xl{display:flex; flex-direction:column; gap:8px; margin-bottom:10px}
.tcx-xr{display:grid; grid-template-columns:1fr 130px auto; gap:8px; align-items:center}
.tcx-xr .btn svg{width:15px; height:15px}
.tcx-xe{font-size:12.5px; color:var(--text-3); padding:10px 12px; border:1px dashed #e6d9c6; border-radius:12px; margin-bottom:10px}
.tcx-add svg{width:15px; height:15px}
.tcx-pay{display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:14px}
@media (max-width:640px){.tcx-pay{grid-template-columns:1fr} .tcx-xr{grid-template-columns:1fr 90px auto}}
.tcx-notes{margin:0}
/* كروت الملخص */
.tcx-k{display:flex; align-items:center; gap:10px; padding:11px 12px; border-radius:14px; background:#faf6f0; border:1px solid #f0e6d8; min-width:0}
.tcx-kpi .tcx-k-hl{background:linear-gradient(135deg,#0e4a30,#135438); border-color:transparent; box-shadow:0 10px 22px -14px rgba(9,51,33,.8)}
.tcx-kpi .tcx-k-hl small{color:#e3c48d} .tcx-kpi .tcx-k-hl b{color:#fff} .tcx-kpi .tcx-k-hl > span{background:rgba(255,255,255,.1); color:#e3c48d}
.tcx-kpi .tcx-k-ok{background:#eef8f2; border-color:#d3ecdd} .tcx-kpi .tcx-k-ok b{color:#197c51} .tcx-kpi .tcx-k-ok > span{color:#197c51}
/* جدول البضاعة: أخف وأصغر */
.tcx .tcx-t thead th{position:static; background:#f6efe4; color:#135438; font-size:12px; font-weight:700; padding:9px 12px}
.tcx .tcx-t td{padding:7px 12px; font-size:13px; border-bottom:1px solid #f4ece1}
.tcx .tcx-t tbody tr:last-child td{border-bottom:0}
.tcx .tcx-t .inp{width:84px; height:34px; padding:0 8px; border-radius:9px; font-size:13.5px}
.tcx .tcx-t .tc-d{border-color:#efc2bb; background:#fffafa}
.tcx .tcx-t .tc-d:focus{border-color:#c8323a}
.tc-l{display:inline-grid; place-items:center; min-width:38px; height:24px; padding:0 8px; border-radius:999px; font-weight:800; font-size:12.5px; background:#f1eeea; color:#5f7d6e}
.tc-l.ok{background:#e9f6ef; color:#197c51} .tc-l.warn{background:#fdf3e1; color:#8a5214} .tc-l.bad{background:#fdecec; color:#c8323a}
.tcx .tcx-sec .table-wrap{border:1px solid #f0e6d8; border-radius:12px; overflow:auto}

/* فواتير المندوب المستنية التأكيد — قايمة */
.siv{margin-top:14px; border:1px solid #ecdfcc; border-radius:16px; overflow:hidden; background:#fff}
.siv-hd{display:flex; align-items:center; gap:12px; padding:12px 14px; background:linear-gradient(180deg,#fbf7f1,#f6efe4); border-bottom:1px solid #ecdfcc}
.siv-ic{width:36px; height:36px; border-radius:11px; display:grid; place-items:center; background:#0e4a30; color:#e3c48d; flex:none} .siv-ic svg{width:18px; height:18px}
.siv-tt{flex:1; min-width:0} .siv-tt b{display:flex; align-items:center; gap:7px; font-size:14.5px; color:#0e4a30}
.siv-tt b em{font-style:normal; font-size:11.5px; font-weight:800; padding:1px 8px; border-radius:999px; background:var(--rv-gold,#c49a5a); color:#fff}
.siv-tt small{display:block; font-size:11.5px; color:var(--text-3); line-height:1.6; margin-top:1px}
.siv-all{display:flex; align-items:center; gap:7px; font-size:12.5px; font-weight:700; white-space:nowrap; cursor:pointer; padding:7px 11px; border-radius:10px; background:#fff; border:1px solid #e3d5c1; color:#0e4a30}
.siv-all input{width:16px; height:16px; accent-color:#197c51}
.siv-l{display:flex; flex-direction:column}
.siv-r{position:relative; display:grid; grid-template-columns:auto auto minmax(0,1fr) auto; align-items:center; gap:12px; padding:11px 14px; border-bottom:1px solid #f4ece1; cursor:pointer; transition:background .12s}
.siv-r:last-child{border-bottom:0} .siv-r:hover{background:#fdfaf5}
.siv-r > input{position:absolute; opacity:0; pointer-events:none}
.siv-tick{width:22px; height:22px; border-radius:7px; border:2px solid #d8c9b4; display:grid; place-items:center; color:transparent; transition:.12s}
.siv-tick svg{width:14px; height:14px}
.siv-r input:checked + .siv-tick{background:#197c51; border-color:#197c51; color:#fff}
.siv-no{display:inline-flex; align-items:center; gap:5px; padding:4px 9px; border-radius:8px; background:#f6efe4; color:#17734b; font-size:12px; white-space:nowrap} .siv-no svg{width:13px; height:13px} .siv-no b{color:#0e4a30; font-weight:800}
.siv-m{min-width:0; display:flex; flex-direction:column; gap:2px}
.siv-m > b{font-size:13.5px; color:#0e4a30; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.siv-m small{font-size:11.5px; color:var(--text-3); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.siv-tag{font-style:normal; font-weight:700; padding:0 7px; border-radius:999px; font-size:11px}
.siv-tag.ok{background:#e9f6ef; color:#197c51} .siv-tag.sv-part{background:#fdf3e1; color:#8a5214} .siv-tag.due{background:#f1eeea; color:#388362} .siv-tag.r{background:#fdecec; color:#c8323a}
.siv-a{font-size:15px; font-weight:800; color:#0e4a30; white-space:nowrap}
.siv-r.ret .siv-a{color:#c8323a} .siv-r.ret .siv-no{background:#fdecec; color:#c8323a} .siv-r.ret .siv-no b{color:#c8323a}
.siv-r.off{background:#fbf8f4} .siv-r.off .siv-no,.siv-r.off .siv-m,.siv-r.off .siv-a{opacity:.42} .siv-r.off .siv-a{text-decoration:line-through}
.siv-ft{display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; padding:11px 14px; background:#0e4a30; color:#e7ddd3; font-size:13px}
.siv-ft b{color:#fff; font-size:15px} .siv-net b{color:#e3c48d; font-size:17px}
.siv-ft.part{background:#135438}
@media (max-width:640px){.siv-r{grid-template-columns:auto minmax(0,1fr) auto; row-gap:4px} .siv-no{grid-column:2; justify-self:start} .siv-m{grid-column:2} .siv-a{grid-column:3; grid-row:1 / span 2} .siv-tick{grid-row:1 / span 2}}

/* ======================= إيصال 58 مم (الشكل الجديد) ======================= */
.rc2{font-size:11.5px; line-height:1.5; font-weight:700; color:#000}
.rc2 .rc-logo{text-align:center; margin-bottom:2px} .rc2 .rc-logo img{width:132px; filter:grayscale(1) contrast(1.8) brightness(.8)}
.rc2 .rc-s{text-align:center; font-size:10px; font-weight:700}
.rc2 .rc-bar{margin:6px 0 5px; padding:4px 0; text-align:center; background:#000; color:#fff; font-size:14px; font-weight:800; border-radius:5px; -webkit-print-color-adjust:exact; print-color-adjust:exact}
.rc2 .rc-meta{display:grid; grid-template-columns:1fr 1fr; gap:4px; margin-bottom:3px}
.rc2 .rc-meta > div{border:1.5px solid #000; border-radius:5px; padding:2px 5px; text-align:center}
.rc2 .rc-meta small{display:block; font-size:9.5px; font-weight:700} .rc2 .rc-meta b{font-size:11.5px; font-weight:800; direction:ltr; display:block}
.rc2 .rr{display:flex; justify-content:space-between; align-items:baseline; gap:6px; padding:1.5px 0}
.rc2 .rr span{flex:none; font-weight:700} .rc2 .rr span small{font-size:9.5px}
.rc2 .rr b{font-weight:800; text-align:left; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.rc2 .rr b .num{direction:ltr; unicode-bidi:isolate}
.rc2 .rr.tot{border-top:1.5px solid #000; margin-top:2px; padding-top:3px; font-size:12.5px}
.rc2 .rc-th{display:flex; justify-content:space-between; margin-top:6px; padding:2px 0; border-top:2px solid #000; border-bottom:2px solid #000; font-size:10.5px; font-weight:800}
.rc2 .rc-items{display:flex; flex-direction:column}
.rc2 .ri{padding:4px 0; border-bottom:1px dashed #000} .rc2 .ri:last-child{border-bottom:0}
.rc2 .ri-n{font-size:12px; font-weight:800; line-height:1.35}
.rc2 .ri-l{display:flex; justify-content:space-between; align-items:baseline; gap:6px; font-size:11px; font-weight:700}
.rc2 .ri-l b{font-size:12px; font-weight:800; direction:ltr; white-space:nowrap} .rc2 .ri-l em{font-style:normal; font-size:10px}
.rc2 .rc-hr{border-top:2px solid #000; margin:2px 0 4px}
.rc2 .rc-net{display:flex; justify-content:space-between; align-items:center; margin:5px 0 3px; padding:5px 8px; background:#000; color:#fff; border-radius:6px; font-size:13px; font-weight:800; -webkit-print-color-adjust:exact; print-color-adjust:exact}
.rc2 .rc-net b{font-size:17px; direction:ltr; color:#fff}
.rc2 .rc-words{text-align:center; font-size:10px; font-weight:700; margin-bottom:4px}
.rc2 .rc-sig{display:flex; align-items:flex-end; gap:6px; margin-top:10px; font-size:10.5px} .rc2 .rc-sig i{flex:1; border-bottom:1.5px solid #000; height:16px}
.rc2 .rc-foot{display:flex; flex-direction:column; align-items:center; margin-top:8px; padding-top:5px; border-top:1.5px dashed #000; font-size:10.5px} .rc2 .rc-foot span{font-size:9.5px; direction:ltr}

/* إيصال مكنة البلوتوث (الحرارية): أتقل وأكبر شوية عشان مفيش رمادي في الطباعة الحرارية */
.pdf-sheet.th-print{padding:2px 2px 8px}
.th-print .rc2{font-size:12.5px; -webkit-text-stroke:.3px currentColor}
.th-print .rc2 .rc-logo img{width:150px; filter:none}
.th-print .rc2 .rc-s{font-size:11px} .th-print .rc2 .rc-bar{font-size:15px}
.th-print .rc2 .rc-meta small{font-size:10.5px} .th-print .rc2 .rc-meta b{font-size:12.5px}
.th-print .rc2 .ri-n{font-size:13px} .th-print .rc2 .ri-l{font-size:12px} .th-print .rc2 .ri-l b{font-size:13px}
.th-print .rc2 .rc-net{font-size:14px} .th-print .rc2 .rc-net b{font-size:18px; -webkit-text-stroke:0}
.th-print .rc2 .rc-bar{-webkit-text-stroke:0}
.th-print .rc2 .rc-words,.th-print .rc2 .rc-sig,.th-print .rc2 .rc-foot{font-size:11.5px}
/* إيصالات تانية بنفس المقاس (قسايم المرتبات): كله أسود وتقيل */
.th-print .rcpt:not(.rc2){font-size:12px; font-weight:800; color:#000; -webkit-text-stroke:.3px #000}
.th-print .rcpt:not(.rc2) .rc-logo img{width:150px; filter:none}

/* المعاينة في نافذة المكنة */
.btp-row{display:flex; gap:16px; flex-wrap:wrap}
.btp-pvb{width:100%; justify-content:center; margin-top:12px}
.btp-pv{margin-top:10px; padding:10px; border-radius:12px; background:#1c4b37}
.btp-pv-t{display:flex; align-items:center; gap:6px; color:#e7ddd3; font-size:12px; margin-bottom:8px} .btp-pv-t svg{width:14px; height:14px}
.btp-pv-w{color:#e7ddd3; font-size:12.5px; text-align:center; padding:14px}
.btp-pv-p{display:flex; flex-direction:column; align-items:center; gap:10px; max-height:60vh; overflow:auto}
.btp-pv-c{width:100%; max-width:384px; height:auto; image-rendering:auto; background:#fff; box-shadow:0 6px 18px rgba(0,0,0,.35)}

/* ======================= مبيعاتي بالأصناف (تقرير آخر اليوم) ======================= */
.si-per{display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-bottom:14px}
.si-per > button{height:38px; padding:0 15px; border-radius:999px; border:1px solid #e6d9c6; background:#fff; font:700 13px var(--font); color:#135438; cursor:pointer}
.si-per > button.on{background:#0e4a30; border-color:#0e4a30; color:#fff}
.si-d{display:flex; align-items:center; gap:6px; margin-inline-start:auto; color:var(--text-3)} .si-d svg{width:16px; height:16px}
.si-d .inp{height:38px; width:150px; padding:0 8px}
.si-hero{display:flex; flex-wrap:wrap; gap:14px; align-items:stretch; padding:16px; border-radius:18px; color:#fff; background:radial-gradient(400px 160px at 90% -20%,rgba(227,196,141,.3),transparent),linear-gradient(135deg,#0e4a30,#135438); margin-bottom:14px}
.si-h1{flex:1; min-width:180px; display:flex; flex-direction:column} .si-h1 small{color:#e3c48d; font-size:12px; font-weight:600}
.si-h1 b{font-size:38px; line-height:1.15; font-weight:800} .si-h1 span{font-size:12px; color:#e7ddd3}
.si-h2{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; flex:1.3; min-width:240px}
.si-h2 > div{background:rgba(255,255,255,.08); border-radius:12px; padding:9px 11px; display:flex; flex-direction:column; justify-content:center} .si-h2 small{font-size:11px; color:#e3c48d} .si-h2 b{font-size:17px}
.si-sec{display:flex; align-items:center; gap:7px; font-size:14.5px; font-weight:800; color:#0e4a30; margin:16px 2px 8px} .si-sec svg{width:17px; height:17px; color:#17734b} .si-sec small{font-size:11.5px; font-weight:500; color:var(--text-3)}
.si-units{display:grid; grid-template-columns:repeat(auto-fill,minmax(110px,1fr)); gap:8px}
.si-u{background:#fff; border:1px solid #ece2d4; border-radius:14px; padding:12px 10px; text-align:center; display:flex; flex-direction:column; gap:1px}
.si-u b{font-size:24px; font-weight:800; color:#0e4a30} .si-u span{font-size:12.5px; font-weight:700; color:#17734b}
.si-tg{display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:8px}
.si-t{background:#fff; border:1px solid #ece2d4; border-radius:14px; padding:11px 13px}
.si-t1{display:flex; justify-content:space-between; align-items:center; gap:8px; font-size:13.5px} .si-t1 span{font-size:12px; color:#8a5214; display:flex; align-items:center; gap:4px} .si-t1 svg{width:14px; height:14px}
.si-bar{height:8px; border-radius:999px; background:#f1eadf; overflow:hidden; margin:8px 0 5px} .si-bar i{display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#e0a458,#c47a2c)}
.si-t2{display:flex; justify-content:space-between; font-size:12px; color:var(--text-3)}
.si-t.ok{border-color:#cfeadb; background:#f3fbf6} .si-t.ok .si-t1 span{color:#197c51} .si-t.ok .si-bar i{background:linear-gradient(90deg,#3fb47a,#197c51)}
.si-list{background:#fff; border:1px solid #ece2d4; border-radius:16px; overflow:hidden}
.si-r{display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:12px; padding:11px 14px; border-bottom:1px solid #f4ece1} .si-r:last-child{border-bottom:0}
.si-k{width:26px; height:26px; border-radius:8px; background:#f6efe4; color:#17734b; font-size:12px; font-weight:800; display:grid; place-items:center}
.si-m{min-width:0} .si-m b{display:block; font-size:14px; color:#0e4a30; overflow:hidden; text-overflow:ellipsis; white-space:nowrap} .si-m small{font-size:11.5px; color:var(--text-3)}
.si-q{text-align:center; min-width:64px} .si-q b{display:block; font-size:21px; font-weight:800; color:#0e4a30; line-height:1.1} .si-q span{font-size:11.5px; font-weight:700; color:#17734b}
.si-note{display:flex; align-items:center; gap:6px; font-size:12px; color:var(--text-3); margin-top:10px} .si-note svg{width:14px; height:14px}
@media (max-width:640px){
  .si-d{margin-inline-start:0; width:100%} .si-d .inp{flex:1; width:auto}
  .si-per > button{flex:1; padding:0 8px; font-size:12.5px}
  .si-h1 b{font-size:32px}
}

/* ======================= محرّر التارجت ======================= */
.tge{display:flex; flex-direction:column; gap:12px}
.tge-lock{display:flex; align-items:center; gap:10px; padding:11px 14px; border-radius:14px; background:#0e4a30; color:#fff} .tge-lock svg{width:20px; height:20px; color:#e3c48d} .tge-lock b{display:block; font-size:14px} .tge-lock small{color:#e3c48d; font-size:12px}
.tge-note{display:flex; align-items:center; gap:8px; padding:9px 12px; border-radius:12px; background:#fdf3e1; color:#8a5214; font-size:12.5px} .tge-note svg{width:16px; height:16px; flex:none}
.tge-rate{display:flex; align-items:center; gap:12px; padding:12px 14px; border-radius:16px; background:linear-gradient(135deg,#0e4a30,#135438); color:#fff}
.tge-ri{width:40px; height:40px; border-radius:12px; display:grid; place-items:center; background:rgba(255,255,255,.1); color:#e3c48d; flex:none} .tge-ri svg{width:20px; height:20px}
.tge-rt{flex:1; min-width:0} .tge-rt b{display:block; font-size:14.5px} .tge-rt small{font-size:11.5px; color:#e3c48d}
.tge-rin{display:flex; align-items:center; gap:4px; background:#fff; border-radius:12px; padding:0 10px 0 4px} .tge-rin .inp{width:80px; height:44px; border:0; text-align:center; font-size:20px; font-weight:800; color:#0e4a30; box-shadow:none} .tge-rin span{color:#17734b; font-weight:800; font-size:18px}
.tge-h b{display:flex; align-items:center; gap:7px; font-size:15px; color:#0e4a30} .tge-h b svg{width:17px; height:17px; color:#17734b} .tge-h small{display:block; font-size:12px; color:var(--text-3); margin-top:2px}
.tge-list{display:flex; flex-direction:column; gap:10px}
.tge-it{border:1px solid #ece2d4; border-radius:16px; padding:12px; background:#fff; display:flex; flex-direction:column; gap:10px}
.tge-ih{display:flex; align-items:center; gap:8px; flex-wrap:wrap}
.tge-n{width:28px; height:28px; border-radius:50%; background:var(--rv-gold,#c49a5a); color:#fff; font-weight:800; font-size:13px; display:grid; place-items:center; flex:none}
.tge-lbl{flex:1; min-width:150px; height:40px; font-weight:700}
.tge-k{display:inline-flex; gap:3px} .tge-k button{height:34px; padding:0 11px; border:0; border-radius:9px; background:transparent; font:700 12.5px var(--font); color:#388362; cursor:pointer} .tge-k button.on{background:#0e4a30; color:#fff}
.tge-x{width:36px; height:36px; border-radius:10px; border:1px solid #f2c5c7; background:#fff; color:#c8323a; display:grid; place-items:center; cursor:pointer} .tge-x svg{width:16px; height:16px}
.tge-pk{display:flex; flex-direction:column; gap:8px}
.tge-q{position:relative; display:block} .tge-q svg{position:absolute; top:50%; inset-inline-start:11px; transform:translateY(-50%); width:15px; height:15px; color:var(--text-3)} .tge-q .inp{height:38px; padding-inline-start:34px}
.tge-ch{display:flex; flex-wrap:wrap; gap:6px; max-height:180px; overflow:auto; padding:2px}
.tge-c{display:inline-flex; align-items:center; gap:4px; height:32px; padding:0 11px; border-radius:999px; border:1px solid #e3d5c1; background:#faf6f0; font:600 12.5px var(--font); color:#135438; cursor:pointer}
.tge-c svg{width:13px; height:13px} .tge-c.on{background:#197c51; border-color:#197c51; color:#fff} .tge-c[hidden]{display:none}
.tge-sel{font-size:12px; color:var(--text-3)} .tge-sel b{color:#197c51}
.tge-qty{display:flex; align-items:center; justify-content:space-between; gap:10px; padding:9px 12px; border-radius:12px; background:#f6efe4}
.tge-qty > span{font-size:13px; font-weight:700; color:#135438} .tge-qty label{display:flex; align-items:center; gap:6px} .tge-qty .inp{width:120px; height:42px; text-align:center; font-size:18px; font-weight:800} .tge-qty em{font-style:normal; font-size:12.5px; font-weight:700; color:#17734b; min-width:34px}
.tge-add{align-self:flex-start} .tge-add svg{width:15px; height:15px}
@media (max-width:640px){ .tge-lbl{min-width:100%} .tge-qty{flex-direction:column; align-items:stretch} .tge-qty label{justify-content:center} }
/* عرض البند للمندوب والإدارة: أسماء الأصناف تحت البند */
.cm-lp,.si-tp{display:flex; flex-wrap:wrap; gap:4px; margin-top:4px} .cm-lp i,.si-tp i{font-style:normal; font-size:10.5px; padding:1px 7px; border-radius:999px; background:#f6efe4; color:#1b7b51}
.cm-lock{display:inline-flex; align-items:center; gap:3px} .cm-lock svg{width:12px; height:12px}

/* محرّر التارجت: أزرار أخف + الأصناف متقسمة بالتصنيف */
.tge-k{background:#f6efe4; border-radius:10px; padding:3px}
.tge-k button{height:30px; padding:0 10px; font-weight:600; font-size:12px; color:#31835f}
.tge-k button.on{background:#fff; color:#0e4a30; box-shadow:0 1px 3px rgba(9,51,33,.18)}
.tge-x{width:32px; height:32px; border-color:#f4d6d7}
.tge-ch{max-height:260px; display:flex; flex-direction:column; gap:8px; padding:2px 2px 4px}
.tge-g[hidden]{display:none}
.tge-gh{font-size:11.5px; font-weight:700; color:#5f7d6e; margin:0 2px 4px}
.tge-gb{display:flex; flex-wrap:wrap; gap:6px}
.tge-c{height:30px; padding:0 10px; font-weight:600; font-size:12px; background:#fff; border-color:#e8dccb; transition:background .1s,border-color .1s,color .1s}
.tge-c i{display:none; width:14px; height:14px} .tge-c i svg{width:13px; height:13px}
.tge-c.on{background:#e9f6ef; border-color:#197c51; color:#135d3d} .tge-c.on i{display:inline-grid; place-items:center}
.tge-sel{display:flex; justify-content:space-between; align-items:center; gap:8px; flex-wrap:wrap}
.tge-sa{display:flex; gap:6px} .tge-sa button{border:0; background:none; font:600 12px var(--font); color:#17734b; cursor:pointer; padding:2px 4px; text-decoration:underline}

/* اختيار أصناف البند: ملخص بالمختار + لوحة بتتفتح */
.tge-pk{border:1px solid #ece2d4; border-radius:14px; background:#fcfaf7; overflow:hidden}
.tge-sum{display:flex; align-items:center; gap:10px; padding:10px 12px}
.tge-selc{flex:1; min-width:0; display:flex; flex-wrap:wrap; gap:6px; align-items:center}
.tge-sc-n{font-size:12px; font-weight:800; color:#fff; background:#197c51; border-radius:999px; padding:3px 10px}
.tge-sc{display:inline-flex; align-items:center; gap:4px; height:28px; padding:0 4px 0 10px; border-radius:999px; background:#e9f6ef; border:1px solid #bfe3cf; color:#135d3d; font-size:12px; font-weight:600}
.tge-sc button{width:20px; height:20px; border-radius:50%; border:0; background:#cfe9da; color:#135d3d; font-size:14px; line-height:1; cursor:pointer; display:grid; place-items:center}
.tge-sc button:hover{background:#197c51; color:#fff}
.tge-sc-e{font-size:12.5px; color:var(--text-3)}
.tge-tog{flex:none; display:inline-flex; align-items:center; gap:5px; height:34px; padding:0 12px; border-radius:10px; border:1px solid #e3d5c1; background:#fff; font:700 12.5px var(--font); color:#135438; cursor:pointer} .tge-tog svg{width:14px; height:14px}
.tge-tog .t-c{display:none} .tge-pk.open .tge-tog .t-o{display:none} .tge-pk.open .tge-tog .t-c{display:inline-flex; align-items:center; gap:5px}
.tge-pk.open .tge-tog{background:#0e4a30; border-color:#0e4a30; color:#fff}
.tge-pnl{display:none; border-top:1px solid #ece2d4; padding:10px 12px 12px; background:#fff}
.tge-pk.open .tge-pnl{display:block}
.tge-pt{display:flex; align-items:center; gap:10px; margin-bottom:10px} .tge-pt .tge-q{flex:1}
.tge-pnl .tge-ch{display:flex; flex-direction:column; flex-wrap:nowrap; gap:0; max-height:300px; overflow-y:auto; overflow-x:hidden; padding:0; border:0}
.tge-pnl .tge-g{padding:8px 0; border-bottom:1px dashed #efe5d7} .tge-pnl .tge-g:last-child{border-bottom:0}
.tge-pnl .tge-gh{display:flex; align-items:center; gap:8px; margin:0 0 6px}
.tge-pnl .tge-gh b{font-size:12.5px; color:#135438} .tge-pnl .tge-gh em{font-style:normal; font-size:11px; font-weight:800; color:#197c51}
.tge-pnl .tge-gh button{margin-inline-start:auto; border:0; background:none; font:600 11.5px var(--font); color:#17734b; cursor:pointer; text-decoration:underline}
.tge-pnl .tge-gb{display:flex; flex-wrap:wrap; gap:6px}
.tge-pnl .tge-c{max-width:100%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}

/* اختيار الأصناف: التصنيفات في عمودين جنب بعض (يمين وشمال) — كلها باينة من غير سكرول وما فيش حاجة بتتقطع */
.tge-pnl .tge-ch{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; max-height:none; overflow:visible; align-items:start}
.tge-pnl .tge-g{padding:8px 10px 10px; border:1px solid #efe5d7; border-radius:12px; background:#fcfaf7}
.tge-pnl .tge-g:last-child{border-bottom:1px solid #efe5d7}
.tge-pnl .tge-gh{margin-bottom:6px}
.tge-pnl .tge-gb{gap:5px}
.tge-pnl .tge-c{height:28px; padding:0 9px; font-size:11.5px}
@media (max-width:640px){ .tge-pnl .tge-ch{grid-template-columns:1fr} }

/* ======================= مبيعاتي بالأصناف — التصميم الجديد ======================= */
.si2-hero{display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1.6fr); gap:14px; align-items:stretch; padding:18px; border-radius:20px; color:#fff; margin-bottom:6px;
  background:radial-gradient(500px 220px at 95% -30%,rgba(227,196,141,.32),transparent),linear-gradient(135deg,#072a1b,#135438); box-shadow:0 18px 40px -26px rgba(7,42,27,.9)}
.si2-h1{display:flex; flex-direction:column; justify-content:center; min-width:0}
.si2-who{display:flex; align-items:center; gap:6px; font-size:12.5px; font-weight:600; color:#e3c48d} .si2-who svg{width:14px; height:14px} .si2-who i{font-style:normal; opacity:.6}
.si2-h1 > b{font-size:46px; line-height:1.05; font-weight:800; margin:6px 0 2px; letter-spacing:-.5px}
.si2-h1 small{font-size:12.5px; color:#e7ddd3} .si2-h1 small em{font-style:normal; opacity:.7}
.si2-h2{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px}
.si2-h2 > div{display:flex; flex-direction:column; justify-content:center; gap:2px; padding:12px 14px; border-radius:14px; background:rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.08); min-width:0}
.si2-h2 > div > span{width:28px; height:28px; border-radius:9px; display:grid; place-items:center; background:rgba(227,196,141,.16); color:#e3c48d; margin-bottom:4px} .si2-h2 svg{width:15px; height:15px}
.si2-h2 small{font-size:11.5px; color:#e3c48d} .si2-h2 b{font-size:19px; font-weight:800; white-space:nowrap; overflow:hidden; text-overflow:ellipsis} .si2-h2 b em{font-style:normal; font-size:12px; color:#e3c48d}
.si2-sec{display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; margin:22px 2px 10px}
.si2-sec h3{display:flex; align-items:center; gap:8px; margin:0; font-size:16px; font-weight:800; color:#0e4a30} .si2-sec h3 svg{width:18px; height:18px; color:#17734b}
.si2-sec small{font-size:12px; color:var(--text-3)}
.si2-units{display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:10px}
.si2-u{position:relative; padding:14px 14px 12px; border-radius:16px; background:#fff; border:1px solid #ece2d4; overflow:hidden}
.si2-u::before{content:''; position:absolute; inset-block:0; inset-inline-start:0; width:4px; background:var(--c)}
.si2-ut{display:flex; justify-content:space-between; align-items:center} .si2-ut span{font-size:13px; font-weight:800; color:var(--c)} .si2-ut em{font-style:normal; font-size:11.5px; font-weight:700; color:var(--text-3)}
.si2-u > b{display:block; font-size:30px; font-weight:800; color:#0e4a30; margin:4px 0 8px; line-height:1.1}
.si2-ub{height:5px; border-radius:999px; background:#f1eadf; overflow:hidden} .si2-ub i{display:block; height:100%; background:var(--c); border-radius:inherit}
.si2-tg{display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:10px}
.si2-t{padding:14px; border-radius:16px; background:#fff; border:1px solid #ece2d4; display:flex; flex-direction:column; gap:10px}
.si2-t.ok{background:#f3fbf6; border-color:#cfeadb}
.si2-tt{display:flex; align-items:center; gap:12px}
.si2-ring{--p:0; width:54px; height:54px; border-radius:50%; flex:none; display:grid; place-items:center; background:conic-gradient(#c47a2c calc(var(--p)*1%), #f1eadf 0)}
.si2-ring::before{content:''; position:absolute; width:42px; height:42px; border-radius:50%; background:#fff}
.si2-ring{position:relative} .si2-ring b{position:relative; font-size:12.5px; font-weight:800; color:#0e4a30}
.si2-ring.ok{background:conic-gradient(#197c51 calc(var(--p)*1%), #dff1e7 0)} .si2-t.ok .si2-ring::before{background:#f3fbf6}
.si2-ti{flex:1; min-width:0} .si2-ti > b{display:block; font-size:15px; font-weight:800; color:#0e4a30; overflow:hidden; text-overflow:ellipsis; white-space:nowrap} .si2-ti span{font-size:12px; color:var(--text-3)} .si2-ti span b{color:#0e4a30}
.si2-left{text-align:center; padding:6px 12px; border-radius:12px; background:#fdf3e1; min-width:72px}
.si2-left small{display:block; font-size:10.5px; font-weight:700; color:#8a5214} .si2-left b{font-size:19px; font-weight:800; color:#8a5214}
.si2-left .ok{display:flex; align-items:center; gap:4px; font-size:13px; font-weight:800; color:#197c51} .si2-left .ok svg{width:15px; height:15px}
.si2-t.ok .si2-left{background:#e2f4ea}
.si2-bar{height:7px; border-radius:999px; background:#f1eadf; overflow:hidden} .si2-bar i{display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#e0a458,#c47a2c)}
.si2-t.ok .si2-bar i{background:linear-gradient(90deg,#3fb47a,#197c51)}
.si2-tp summary{list-style:none; display:flex; align-items:center; gap:6px; cursor:pointer; font-size:12px; font-weight:600; color:#388362} .si2-tp summary::-webkit-details-marker{display:none}
.si2-tp summary svg{width:14px; height:14px} .si2-tp summary span{margin-inline-start:auto; color:#17734b; text-decoration:underline}
.si2-tp[open] summary span{display:none}
.si2-tp > div{display:flex; flex-wrap:wrap; gap:5px; margin-top:8px} .si2-tp i{font-style:normal; font-size:11.5px; padding:3px 9px; border-radius:999px; background:#f6efe4; color:#1b7b51}
.si2-list{display:grid; grid-template-columns:repeat(auto-fill,minmax(320px,1fr)); gap:8px}
.si2-r{display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:12px; padding:12px 14px; border-radius:14px; background:#fff; border:1px solid #ece2d4}
.si2-k{width:30px; height:30px; border-radius:10px; display:grid; place-items:center; background:#f6efe4; color:#17734b; font-size:13px; font-weight:800}
.si2-r.top .si2-k{background:linear-gradient(145deg,#e3c48d,#c49a5a); color:#0e4a30}
.si2-m{min-width:0} .si2-m > b{display:block; font-size:14px; font-weight:800; color:#0e4a30; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.si2-m small{display:block; font-size:11.5px; color:var(--text-3); margin-top:1px} .si2-m small em{font-style:normal; color:#c8323a}
.si2-rb{height:4px; border-radius:999px; background:#f4ede3; margin-top:7px; overflow:hidden} .si2-rb i{display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#e3c48d,#c49a5a)}
.si2-q{text-align:center; min-width:62px; padding:4px 6px; border-radius:12px; background:#faf6f0}
.si2-q b{display:block; font-size:22px; font-weight:800; color:#0e4a30; line-height:1.1} .si2-q span{font-size:11.5px; font-weight:700; color:#17734b}
.si2-empty{display:flex; flex-direction:column; align-items:center; gap:4px; padding:34px 16px; border-radius:16px; background:#fff; border:1px dashed #e3d5c1; color:var(--text-3)}
.si2-empty svg{width:30px; height:30px; color:#c9b79c} .si2-empty b{color:#135438; font-size:14px}
@media (max-width:860px){
  .si2-hero{grid-template-columns:1fr; padding:16px}
  .si2-h1 > b{font-size:40px}
  .si2-h2 > div{padding:10px} .si2-h2 b{font-size:16px}
  .si2-units{grid-template-columns:repeat(2,minmax(0,1fr))}
  .si2-u > b{font-size:26px}
  .si2-tg,.si2-list{grid-template-columns:1fr}
  .si2-r{padding:11px 12px; gap:10px}
}

/* عناوين الأقسام في «مبيعاتي بالأصناف»: أيقونة في مربع + عنوان تقيل + وصف جنبه (لون ثابت — الصفحة فاتحة دايماً) */
.si2-sec{align-items:center; gap:10px; margin:24px 2px 12px; padding-bottom:10px; border-bottom:1px solid #ece2d4}
.si2-sec h3{gap:10px; font-size:16.5px; color:#0e4a30!important}
.si2-sec h3 svg{width:34px; height:34px; padding:8px; box-sizing:border-box; border-radius:11px; background:linear-gradient(145deg,#f7efe3,#efe3d1); color:#17734b}
.si2-sec small{font-size:12px; color:#5f7d6e; background:#f6efe4; padding:3px 10px; border-radius:999px}

/* ===== تحصيل المناديب بأكتر من طريقة + مراجعة التحويلات ===== */
.rcx-box{display:flex; flex-direction:column; gap:10px}
.rcx-line{border:1px solid #e6dccd; border-radius:14px; background:#fff; padding:10px; display:flex; flex-direction:column; gap:10px}
.rcx-line.m-wallet{border-color:#e7b9b9} .rcx-line.m-instapay{border-color:#e2bacd} .rcx-line.m-bank{border-color:#bde2dd}
.rcx-mh{display:flex; align-items:center; gap:8px; flex-wrap:wrap}
.rcx-no{width:24px; height:24px; border-radius:50%; background:#0e4a30; color:#f3dfbd; display:grid; place-items:center; font-size:12px; font-weight:700; flex:none}
.rcx-ms{display:grid; grid-template-columns:repeat(auto-fit,minmax(62px,1fr)); gap:6px; flex:1 1 240px}
.rcx-ms button{display:flex; flex-direction:column; align-items:center; gap:3px; padding:8px 4px; border-radius:12px; border:1px solid #e6dccd; background:#faf6f0; font:600 12px var(--font); color:#28684c; cursor:pointer}
.rcx-ms button svg.i{width:18px; height:18px; color:#a8814a}
.rcx-ms button.on{background:#0e4a30; border-color:#0e4a30; color:#f3dfbd} .rcx-ms button.on svg.i{color:#e3c48d}
.rcx-amt{display:flex; align-items:center; gap:4px; flex:0 0 140px} .rcx-amt .inp{height:40px; font-weight:700} .rcx-amt span{font-size:12px; color:var(--text-3)}
.rcx-x{border:0; background:#fbeaea; color:#b3261e; width:32px; height:32px; border-radius:10px; display:grid; place-items:center; cursor:pointer}
.rcx-note{display:flex; gap:6px; align-items:flex-start; font-size:12px; color:#1a7e53; background:#fdf6e3; border-radius:10px; padding:7px 9px} .rcx-note svg{width:15px; height:15px; flex:none; margin-top:1px}
.rcx-accs{display:flex; gap:6px; flex-wrap:wrap} .rcx-accs.col{flex-direction:column}
.rcx-acc{display:flex; flex-direction:column; align-items:flex-start; gap:2px; padding:8px 10px; border-radius:12px; border:1px solid #e6dccd; background:#fff; cursor:pointer; font:inherit; text-align:start; min-width:130px}
.rcx-acc small{color:var(--text-3)} .rcx-acc.on{border-color:#0e4a30; box-shadow:0 0 0 2px rgba(9,51,33,.15); background:#faf6f0}
.rcx-dest{display:flex; align-items:center; gap:10px; padding:10px; border-radius:12px; background:#0e4a30; color:#f3dfbd}
.rcx-dest .rcx-di{width:36px; height:36px; border-radius:10px; background:rgba(255,255,255,.08); display:grid; place-items:center; flex:none} .rcx-dest .rcx-di svg{color:#e3c48d}
.rcx-dest>div{flex:1; min-width:0; display:flex; flex-direction:column} .rcx-dest small{opacity:.7; font-size:11px} .rcx-dest b{font-size:17px; letter-spacing:.5px; word-break:break-all} .rcx-dest em{font-style:normal; font-size:11.5px; opacity:.8}
.rcx-dest .btn{background:#e3c48d; color:#0e4a30; border:0}
.rcx-warn{color:#b3261e; font-size:13px}
.rcx-g{display:flex; flex-direction:column; gap:10px; min-width:0} .rcx-g .f{margin:0; min-width:0; width:100%; grid-column:auto}
.rcx-g .inp{width:100%; max-width:100%; min-width:0; box-sizing:border-box}
.rcx-box,.rcx-line,.rcx-mh,.rcx-dest,.rcx-proof{min-width:0; max-width:100%; box-sizing:border-box}
.rcx-line{overflow:hidden}
.inv-rc{min-width:0; max-width:100%; overflow:hidden}
.rcx-gal{display:inline-flex; align-items:center; gap:5px; padding:6px 10px; border-radius:10px; color:#28684c; font-size:12.5px; font-weight:600; cursor:pointer; background:#fff; border:1px solid #e6dccd}
.rcx-gal svg{width:16px; height:16px; color:#a8814a}
.cam-ov{position:fixed; inset:0; z-index:9999; background:#000; display:flex; flex-direction:column; color:#fff}
.cam-top{padding:calc(env(safe-area-inset-top) + 12px) 16px 10px; display:flex; flex-direction:column; gap:2px; text-align:center} .cam-top small{opacity:.75; font-size:12px}
.cam-v,.cam-prev{flex:1; min-height:0; width:100%; object-fit:contain; background:#000}
.cam-bar{display:flex; align-items:center; justify-content:space-around; padding:16px 16px calc(env(safe-area-inset-bottom) + 18px)}
.cam-b{width:52px; height:52px; border-radius:50%; border:0; background:rgba(255,255,255,.14); color:#fff; display:grid; place-items:center; cursor:pointer} .cam-b svg{width:24px; height:24px}
.cam-ok{background:#197c51}
.cam-shot{width:74px; height:74px; border-radius:50%; border:4px solid #fff; background:transparent; padding:4px; cursor:pointer} .cam-shot i{display:block; width:100%; height:100%; border-radius:50%; background:#fff}
.cam-shot:active i{transform:scale(.9)}
.cam-again{position:absolute; left:0; right:0; bottom:calc(env(safe-area-inset-bottom) + 108px); text-align:center}
.rcx-proof{display:flex; align-items:center; gap:10px; flex-wrap:wrap}
.rcx-proof img{width:84px; height:110px; object-fit:cover; border-radius:10px; border:1px solid #e6dccd; cursor:zoom-in}
.rcx-pic{flex:1 1 100%; width:100%; font-family:var(--font); display:flex; align-items:center; justify-content:center; gap:8px; min-height:56px; border:1.5px dashed #c9b79c; border-radius:12px; background:#faf6f0; color:#28684c; font-weight:600; font-size:13px; cursor:pointer; padding:8px; text-align:center}
.rcx-pic svg{width:22px; height:22px; color:#a8814a} .rcx-pic.busy{opacity:.6; pointer-events:none}
.rcx-foot{display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap}
.rcx-rest{font-size:12.5px; font-weight:600} .rcx-rest.ok{color:#197c51} .rcx-rest.bad{color:#b3261e}
.inv-rc{margin-top:-4px}
/* المراجعة */
.tr-g{border:1px solid #eee3d3; border-radius:14px; overflow:hidden; margin-bottom:10px; background:#fff}
.tr-gh{display:flex; align-items:center; gap:8px; padding:9px 12px; background:#faf6f0; flex-wrap:wrap} .tr-gh b{flex:1} .tr-gh span{font-size:12px; color:var(--text-3)} .tr-gh em{font-style:normal; color:#197c51; font-weight:700; font-size:12px}
.tr-r{display:flex; align-items:center; gap:10px; padding:10px 12px; border-top:1px solid #f1e8db}
.tr-r.ok{background:#f1faf5} .tr-r.rej{background:#fdf1f1} .tr-r.dup{box-shadow:inset 3px 0 0 #e0a100}
.tr-ok{width:34px; height:34px; flex:none; border-radius:50%; border:1.5px solid #c9b79c; background:#fff; color:transparent; display:grid; place-items:center; cursor:pointer}
.tr-ok.on{background:#197c51; border-color:#197c51; color:#fff} .tr-r.rej .tr-ok.on{background:#b3261e; border-color:#b3261e}
.tr-t{flex:1; min-width:0; display:flex; flex-direction:column; gap:2px} .tr-t span{font-size:12px; color:var(--text-3)} .tr-t small{font-size:12px; color:#28684c}
.tr-t em{font-style:normal; font-size:11.5px; display:inline-flex; gap:4px; align-items:center} .tr-t em svg{width:13px; height:13px}
.tr-t em.bad{color:#b3261e; font-weight:700} .tr-dup{color:#9a6b00} .tr-match{color:#197c51} .tr-rj{color:#b3261e} .tr-mv{color:#369488}
.tr-a{font-size:15px; white-space:nowrap} .tr-act{display:flex; gap:4px} .tr-no{color:#b3261e}
.tr-empty{padding:18px; text-align:center; color:var(--text-3); display:flex; gap:6px; justify-content:center}
.rj-acts{display:flex; flex-direction:column; gap:8px; margin-top:10px}
.rj-o{display:flex; gap:10px; align-items:flex-start; padding:10px; border:1px solid #e6dccd; border-radius:12px; cursor:pointer} .rj-o span{display:flex; flex-direction:column} .rj-o small{color:var(--text-3)}
.rj-o:has(input:checked){border-color:#0e4a30; background:#faf6f0}
.cv-k{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-bottom:12px}
.cv-k>div{background:#fff; border:1px solid #eee3d3; border-radius:14px; padding:12px; display:flex; flex-direction:column} .cv-k small{color:var(--text-3)} .cv-k b{font-size:20px} .cv-k em{font-style:normal; font-size:12px; color:var(--text-3)}
.cv-k .t-warn b{color:#9a6b00} .cv-k .t-ok b{color:#197c51} .cv-k .t-bad b{color:#b3261e}
.cv-bar{position:sticky; bottom:10px; z-index:5; display:flex; align-items:center; gap:14px; padding:10px 14px; margin-top:10px; border-radius:16px; background:#0e4a30; color:#f3dfbd; box-shadow:0 12px 30px -14px rgba(0,0,0,.6)}
.cv-bar>div{display:flex; flex-direction:column} .cv-bar small{opacity:.7; font-size:11px} .cv-bar .btn{margin-inline-start:auto}
.cv-seg{display:inline-flex; border:1px solid #e6dccd; border-radius:12px; overflow:hidden} .cv-seg button{border:0; background:#fff; padding:8px 12px; font:600 12.5px var(--font); color:#28684c; cursor:pointer} .cv-seg button.on{background:#0e4a30; color:#f3dfbd}
/* التسوية */
.se-sync,.cxc-sync{display:flex; gap:8px; align-items:flex-start; margin-top:12px; padding:9px 11px; border-radius:12px; background:#fdf6e3; color:#1a7e53; font-size:13px} .se-sync svg,.cxc-sync svg{width:16px; height:16px; flex:none}
.cxc-sync{margin:8px 0 0; font-size:12px}
.se-rjd{margin-top:8px; font-size:12.5px; color:#b3261e; display:flex; gap:6px; align-items:center}
.se-cash{display:grid; grid-template-columns:repeat(auto-fit,minmax(96px,1fr)); gap:6px; margin-bottom:8px}
.se-cash>div{background:#faf6f0; border-radius:10px; padding:7px 9px; display:flex; flex-direction:column} .se-cash small{font-size:11px; color:var(--text-3)} .se-cash b{font-size:15px}
.se-cash .ok b{color:#197c51} .se-cash .warn b{color:#9a6b00} .se-cash .bad b{color:#b3261e}
.cxc-tr{margin-top:6px} .cxc-tr .warn b{color:#9a6b00} .cxc-tr .bad b{color:#b3261e}
.st-rcp .rcpt{max-width:340px; margin:0 auto}
.st-rc .rr{display:flex; justify-content:space-between; gap:8px; padding:5px 0; border-bottom:1px dashed #ddd; font-size:13px}
/* كارت الحساب + فورم الحساب */
.fn-bcrv{display:flex; align-items:center; gap:6px; margin-top:8px; padding:7px 9px; border-radius:10px; background:#fdf6e3; color:#1a7e53; font-size:11.5px; text-decoration:none}
.fn-bcrv svg{width:14px; height:14px; flex:none} .fn-bcrv span{flex:1} .fn-bcrv em{font-style:normal; background:#1a7e53; color:#fff; border-radius:8px; padding:0 6px; font-size:11px}
.fn-rcr{margin-top:10px} .fn-rcr small{color:var(--text-3); display:block; margin-bottom:6px} .fn-rcr>div{display:flex; flex-wrap:wrap; gap:6px}
.chip-ck{display:inline-flex; align-items:center; gap:5px; padding:5px 9px; border:1px solid #e6dccd; border-radius:999px; font-size:12.5px; cursor:pointer} .chip-ck:has(input:checked){background:#0e4a30; color:#f3dfbd; border-color:#0e4a30}
/* عهدتي: تحويلاتي */
.mt-card{margin-top:12px; padding:12px} .mt-h{display:flex; gap:8px; align-items:center; margin-bottom:10px}
.mt-k{display:grid; grid-template-columns:repeat(auto-fit,minmax(90px,1fr)); gap:8px}
.mt-k>div{background:#faf6f0; border-radius:12px; padding:9px; display:flex; flex-direction:column} .mt-k small{font-size:11px; color:var(--text-3)} .mt-k em{font-style:normal; font-size:11px; color:var(--text-3)}
.mt-k .t-warn b{color:#9a6b00} .mt-k .t-ok b{color:#197c51} .mt-k .t-bad b{color:#b3261e}
.mt-pd,.mt-rj{margin-top:10px; display:flex; flex-direction:column; gap:6px}
.mt-r{padding:8px 10px; border-radius:10px; background:#fff; border:1px solid #eee3d3; display:flex; flex-direction:column} .mt-r small{color:var(--text-3); font-size:12px}
.mt-rj .mt-r{border-color:#f0c4c4; background:#fdf1f1} .mt-rj .mt-r b{color:#b3261e}
/* عرض الصورة */
.pv-sheet .pv-b{max-height:75vh; overflow:auto; text-align:center} .pv-b img{max-width:100%; border-radius:12px} .pv-h{padding:4px 0 10px}
@media (max-width:620px){ .cv-k{grid-template-columns:1fr 1fr 1fr; gap:6px} .cv-k b{font-size:15px} .tr-r{flex-wrap:wrap} .tr-a{order:3} .tr-act{order:4; margin-inline-start:auto} .rcx-amt{flex:1 1 100%} }

/* v276: مكنة الطباعة — اختبار ونسيان + التوقيت */
.btp-tools{display:flex; gap:8px; flex-wrap:wrap; margin:0 0 10px}
.btp-time{display:flex; gap:6px; align-items:flex-start; font-size:12.5px; line-height:1.6; color:var(--text-2); background:#f6f2ec; border-radius:10px; padding:8px 10px; margin:0 0 12px}
.btp-time svg{width:15px; height:15px; flex:none; margin-top:2px}
