
body{background:#000;color:#f5f5f5;font-family:'Cairo',sans-serif;margin:0;padding:0;min-height:100vh;overflow-x:hidden;}
      .flk-bg{position:fixed;inset:0;z-index:0;pointer-events:none;overflow:hidden;background:radial-gradient(ellipse at center,#1a0a0a 0%,#000 70%);}
      .flk-orb{position:absolute;border-radius:50%;filter:blur(120px);}
      .flk-orb-1{width:500px;height:500px;background:radial-gradient(circle,#ef4444,transparent 65%);top:-150px;right:-150px;opacity:.55;animation:flkOrb1 22s ease-in-out infinite;}
      .flk-orb-2{width:450px;height:450px;background:radial-gradient(circle,#dc2626,transparent 65%);bottom:-150px;left:-100px;opacity:.5;animation:flkOrb2 26s ease-in-out infinite;}
      @keyframes flkOrb1{0%,100%{transform:translate(0,0) scale(1);}50%{transform:translate(-40px,30px) scale(1.1);}}
      @keyframes flkOrb2{0%,100%{transform:translate(0,0) scale(1);}50%{transform:translate(50px,-40px) scale(1.1);}}
      .flk-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:20px;position:relative;z-index:1;}
      .flk-card{width:100%;max-width:480px;background:linear-gradient(160deg,rgba(30,10,10,.92),rgba(15,5,5,.96));border:2px solid rgba(239,68,68,.5);border-radius:28px;overflow:hidden;backdrop-filter:blur(30px);box-shadow:0 40px 100px rgba(0,0,0,.85),0 0 100px rgba(239,68,68,.3);animation:flkRise .8s cubic-bezier(.16,1,.3,1);}
      @keyframes flkRise{from{opacity:0;transform:translateY(40px) scale(.96);}to{opacity:1;transform:translateY(0) scale(1);}}
      .flk-hero{padding:40px 28px 26px;text-align:center;position:relative;border-bottom:1px solid rgba(255,255,255,.06);background:radial-gradient(ellipse at top,rgba(239,68,68,.18),transparent 65%);}
      .flk-ico-wrap{position:relative;width:100px;height:100px;margin:0 auto 22px;}
      .flk-ico-glow{position:absolute;inset:-28px;background:radial-gradient(circle,rgba(239,68,68,.55),transparent 60%);filter:blur(18px);animation:flkPulse 2.2s ease-in-out infinite;}
      @keyframes flkPulse{0%,100%{opacity:.55;transform:scale(1);}50%{opacity:1;transform:scale(1.18);}}
      .flk-ico-ring{position:absolute;inset:-10px;border:2.5px solid rgba(239,68,68,.45);border-top-color:rgba(239,68,68,.9);border-radius:50%;animation:flkSpin 3s linear infinite;}
      @keyframes flkSpin{from{transform:rotate(0);}to{transform:rotate(360deg);}}
      .flk-ico{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#ef4444,#b91c1c);border-radius:28px;font-size:48px;box-shadow:0 20px 50px rgba(239,68,68,.55),inset 0 2px 0 rgba(255,255,255,.2);}
      .flk-title{font-family:'Outfit',sans-serif;font-size:26px;font-weight:900;background-image:linear-gradient(135deg,#fff,#fca5a5,#fff);background-size:200% auto;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;animation:flkShine 5s ease-in-out infinite;margin-bottom:8px;}
      @keyframes flkShine{0%,100%{background-position:0% 50%;}50%{background-position:100% 50%;}}
      .flk-center{font-size:14px;color:#fca5a5;font-weight:800;margin-bottom:6px;}
      .flk-sub{font-size:12px;color:#9ca3af;font-weight:700;line-height:1.7;}
      .flk-body{padding:26px;}
      .flk-status{display:flex;align-items:center;gap:12px;padding:18px;background:linear-gradient(155deg,rgba(239,68,68,.12),rgba(239,68,68,.02));border:1.5px solid rgba(239,68,68,.35);border-radius:18px;margin-bottom:16px;}
      .flk-status-ico{width:48px;height:48px;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#ef4444,#b91c1c);border-radius:14px;color:#fff;flex-shrink:0;box-shadow:0 8px 22px rgba(239,68,68,.45);}
      .flk-status-t{flex:1;}
      .flk-status-lbl{font-size:10px;color:#fca5a5;font-weight:800;letter-spacing:.4px;margin-bottom:3px;text-transform:uppercase;}
      .flk-status-val{font-size:13px;color:#fff;font-weight:800;line-height:1.5;}
      .flk-reason-card{padding:14px 16px;background:rgba(0,0,0,.45);border:1px solid rgba(239,68,68,.2);border-radius:14px;margin-bottom:16px;}
      .flk-reason-lbl{font-size:10px;color:#fca5a5;font-weight:800;letter-spacing:.4px;margin-bottom:5px;}
      .flk-reason-txt{font-size:12.5px;color:#e5e7eb;font-weight:700;line-height:1.7;}
      .flk-contact{padding:14px 16px;background:linear-gradient(155deg,rgba(255,255,255,.03),rgba(255,255,255,.005));border:1px solid rgba(255,255,255,.07);border-radius:14px;margin-bottom:18px;}
      .flk-contact-h{font-size:11px;color:#fca5a5;font-weight:800;margin-bottom:8px;letter-spacing:.4px;}
      .flk-contact-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
      .flk-contact-btn{display:inline-flex;align-items:center;gap:7px;padding:9px 13px;background:linear-gradient(135deg,rgba(34,197,94,.15),rgba(34,197,94,.05));border:1.5px solid rgba(34,197,94,.35);border-radius:11px;color:#86efac;font-size:11.5px;font-weight:800;text-decoration:none;transition:all .2s;}
      .flk-contact-btn:hover{transform:translateY(-1px);box-shadow:0 6px 16px rgba(34,197,94,.25);}
      .flk-check{width:100%;padding:13px;background:linear-gradient(135deg,#374151,#1f2937);color:#e5e7eb;border:1px solid rgba(255,255,255,.1);border-radius:13px;font-family:'Cairo',sans-serif;font-size:12.5px;font-weight:800;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;transition:all .25s;}
      .flk-check:hover{background:linear-gradient(135deg,#4b5563,#374151);transform:translateY(-1px);}
      .flk-check-dot{width:8px;height:8px;border-radius:50%;background:#fbbf24;animation:flkBlink 1.5s ease-in-out infinite;}
      @keyframes flkBlink{0%,100%{opacity:1;transform:scale(1);}50%{opacity:.4;transform:scale(.85);}}
      .flk-footer{padding:14px 26px 22px;text-align:center;border-top:1px solid rgba(255,255,255,.05);font-size:10px;color:#6b7280;font-weight:700;}
      .flk-footer a{color:#fca5a5;}
    
/* أشكال القائمة السفلية البديلة (يتحكم بها صاحب النظام) */
.cxbar-wrap[data-shape="full"]{max-width:100%!important;width:100%!important;left:0;transform:none;bottom:0;gap:0;border-radius:0;}
.cxbar-wrap[data-shape="full"] .cxbar-pill{border-radius:0;height:60px;}
.cxbar-wrap[data-shape="full"] .cxbar-query{border-radius:0;height:60px;width:60px;}
.cxbar-wrap[data-shape="floating"] .cxbar-query{display:none;}
.cxbar-wrap[data-shape="floating"] .cxbar-pill{flex:1;}
.cxbar-wrap[data-shape="minimal"] .cxtab span:not(.cxtab-ico):not(.cxbadge){display:none;}
.cxbar-wrap[data-shape="minimal"] .cxbar-pill{height:58px;}
/* شكل docked: شريط ممتد بحواف علوية دائرية + زر مركزي بارز */
.cxbar-wrap[data-shape="docked"]{max-width:100%!important;width:100%!important;left:0;right:0;transform:none;bottom:0;gap:0;border-radius:0;padding:0;align-items:flex-end;overflow:visible;}
.cxbar-wrap[data-shape="docked"] .cxbar-pill{flex:1;border-radius:0;height:64px;overflow:visible;box-shadow:0 -2px 16px rgba(0,0,0,.12);}
.cxbar-wrap[data-shape="docked"] .cxbar-query{position:absolute;left:50%;top:auto;bottom:48px;transform:translateX(-50%);width:62px;height:62px;border-radius:50%;z-index:10;background:linear-gradient(160deg,#FF8A3D,#F26C1E)!important;border:none!important;color:#fff!important;backdrop-filter:none!important;box-shadow:0 6px 16px rgba(242,108,30,.40)!important;}
.cxbar-wrap[data-shape="docked"] .cxbar-query svg{stroke:#fff!important;width:28px!important;height:28px!important;}
.cxbar-wrap.nvc-no-labels .cxtab span:not(.cxtab-ico):not(.cxbadge){display:none;}
.cxbar-wrap.nvc-no-glass .cxbar-pill,.cxbar-wrap.nvc-no-glass .cxbar-query{backdrop-filter:none;-webkit-backdrop-filter:none;background:#0c0e11;}
/* لون التمييز القابل للتغيير */
.cxtab.on{color:var(--nvc-accent,#5ec5e0)!important;}
.cxtab.on .cxtab-ico{filter:drop-shadow(0 3px 8px var(--nvc-accent,rgba(94,197,224,.45)))!important;}
.cxbar-query.on{color:var(--nvc-accent,#5ec5e0)!important;border-color:var(--nvc-accent,#5ec5e0)!important;}
.cxq-spark{color:var(--nvc-accent,#5ec5e0)!important;}

/* إظهار القائمة السفلية على الكمبيوتر (يتحكم به صاحب النظام) */
.cxbar-wrap.nvc-desktop{display:flex!important;}

/* ═══ تحكّم صاحب النظام: القائمة السفلية ═══ */
.cxbar-wrap .cxbar-pill, .cxbar-wrap .cxbar-query{
  background:var(--cx-bg, rgba(12,14,17,.72))!important;
  border-color:var(--cx-bdr, rgba(94,197,224,.18))!important;
}
.cxbar-wrap.nvc-no-glass .cxbar-pill, .cxbar-wrap.nvc-no-glass .cxbar-query{
  backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
}
.cxtab.on{color:var(--nvc-accent,#5ec5e0)!important;}
.cxtab.on .cxtab-ico{filter:drop-shadow(0 3px 8px var(--nvc-accent,rgba(94,197,224,.5)))!important;}
.cxbar-query.on{color:var(--nvc-accent,#5ec5e0)!important;border-color:var(--nvc-accent,#5ec5e0)!important;box-shadow:0 0 0 1px var(--nvc-accent,#5ec5e0)!important;}
.cxq-spark{color:var(--nvc-accent,#5ec5e0)!important;}
/* أشكال القائمة */
.cxbar-wrap[data-shape="full"]{max-width:100%!important;width:100%!important;left:0!important;transform:none!important;bottom:0!important;gap:0!important;}
.cxbar-wrap[data-shape="full"] .cxbar-pill{border-radius:0!important;height:62px;}
.cxbar-wrap[data-shape="full"] .cxbar-query{border-radius:0!important;height:62px;width:62px;}
.cxbar-wrap[data-shape="floating"] .cxbar-query{display:none!important;}
.cxbar-wrap[data-shape="minimal"] .cxtab span:not(.cxtab-ico):not(.cxbadge){display:none!important;}
.cxbar-wrap[data-shape="minimal"] .cxbar-pill{height:58px;}
.cxbar-wrap[data-shape="docked"]{max-width:100%!important;width:100%!important;left:0!important;right:0!important;transform:none!important;bottom:0!important;gap:0!important;align-items:flex-end!important;overflow:visible!important;}
.cxbar-wrap[data-shape="docked"] .cxbar-pill{flex:1;border-radius:0!important;height:64px;overflow:visible;}
.cxbar-wrap[data-shape="docked"] .cxbar-query{position:absolute!important;left:50%!important;top:auto!important;bottom:48px!important;transform:translateX(-50%)!important;width:62px;height:62px;border-radius:50%!important;z-index:10;background:linear-gradient(160deg,#FF8A3D,#F26C1E)!important;border:none!important;color:#fff!important;backdrop-filter:none!important;box-shadow:0 6px 16px rgba(242,108,30,.40)!important;}
.cxbar-wrap[data-shape="docked"] .cxbar-query svg{stroke:#fff!important;width:28px!important;height:28px!important;}
.cxbar-wrap.nvc-no-labels .cxtab span:not(.cxtab-ico):not(.cxbadge){display:none!important;}
.cxbar-wrap.nvc-desktop{display:flex!important;}

/* ═══ تحكّم صاحب النظام: الشريط الجانبي ═══ */
#dash-sb .sb-nav-item.on, #dash-sb .sb-nav-item.is-active{color:var(--nvc-sb-accent,#5ec5e0)!important;}
#dash-sb .sb-nav-item.on .ni, #dash-sb .sb-nav-item.is-active .ni{color:var(--nvc-sb-accent,#5ec5e0)!important;}
body.nvc-sb-flat #dash-sb .sb-nav-item{border-radius:0!important;}
body.nvc-sb-rounded #dash-sb .sb-nav-item{border-radius:16px!important;}
body.nvc-sb-compact #dash-sb .sb-nav-item{padding-top:7px!important;padding-bottom:7px!important;font-size:12.5px!important;}
body.nvc-sb-compact #dash-sb .sb-section-label{margin-top:8px!important;margin-bottom:4px!important;}
body.nvc-sb-nodividers #dash-sb .sb-section-label{display:none!important;}
body.nvc-sb-glass #dash-sb{backdrop-filter:blur(20px) saturate(160%);-webkit-backdrop-filter:blur(20px) saturate(160%);
  background:rgba(12,14,17,calc(var(--nvc-sb-op,0.85)))!important;}



body{background:#000;color:#f5f5f5;font-family:'Cairo',sans-serif;margin:0;padding:0;min-height:100vh;overflow-x:hidden;}
      .sup-bg{position:fixed;inset:0;z-index:0;pointer-events:none;overflow:hidden;}
      .sup-orb{position:absolute;border-radius:50%;filter:blur(120px);opacity:.5;}
      .sup-orb-1{width:500px;height:500px;background:radial-gradient(circle,#a855f7,transparent 65%);top:-200px;right:-150px;animation:supOrb1 28s ease-in-out infinite;}
      .sup-orb-2{width:400px;height:400px;background:radial-gradient(circle,#ec4899,transparent 65%);bottom:-180px;left:-130px;animation:supOrb2 32s ease-in-out infinite;}
      @keyframes supOrb1{0%,100%{transform:translate(0,0) scale(1);}50%{transform:translate(-50px,40px) scale(1.1);}}
      @keyframes supOrb2{0%,100%{transform:translate(0,0) scale(1);}50%{transform:translate(60px,-40px) scale(1.1);}}
      .sup-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:20px;position:relative;z-index:1;}
      .sup-card{width:100%;max-width:480px;background:linear-gradient(160deg,rgba(20,15,30,.88),rgba(15,10,25,.94));border:1.5px solid rgba(168,85,247,.4);border-radius:28px;overflow:hidden;backdrop-filter:blur(30px);box-shadow:0 40px 100px rgba(0,0,0,.7),0 0 100px rgba(168,85,247,.2);animation:supRise .8s cubic-bezier(.16,1,.3,1);}
      @keyframes supRise{from{opacity:0;transform:translateY(30px) scale(.97);}to{opacity:1;transform:translateY(0) scale(1);}}
      .sup-hero{padding:34px 28px 24px;text-align:center;position:relative;border-bottom:1px solid rgba(255,255,255,.06);background:radial-gradient(ellipse at top,rgba(168,85,247,.15),transparent 65%);}
      .sup-ico-wrap{position:relative;width:90px;height:90px;margin:0 auto 18px;}
      .sup-ico-glow{position:absolute;inset:-25px;background:radial-gradient(circle,rgba(168,85,247,.5),transparent 60%);filter:blur(15px);animation:supPulse 2.5s ease-in-out infinite;}
      @keyframes supPulse{0%,100%{opacity:.6;transform:scale(1);}50%{opacity:1;transform:scale(1.15);}}
      .sup-ico-ring{position:absolute;inset:-8px;border:2px dashed rgba(192,132,252,.4);border-radius:50%;animation:supRing 8s linear infinite;}
      @keyframes supRing{from{transform:rotate(0);}to{transform:rotate(360deg);}}
      .sup-ico{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#a855f7,#7c3aed);border-radius:26px;font-size:44px;box-shadow:0 18px 44px rgba(168,85,247,.5),inset 0 2px 0 rgba(255,255,255,.2);}
      .sup-title{font-family:'Outfit',sans-serif;font-size:24px;font-weight:900;background-image:linear-gradient(135deg,#fff,#c084fc,#fff);background-size:200% auto;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;animation:supShine 5s ease-in-out infinite;margin-bottom:8px;}
      @keyframes supShine{0%,100%{background-position:0% 50%;}50%{background-position:100% 50%;}}
      .sup-center{font-size:13px;color:#a78bfa;font-weight:800;margin-bottom:4px;}
      .sup-sub{font-size:12px;color:#9ca3af;font-weight:700;line-height:1.7;}
      .sup-body{padding:24px 26px;}
      .sup-countdown{display:flex;align-items:center;justify-content:center;gap:12px;padding:18px;background:linear-gradient(155deg,rgba(168,85,247,.1),rgba(168,85,247,.02));border:1.5px solid rgba(192,132,252,.3);border-radius:18px;margin-bottom:16px;}
      .sup-countdown-ico{width:48px;height:48px;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#a855f7,#7c3aed);border-radius:14px;color:#fff;flex-shrink:0;box-shadow:0 8px 20px rgba(168,85,247,.4);}
      .sup-countdown-info{flex:1;}
      .sup-countdown-lbl{font-size:11px;color:#9ca3af;font-weight:800;margin-bottom:4px;}
      .sup-countdown-val{font-family:'Outfit',sans-serif;font-size:22px;font-weight:900;color:#c084fc;letter-spacing:-.4px;line-height:1;margin-bottom:3px;}
      .sup-countdown-end{font-size:10.5px;color:#a1a1aa;font-weight:700;}
      .sup-reason{padding:14px 16px;background:rgba(245,158,11,.05);border:1px solid rgba(251,191,36,.25);border-right:3px solid #fbbf24;border-radius:12px;margin-bottom:18px;}
      .sup-reason-lbl{font-size:10.5px;color:#fbbf24;font-weight:900;margin-bottom:5px;letter-spacing:.3px;}
      .sup-reason-txt{font-size:12.5px;color:#d4d4d8;line-height:1.7;font-weight:700;}
      .sup-contact{padding:16px;background:linear-gradient(155deg,rgba(0,0,0,.4),rgba(168,85,247,.04));border:1px solid rgba(255,255,255,.06);border-radius:14px;}
      .sup-contact-h{font-size:11.5px;color:#9ca3af;font-weight:800;margin-bottom:12px;text-align:center;}
      .sup-contact-row{display:grid;grid-template-columns:1fr 1fr;gap:8px;}
      .sup-cb{display:flex;align-items:center;gap:9px;padding:11px 12px;background:rgba(255,255,255,.04);border:1.5px solid rgba(255,255,255,.08);border-radius:12px;color:#fff;text-decoration:none;font-weight:800;transition:all .25s;}
      .sup-cb:hover{transform:translateY(-2px);}
      .sup-cb-call{background:linear-gradient(135deg,rgba(59,130,246,.15),rgba(37,99,235,.06));border-color:rgba(59,130,246,.3);}
      .sup-cb-call:hover{box-shadow:0 10px 24px rgba(59,130,246,.3);}
      .sup-cb-wa{background:linear-gradient(135deg,rgba(37,211,102,.15),rgba(30,189,91,.06));border-color:rgba(37,211,102,.3);}
      .sup-cb-wa:hover{box-shadow:0 10px 24px rgba(37,211,102,.3);}
      .sup-cb-ico{width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:10px;color:#fff;flex-shrink:0;}
      .sup-cb-call .sup-cb-ico{background:linear-gradient(135deg,#3B82F6,#1d4ed8);box-shadow:0 6px 14px rgba(59,130,246,.4);}
      .sup-cb-wa .sup-cb-ico{background:linear-gradient(135deg,#25D366,#1ebd5b);box-shadow:0 6px 14px rgba(37,211,102,.4);}
      .sup-cb-text{flex:1;min-width:0;}
      .sup-cb-lbl{font-size:9.5px;color:#9ca3af;font-weight:800;margin-bottom:2px;}
      .sup-cb-val{font-family:'Outfit',sans-serif;font-size:12.5px;font-weight:900;color:#fff;direction:ltr;text-align:right;}
      .sup-cb-call .sup-cb-val{color:#93c5fd;}
      .sup-cb-wa .sup-cb-val{color:#86efac;}
      .sup-retry{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;margin-top:14px;padding:11px;background:transparent;border:1px dashed rgba(255,255,255,.15);color:#9ca3af;border-radius:11px;font-family:'Cairo',sans-serif;font-size:11.5px;font-weight:800;cursor:pointer;transition:all .25s;}
      .sup-retry:hover{color:#c084fc;border-color:rgba(192,132,252,.4);background:rgba(168,85,247,.05);}



@keyframes prFadeUp { from { opacity:0; transform:translateY(30px); } to { opacity:1; transform:translateY(0); } }
      @keyframes prShine { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
      @keyframes prFloat { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-6px); } }
      @keyframes prPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(212,175,55,0.5); } 50% { box-shadow: 0 0 0 14px rgba(212,175,55,0); } }
      @keyframes prRingRotate { from { transform:rotate(0deg); } to { transform:rotate(360deg); } }
      @keyframes prSparkle { 0%,100% { opacity:0; transform:scale(0); } 50% { opacity:1; transform:scale(1); } }
      @keyframes prParticleUp {
        0% { transform:translateY(100vh) translateX(0); opacity:0; }
        10% { opacity:1; }
        90% { opacity:0.8; }
        100% { transform:translateY(-20vh) translateX(40px); opacity:0; }
      }
      @keyframes prCardGlow {
        0%,100% { box-shadow:0 20px 60px rgba(212,175,55,0.30), 0 0 0 2px var(--featured-color, #d4af37); }
        50% { box-shadow:0 28px 80px rgba(212,175,55,0.55), 0 0 0 2px var(--featured-color, #d4af37); }
      }
      @keyframes prRibbon {
        0%,100% { transform:translateX(-50%) translateY(0) rotate(0deg); }
        50% { transform:translateX(-50%) translateY(-3px) rotate(-1deg); }
      }
      @keyframes prCornerGlow {
        0%,100% { opacity:0.5; }
        50% { opacity:1; }
      }
      .pr-card { transition: all 0.4s cubic-bezier(.16,1,.3,1); cursor:pointer; position:relative; }
      .pr-card:hover { transform:translateY(-10px) scale(1.02); }
      .pr-card:hover .pr-cta { transform:translateY(-2px); }
      .pr-card.pr-featured { transform:translateY(-12px); animation:prCardGlow 3s ease-in-out infinite; }
      .pr-card.pr-featured:hover { transform:translateY(-22px) scale(1.03); }
      .pr-cta { transition: all 0.25s; position:relative; overflow:hidden; }
      .pr-cta::before {
        content:''; position:absolute; top:0; left:-100%;
        width:100%; height:100%;
        background:linear-gradient(90deg,transparent,rgba(255,255,255,0.35),transparent);
        transition: left 0.6s ease;
      }
      .pr-cta:hover::before { left:100%; }
      .pr-perk { transition: all 0.2s; }
      .pr-card:hover .pr-perk { transform:translateX(-2px); }
      .pr-bg-orb {
        position:absolute; border-radius:50%; pointer-events:none;
        filter: blur(80px); opacity:0.6;
      }
      .pr-sparkle {
        position:absolute; pointer-events:none;
        color:#d4af37; opacity:0;
        animation:prSparkle 2s ease-in-out infinite;
      }
      .pr-particle {
        position:fixed; bottom:0;
        width:4px; height:4px;
        background:radial-gradient(circle,#d4af37,transparent);
        border-radius:50%;
        pointer-events:none;
        z-index:-1;
        animation:prParticleUp 15s linear infinite;
      }
      .pr-corner-glow {
        position:absolute; pointer-events:none;
        width:120px;height:120px;border-radius:50%;
        filter:blur(40px);
        animation:prCornerGlow 4s ease-in-out infinite;
      }



@keyframes fgFadeIn { from { opacity: 0; } to { opacity: 1; } }
      @keyframes fgCardIn { from { opacity: 0; transform: translateY(24px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
      @keyframes fgIconPulse { 0%,100% { transform: scale(1) rotate(-5deg); } 50% { transform: scale(1.08) rotate(5deg); } }
      @keyframes fgGoldShine { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }



*{box-sizing:border-box;margin:0;padding:0;}
@page{size:A4;margin:12mm 10mm;}
body{font-family:'Cairo','Tajawal','Segoe UI',Arial,sans-serif;color:#1a1a1a;background:#fff;line-height:1.6;}
.page{max-width:1100px;margin:0 auto;padding:18px;}
.brand-bar{
  display:flex;align-items:center;gap:14px;
  margin-bottom:18px;padding:14px 20px;
  background:linear-gradient(135deg,#fdf8eb 0%,#faf3e0 50%,#fdf8eb 100%);
  border:1.5px solid #C9A84C;border-radius:14px;
}
.brand-bar-logo{
  width:48px;height:48px;
  display:flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg,#fef3c7,#C9A84C);
  border-radius:11px;overflow:hidden;
  box-shadow:0 6px 16px rgba(201,168,76,.35);
}
.brand-bar-logo img{width:80%;height:80%;object-fit:contain;}
.brand-bar-text{flex:1;}
.brand-bar-title{font-size:16px;font-weight:900;color:#5A4520;letter-spacing:-.3px;}
.brand-bar-sub{font-size:11px;color:#7A6420;font-weight:700;margin-top:2px;}
.hdr{
  display:flex;justify-content:space-between;align-items:flex-end;
  padding:18px 22px;margin-bottom:14px;
  background:linear-gradient(135deg,#1a1a1a 0%,#2d2100 100%);
  border-radius:14px;color:#C9A84C;
}
.hdr-l{display:flex;align-items:center;gap:14px;}
.hdr-l .lg{
  width:56px;height:56px;background:#fff;border-radius:13px;
  display:flex;align-items:center;justify-content:center;
  overflow:hidden;box-shadow:0 6px 16px rgba(201,168,76,.4);
}
.hdr-l .lg img{width:100%;height:100%;object-fit:contain;}
.hdr-l .lg .ph{font-size:28px;}
.hdr-name{font-size:17px;font-weight:900;color:#fde68a;}
.hdr-sub{font-size:11px;color:#C9A84C;margin-top:3px;}
.hdr-r{text-align:left;}
.hdr-title{font-size:15px;font-weight:900;color:#fde68a;letter-spacing:.3px;}
.hdr-date{font-size:12px;color:#C9A84C;margin-top:4px;font-weight:700;}
.hdr-tag{font-size:10px;color:#9F7E1C;margin-top:2px;}
.hero{
  background:linear-gradient(135deg,#9F7E1C,#C9A84C);
  border-radius:16px;padding:22px;margin-bottom:14px;
  display:flex;justify-content:space-between;align-items:center;color:#fff;
  box-shadow:0 12px 28px rgba(201,168,76,.3);
}
.hero-l{font-size:14px;font-weight:800;margin-bottom:5px;opacity:.95;}
.hero-sub{font-size:11px;opacity:.85;}
.hero-v{font-size:36px;font-weight:900;letter-spacing:-1px;text-shadow:0 2px 4px rgba(0,0,0,.2);}
.kpi-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:16px;}
.kpi{padding:14px;background:#fafafa;border:1px solid #e5e5e5;border-radius:12px;text-align:center;}
.kpi-l{font-size:10.5px;color:#666;font-weight:700;margin-bottom:6px;letter-spacing:.3px;}
.kpi-v{font-size:18px;font-weight:900;color:#1a1a1a;letter-spacing:-.3px;}
.kpi-v.green{color:#15803d;}
.kpi-v.red{color:#dc2626;}
.kpi-v.gold{color:#9F7E1C;}
.sec{margin-bottom:14px;page-break-inside:avoid;}
.sec-h{display:flex;align-items:center;gap:10px;padding:10px 14px;background:linear-gradient(135deg,#1a1a1a,#2d2100);color:#C9A84C;border-radius:10px 10px 0 0;}
.sec-h-ico{font-size:18px;}
.sec-h-title{font-size:13px;font-weight:900;letter-spacing:.3px;}
.sec-b{background:#fff;border:1px solid #e5e5e5;border-top:none;border-radius:0 0 12px 12px;padding:14px;}
table{width:100%;border-collapse:collapse;}
th{background:linear-gradient(135deg,#0a0800,#2d2100);color:#C9A84C;padding:9px 12px;text-align:right;font-size:11px;font-weight:800;}
td{padding:8px 12px;border-bottom:1px solid #f0f0f0;font-size:11.5px;font-weight:700;color:#333;}
tr:hover td{background:#fafafa;}
tr.best-day td{background:linear-gradient(90deg,#fef3c7,transparent);}
.fc-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.fc-card{padding:12px;background:#fff;border:1.5px solid #e5e5e5;border-radius:10px;}
.fc-h{font-size:12px;font-weight:900;color:#1a1a1a;margin-bottom:8px;}
.fc-row{display:flex;justify-content:space-between;padding:5px 0;font-size:11px;border-bottom:1px dashed #eee;}
.fc-row:last-child{border-bottom:none;}
.fc-row-l{color:#666;font-weight:700;}
.fc-row-v{font-weight:900;}
.footer{margin-top:24px;padding:14px;text-align:center;border-top:1px solid #ddd;font-size:10px;color:#999;}
.footer .o{font-weight:900;color:#5A4520;}
.print-bar{position:sticky;top:0;background:#1a1a1a;padding:10px;display:flex;gap:8px;justify-content:center;margin:-12mm -10mm 14px;}
.print-bar button{padding:9px 20px;background:linear-gradient(135deg,#C9A84C,#9F7E1C);color:#fff;border:none;border-radius:8px;font-weight:800;cursor:pointer;font-size:12px;font-family:inherit;}
@media print{.print-bar{display:none;}body{padding:0;}.sec{page-break-inside:avoid;}.hero,th{-webkit-print-color-adjust:exact;print-color-adjust:exact;}}



*{box-sizing:border-box;margin:0;padding:0;font-family:'Cairo',sans-serif;}
@page{size:A4;margin:12mm 10mm;}
body{font-family:'Cairo',sans-serif;color:#1f2430;background:#eef1f5;line-height:1.55;}
/* 🆕 قسم تفاصيل المركبة */
.z-vehicle{border:1px solid #e8ebf0;border-radius:14px;overflow:hidden;margin-bottom:16px;box-shadow:0 2px 8px rgba(0,0,0,.03);}
.z-vehicle-h{background:linear-gradient(135deg,#0e2a47,#1a4971);color:#fff;font-size:12px;font-weight:900;padding:11px 16px;letter-spacing:.2px;display:flex;align-items:center;gap:9px;}
.z-veh-ico{font-size:16px;}
.z-vehicle-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;padding:16px;background:#fafbfc;}
.z-vcell{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid #eef0f3;border-radius:11px;padding:11px 13px;}
.z-vcell-ic{width:34px;height:34px;flex-shrink:0;display:flex;align-items:center;justify-content:center;border-radius:9px;font-size:16px;background:linear-gradient(135deg,#eef4fb,#e0ecf8);}
.z-vcell-tx{display:flex;flex-direction:column;gap:2px;min-width:0;}
.z-vcell-tx span{color:#5a6472;font-weight:700;font-size:9.5px;}
.z-vcell-tx b{color:#1f2430;font-weight:900;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
@media(max-width:560px){.z-vehicle-grid{grid-template-columns:repeat(2,1fr);gap:9px;padding:12px;}}
.inv-page{max-width:820px;margin:0 auto;padding:0;background:#fff;}
.print-bar{position:sticky;top:0;background:#11131a;padding:11px;display:flex;gap:8px;justify-content:center;z-index:10;}
.print-bar button{padding:9px 22px;background:linear-gradient(135deg,#C9A84C,#9F7E1C);color:#fff;border:none;border-radius:9px;font-weight:800;cursor:pointer;font-family:inherit;font-size:13px;}
.z-invoice{padding:26px 30px 30px;}
.z-top{display:flex;justify-content:space-between;align-items:flex-start;padding-bottom:16px;border-bottom:3px solid #C9A84C;margin-bottom:18px;}
.z-top-r{display:flex;align-items:center;gap:13px;}
.z-logo{width:58px;height:58px;border-radius:13px;background:linear-gradient(135deg,#fdf6e3,#f0e2bd);display:flex;align-items:center;justify-content:center;overflow:hidden;border:1px solid #e8d9ad;flex-shrink:0;}
.z-logo img{width:100%;height:100%;object-fit:contain;}
.z-logo span{font-size:28px;}
.z-seller-name{font-size:18px;font-weight:900;color:#1a1a1a;letter-spacing:-.3px;}
.z-seller-sub{font-size:11.5px;color:#8a8a8a;font-weight:700;margin-top:3px;}
.z-top-l{text-align:left;}
.z-doc-title{font-size:20px;font-weight:900;color:#9F7E1C;letter-spacing:-.5px;}
.z-doc-title-en{font-size:10px;font-weight:800;color:#8a8a8a;letter-spacing:2px;margin-bottom:6px;}
.zb{display:inline-block;padding:4px 13px;border-radius:20px;font-size:10.5px;font-weight:900;}
.zb-paid{background:#dcfce7;color:#15803d;border:1px solid #86efac;}
.zb-due{background:#fee2e2;color:#dc2626;border:1px solid #fca5a5;}
.zb-refund{background:#f3e8ff;color:#9333ea;border:1px solid #d8b4fe;}
.z-meta{display:flex;justify-content:space-between;align-items:center;gap:18px;background:linear-gradient(135deg,#fafbfc,#f3f5f8);border:1px solid #e8ebf0;border-radius:13px;padding:14px 18px;margin-bottom:16px;}
.z-meta-info{flex:1;display:grid;grid-template-columns:1fr 1fr;gap:7px 22px;}
.z-mrow{display:flex;justify-content:space-between;font-size:11.5px;border-bottom:1px dashed #e3e6eb;padding-bottom:5px;}
.z-mrow span{color:#5a6472;font-weight:700;}
.z-mrow b{color:#1f2430;font-weight:900;}
.z-qr{width:108px;height:108px;flex-shrink:0;background:#fff;border:1px solid #e3e6eb;border-radius:10px;padding:4px;}
.z-qr-grid{width:100%;height:100%;display:grid;grid-template-columns:repeat(7,1fr);grid-template-rows:repeat(7,1fr);gap:1px;}
.z-qr-grid span{background:#fff;border-radius:1px;}
.z-qr-grid span.on{background:#1a1a1a;}
.z-parties{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:16px;align-items:stretch;}
.z-party{border:1px solid #e8ebf0;border-radius:12px;overflow:hidden;display:flex;flex-direction:column;background:#fff;}
.z-party-h{background:linear-gradient(135deg,#0e2a47,#1a4971);color:#fff;font-size:11px;font-weight:900;padding:9px 14px;letter-spacing:.3px;}
.z-prow{display:flex;justify-content:space-between;padding:7px 14px;font-size:11.5px;border-bottom:1px dashed #eef0f3;}
.z-prow:last-child{border-bottom:none;}
.z-prow span{color:#5a6472;font-weight:700;}
.z-prow b{color:#1f2430;font-weight:900;text-align:left;}
.z-muted b{color:#9098a5;}
.z-table{width:100%;table-layout:fixed;border-collapse:collapse;margin-bottom:16px;border-radius:12px;overflow:hidden;border:1px solid #e8ebf0;}
.z-table thead th{background:linear-gradient(135deg,#0e2a47,#1a4971);color:#fff;font-size:9.5px;font-weight:800;padding:9px 5px;text-align:center;line-height:1.3;}
.z-table thead th:nth-child(2){text-align:right;}
.z-table tbody td{padding:10px 5px;font-size:10.5px;font-weight:700;border-bottom:1px solid #f0f2f5;color:#1f2430;vertical-align:middle;text-align:center;word-break:break-word;}
.z-table tbody td:nth-child(2){text-align:right;}
.z-table .z-num{font-family:'Cairo';direction:ltr;}
.z-table tbody tr:last-child td{border-bottom:none;}
.z-table .z-c{text-align:center;}
.z-table .z-num{text-align:center;font-weight:800;direction:ltr;}
.z-desc strong{font-weight:900;color:#1a1a1a;}
.z-sub{font-size:10px;color:#5a6472;font-weight:700;margin-top:3px;}
.z-note{font-size:11px;font-weight:800;padding:10px 14px;border-radius:10px;margin-bottom:14px;}
.z-loyal{background:linear-gradient(135deg,#fef9c3,#fef3c7);color:#a16207;border:1px solid #fde68a;}
.z-summary-wrap{display:flex;justify-content:space-between;gap:18px;margin-bottom:16px;align-items:flex-start;flex-wrap:wrap;}
.z-summary-side{flex:1;min-width:240px;}
.z-pay{font-size:11.5px;margin-bottom:12px;background:#fafbfc;border:1px solid #eef0f3;border-radius:11px;padding:11px 14px;}
.z-pay span{color:#5a6472;font-weight:700;display:block;margin-bottom:4px;font-size:10px;}
.z-pay b{color:#1f2430;font-weight:900;font-size:12.5px;}
.z-legal{font-size:9px;color:#4b5563;font-weight:700;line-height:1.6;max-width:340px;}
.z-summary{width:290px;flex-shrink:0;border:1px solid #e8ebf0;border-radius:12px;overflow:hidden;align-self:flex-start;}
.z-srow{display:flex;justify-content:space-between;padding:10px 16px;font-size:12px;border-bottom:1px solid #f0f2f5;}
.z-srow span{color:#4b5563;font-weight:700;}
.z-srow b{color:#1f2430;font-weight:900;direction:ltr;}
.z-srow.z-total{background:linear-gradient(135deg,#9F7E1C,#C9A84C);border-bottom:none;}
.z-srow.z-total span{color:#fff;font-size:13px;font-weight:900;}
.z-srow.z-total b{color:#fff;font-size:16px;}
.z-refund{border:1.5px solid #d8b4fe;border-radius:12px;overflow:hidden;margin-bottom:16px;}
.z-refund-h{background:linear-gradient(135deg,#7c3aed,#9333ea);color:#fff;font-size:11.5px;font-weight:900;padding:9px 14px;}
.z-rgrid{display:grid;grid-template-columns:1fr 1fr;gap:8px 18px;padding:13px 16px;background:#faf5ff;}
.z-rgrid>div{display:flex;justify-content:space-between;font-size:11.5px;border-bottom:1px dashed #e9d5ff;padding-bottom:5px;}
.z-rgrid>div span{color:#5a6472;font-weight:700;}
.z-rgrid>div b{color:#7c3aed;font-weight:900;}
.z-rfull{grid-column:1/-1;}
.z-foot{text-align:center;padding-top:16px;border-top:2px solid #eef0f3;font-size:11px;color:#5a6472;font-weight:700;}
.z-foot-sys{font-size:10px;color:#9098a5;margin-top:5px;}
.z-foot-sys strong{color:#9F7E1C;}
.z-foot-link{font-size:9.5px;color:#5a6472;font-weight:700;margin-top:6px;word-break:break-all;}
.z-foot-link span{color:#9F7E1C;}
.inv-page:not(:last-child){page-break-after:always;}
@media print{.print-bar{display:none;}body{background:#fff;}.z-invoice{padding:0;}.z-party,.z-table,.z-summary,.z-refund,.z-meta,.z-vehicle{page-break-inside:avoid;}.z-top,.z-party-h,.z-table thead th,.z-srow.z-total,.z-refund-h,.z-vehicle-h{-webkit-print-color-adjust:exact;print-color-adjust:exact;}.z-top{margin-bottom:8px;padding-bottom:8px;}.z-meta{margin-bottom:8px;}.z-parties{margin-bottom:8px;gap:10px;}.z-vehicle{margin-bottom:8px;}.z-vehicle-grid{padding:9px;gap:7px;}.z-table{margin-bottom:8px;}.z-table thead th{padding:6px 4px;}.z-table tbody td{padding:7px 4px;}.z-summary-wrap{margin-bottom:8px;}.z-prow{padding:5px 12px;}.z-vcell{padding:8px 10px;}.z-foot{padding-top:8px;margin-bottom:0;}.z-legal{margin-bottom:0;}.inv-page{margin:0;padding:0;}.inv-page>*:last-child{margin-bottom:0 !important;}html,body{height:auto !important;overflow:visible !important;}@page{size:A4 portrait;margin:7mm;}}



*{box-sizing:border-box;margin:0;padding:0;font-family:'Cairo',sans-serif;}
@page{size:A4;margin:12mm 10mm;}
body{font-family:'Cairo',sans-serif;color:#1f2430;background:#eef1f5;line-height:1.55;}
/* 🆕 قسم تفاصيل المركبة */
.z-vehicle{border:1px solid #e8ebf0;border-radius:14px;overflow:hidden;margin-bottom:16px;box-shadow:0 2px 8px rgba(0,0,0,.03);}
.z-vehicle-h{background:linear-gradient(135deg,#0e2a47,#1a4971);color:#fff;font-size:12px;font-weight:900;padding:11px 16px;letter-spacing:.2px;display:flex;align-items:center;gap:9px;}
.z-veh-ico{font-size:16px;}
.z-vehicle-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;padding:16px;background:#fafbfc;}
.z-vcell{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid #eef0f3;border-radius:11px;padding:11px 13px;}
.z-vcell-ic{width:34px;height:34px;flex-shrink:0;display:flex;align-items:center;justify-content:center;border-radius:9px;font-size:16px;background:linear-gradient(135deg,#eef4fb,#e0ecf8);}
.z-vcell-tx{display:flex;flex-direction:column;gap:2px;min-width:0;}
.z-vcell-tx span{color:#5a6472;font-weight:700;font-size:9.5px;}
.z-vcell-tx b{color:#1f2430;font-weight:900;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
@media(max-width:560px){.z-vehicle-grid{grid-template-columns:repeat(2,1fr);gap:9px;padding:12px;}}
.inv-page{max-width:820px;margin:0 auto;padding:0;background:#fff;}
.print-bar{position:sticky;top:0;background:#11131a;padding:11px;display:flex;gap:8px;justify-content:center;z-index:10;}
.print-bar button{padding:9px 22px;background:linear-gradient(135deg,#C9A84C,#9F7E1C);color:#fff;border:none;border-radius:9px;font-weight:800;cursor:pointer;font-family:inherit;font-size:13px;}
.z-invoice{padding:26px 30px 30px;}
.z-top{display:flex;justify-content:space-between;align-items:flex-start;padding-bottom:16px;border-bottom:3px solid #C9A84C;margin-bottom:18px;}
.z-top-r{display:flex;align-items:center;gap:13px;}
.z-logo{width:58px;height:58px;border-radius:13px;background:linear-gradient(135deg,#fdf6e3,#f0e2bd);display:flex;align-items:center;justify-content:center;overflow:hidden;border:1px solid #e8d9ad;flex-shrink:0;}
.z-logo img{width:100%;height:100%;object-fit:contain;}
.z-logo span{font-size:28px;}
.z-seller-name{font-size:18px;font-weight:900;color:#1a1a1a;letter-spacing:-.3px;}
.z-seller-sub{font-size:11.5px;color:#8a8a8a;font-weight:700;margin-top:3px;}
.z-top-l{text-align:left;}
.z-doc-title{font-size:20px;font-weight:900;color:#9F7E1C;letter-spacing:-.5px;}
.z-doc-title-en{font-size:10px;font-weight:800;color:#8a8a8a;letter-spacing:2px;margin-bottom:6px;}
.zb{display:inline-block;padding:4px 13px;border-radius:20px;font-size:10.5px;font-weight:900;}
.zb-paid{background:#dcfce7;color:#15803d;border:1px solid #86efac;}
.zb-due{background:#fee2e2;color:#dc2626;border:1px solid #fca5a5;}
.zb-refund{background:#f3e8ff;color:#9333ea;border:1px solid #d8b4fe;}
.z-meta{display:flex;justify-content:space-between;align-items:center;gap:18px;background:linear-gradient(135deg,#fafbfc,#f3f5f8);border:1px solid #e8ebf0;border-radius:13px;padding:14px 18px;margin-bottom:16px;}
.z-meta-info{flex:1;display:grid;grid-template-columns:1fr 1fr;gap:7px 22px;}
.z-mrow{display:flex;justify-content:space-between;font-size:11.5px;border-bottom:1px dashed #e3e6eb;padding-bottom:5px;}
.z-mrow span{color:#5a6472;font-weight:700;}
.z-mrow b{color:#1f2430;font-weight:900;}
.z-qr{width:108px;height:108px;flex-shrink:0;background:#fff;border:1px solid #e3e6eb;border-radius:10px;padding:4px;}
.z-qr-grid{width:100%;height:100%;display:grid;grid-template-columns:repeat(7,1fr);grid-template-rows:repeat(7,1fr);gap:1px;}
.z-qr-grid span{background:#fff;border-radius:1px;}
.z-qr-grid span.on{background:#1a1a1a;}
.z-parties{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:16px;align-items:stretch;}
.z-party{border:1px solid #e8ebf0;border-radius:12px;overflow:hidden;display:flex;flex-direction:column;background:#fff;}
.z-party-h{background:linear-gradient(135deg,#0e2a47,#1a4971);color:#fff;font-size:11px;font-weight:900;padding:9px 14px;letter-spacing:.3px;}
.z-prow{display:flex;justify-content:space-between;padding:7px 14px;font-size:11.5px;border-bottom:1px dashed #eef0f3;}
.z-prow:last-child{border-bottom:none;}
.z-prow span{color:#5a6472;font-weight:700;}
.z-prow b{color:#1f2430;font-weight:900;text-align:left;}
.z-muted b{color:#9098a5;}
.z-table{width:100%;table-layout:fixed;border-collapse:collapse;margin-bottom:16px;border-radius:12px;overflow:hidden;border:1px solid #e8ebf0;}
.z-table thead th{background:linear-gradient(135deg,#0e2a47,#1a4971);color:#fff;font-size:9.5px;font-weight:800;padding:9px 5px;text-align:center;line-height:1.3;}
.z-table thead th:nth-child(2){text-align:right;}
.z-table tbody td{padding:10px 5px;font-size:10.5px;font-weight:700;border-bottom:1px solid #f0f2f5;color:#1f2430;vertical-align:middle;text-align:center;word-break:break-word;}
.z-table tbody td:nth-child(2){text-align:right;}
.z-table .z-num{font-family:'Cairo';direction:ltr;}
.z-table tbody tr:last-child td{border-bottom:none;}
.z-table .z-c{text-align:center;}
.z-table .z-num{text-align:center;font-weight:800;direction:ltr;}
.z-desc strong{font-weight:900;color:#1a1a1a;}
.z-sub{font-size:10px;color:#5a6472;font-weight:700;margin-top:3px;}
.z-note{font-size:11px;font-weight:800;padding:10px 14px;border-radius:10px;margin-bottom:14px;}
.z-loyal{background:linear-gradient(135deg,#fef9c3,#fef3c7);color:#a16207;border:1px solid #fde68a;}
.z-summary-wrap{display:flex;justify-content:space-between;gap:18px;margin-bottom:16px;align-items:flex-start;flex-wrap:wrap;}
.z-summary-side{flex:1;min-width:240px;}
.z-pay{font-size:11.5px;margin-bottom:12px;background:#fafbfc;border:1px solid #eef0f3;border-radius:11px;padding:11px 14px;}
.z-pay span{color:#5a6472;font-weight:700;display:block;margin-bottom:4px;font-size:10px;}
.z-pay b{color:#1f2430;font-weight:900;font-size:12.5px;}
.z-legal{font-size:9px;color:#4b5563;font-weight:700;line-height:1.6;max-width:340px;}
.z-summary{width:290px;flex-shrink:0;border:1px solid #e8ebf0;border-radius:12px;overflow:hidden;align-self:flex-start;}
.z-srow{display:flex;justify-content:space-between;padding:10px 16px;font-size:12px;border-bottom:1px solid #f0f2f5;}
.z-srow span{color:#4b5563;font-weight:700;}
.z-srow b{color:#1f2430;font-weight:900;direction:ltr;}
.z-srow.z-total{background:linear-gradient(135deg,#9F7E1C,#C9A84C);border-bottom:none;}
.z-srow.z-total span{color:#fff;font-size:13px;font-weight:900;}
.z-srow.z-total b{color:#fff;font-size:16px;}
.z-refund{border:1.5px solid #d8b4fe;border-radius:12px;overflow:hidden;margin-bottom:16px;}
.z-refund-h{background:linear-gradient(135deg,#7c3aed,#9333ea);color:#fff;font-size:11.5px;font-weight:900;padding:9px 14px;}
.z-rgrid{display:grid;grid-template-columns:1fr 1fr;gap:8px 18px;padding:13px 16px;background:#faf5ff;}
.z-rgrid>div{display:flex;justify-content:space-between;font-size:11.5px;border-bottom:1px dashed #e9d5ff;padding-bottom:5px;}
.z-rgrid>div span{color:#5a6472;font-weight:700;}
.z-rgrid>div b{color:#7c3aed;font-weight:900;}
.z-rfull{grid-column:1/-1;}
.z-foot{text-align:center;padding-top:16px;border-top:2px solid #eef0f3;font-size:11px;color:#5a6472;font-weight:700;}
.z-foot-sys{font-size:10px;color:#9098a5;margin-top:5px;}
.z-foot-sys strong{color:#9F7E1C;}
.z-foot-link{font-size:9.5px;color:#5a6472;font-weight:700;margin-top:6px;word-break:break-all;}
.z-foot-link span{color:#9F7E1C;}
.inv-page:not(:last-child){page-break-after:always;}
@media print{.print-bar{display:none;}body{background:#fff;}.z-invoice{padding:0;}.z-party,.z-table,.z-summary,.z-refund,.z-meta,.z-vehicle{page-break-inside:avoid;}.z-top,.z-party-h,.z-table thead th,.z-srow.z-total,.z-refund-h,.z-vehicle-h{-webkit-print-color-adjust:exact;print-color-adjust:exact;}.z-top{margin-bottom:8px;padding-bottom:8px;}.z-meta{margin-bottom:8px;}.z-parties{margin-bottom:8px;gap:10px;}.z-vehicle{margin-bottom:8px;}.z-vehicle-grid{padding:9px;gap:7px;}.z-table{margin-bottom:8px;}.z-table thead th{padding:6px 4px;}.z-table tbody td{padding:7px 4px;}.z-summary-wrap{margin-bottom:8px;}.z-prow{padding:5px 12px;}.z-vcell{padding:8px 10px;}.z-foot{padding-top:8px;margin-bottom:0;}.z-legal{margin-bottom:0;}.inv-page{margin:0;padding:0;}.inv-page>*:last-child{margin-bottom:0 !important;}html,body{height:auto !important;overflow:visible !important;}@page{size:A4 portrait;margin:7mm;}}



*{box-sizing:border-box;margin:0;padding:0;}
@page{size:A4;margin:12mm 10mm;}
body{font-family:'Cairo','Tajawal','Segoe UI',Arial,sans-serif;color:#1a1a1a;background:#fff;line-height:1.6;}
.page{max-width:1100px;margin:0 auto;padding:14px;}
.print-bar{position:sticky;top:0;background:#1a1a1a;padding:10px;display:flex;gap:8px;justify-content:center;margin:-12mm -10mm 14px;z-index:10;}
.print-bar button{padding:9px 20px;background:linear-gradient(135deg,#dc2626,#991b1b);color:#fff;border:none;border-radius:8px;font-weight:800;cursor:pointer;font-family:inherit;}
.brand-bar{display:flex;align-items:center;gap:14px;margin-bottom:14px;padding:12px 18px;background:linear-gradient(135deg,#fdf8eb,#faf3e0);border:1.5px solid #C9A84C;border-radius:12px;}
.brand-bar-logo{width:46px;height:46px;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#fef3c7,#C9A84C);border-radius:10px;overflow:hidden;}
.brand-bar-logo img{width:80%;height:80%;object-fit:contain;}
.brand-bar-title{font-size:15px;font-weight:900;color:#5A4520;}
.brand-bar-sub{font-size:10.5px;color:#7A6420;font-weight:700;}
.center-hdr{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;margin-bottom:14px;background:linear-gradient(135deg,#7f1d1d,#dc2626);color:#fff;border-radius:13px;}
.cls-logo{width:50px;height:50px;background:#fff;border-radius:11px;display:flex;align-items:center;justify-content:center;overflow:hidden;}
.cls-logo img{width:100%;height:100%;object-fit:contain;}
.cls-name{font-size:15px;font-weight:900;color:#fff;}
.cls-sub{font-size:10.5px;color:#fecaca;margin-top:2px;}
.hdr-title{font-size:14px;font-weight:900;color:#fff;text-align:left;}
.hdr-date{font-size:11px;color:#fecaca;margin-top:3px;}
.hero{background:linear-gradient(135deg,#dc2626,#991b1b);color:#fff;padding:18px 22px;border-radius:14px;margin-bottom:14px;display:flex;justify-content:space-between;align-items:center;box-shadow:0 12px 28px rgba(220,38,38,.3);}
.hero-l{font-size:14px;font-weight:800;margin-bottom:5px;}
.hero-sub{font-size:11px;opacity:.85;}
.hero-v{font-size:32px;font-weight:900;letter-spacing:-1px;}
.kpi-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:14px;}
.kpi{padding:13px;background:#fafafa;border:1px solid #e5e5e5;border-radius:11px;text-align:center;}
.kpi-l{font-size:10.5px;color:#666;font-weight:700;margin-bottom:5px;}
.kpi-v{font-size:17px;font-weight:900;color:#1a1a1a;}
.sec{margin-bottom:14px;page-break-inside:avoid;}
.sec-h{padding:9px 14px;background:linear-gradient(135deg,#7f1d1d,#dc2626);color:#fff;border-radius:10px 10px 0 0;font-size:13px;font-weight:900;}
.sec-b{background:#fff;border:1.5px solid #e5e5e5;border-top:none;border-radius:0 0 12px 12px;padding:0;overflow:hidden;}
table{width:100%;border-collapse:collapse;}
th{background:linear-gradient(135deg,#fafafa,#f5f5f5);color:#555;padding:9px 12px;text-align:right;font-size:11px;font-weight:800;border-bottom:2px solid #e5e5e5;}
td{padding:9px 12px;border-bottom:1px solid #f0f0f0;font-size:11.5px;font-weight:700;color:#333;vertical-align:top;}
tr:nth-child(even) td{background:#fafafa;}
.footer{margin-top:24px;padding:14px;text-align:center;border-top:1.5px solid #ddd;font-size:10px;color:#999;}
.footer .o{font-weight:900;color:#5A4520;}
@media print{.print-bar{display:none;}body{padding:0;}.sec{page-break-inside:avoid;}.hero,th,.center-hdr,.sec-h,.brand-bar{-webkit-print-color-adjust:exact;print-color-adjust:exact;}}



.page{max-width:1100px;margin:0 auto;padding:14px;}
.print-bar{position:sticky;top:0;background:#1a1a1a;padding:10px;display:flex;gap:8px;justify-content:center;margin:-12mm -10mm 14px;z-index:10;}
.print-bar button{padding:9px 20px;background:linear-gradient(135deg,#dc2626,#991b1b);color:#fff;border:none;border-radius:8px;font-weight:800;cursor:pointer;font-family:inherit;}
.brand-bar{display:flex;align-items:center;gap:14px;margin-bottom:14px;padding:12px 18px;background:linear-gradient(135deg,#fdf8eb,#faf3e0);border:1.5px solid #C9A84C;border-radius:12px;}
.brand-bar-logo{width:46px;height:46px;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#fef3c7,#C9A84C);border-radius:10px;overflow:hidden;}
.brand-bar-logo img{width:80%;height:80%;object-fit:contain;}
.brand-bar-title{font-size:15px;font-weight:900;color:#5A4520;}
.brand-bar-sub{font-size:10.5px;color:#7A6420;font-weight:700;}
.center-hdr{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;margin-bottom:14px;background:linear-gradient(135deg,#7f1d1d,#dc2626);color:#fff;border-radius:13px;}
.cls-logo{width:50px;height:50px;background:#fff;border-radius:11px;display:flex;align-items:center;justify-content:center;overflow:hidden;}
.cls-logo img{width:100%;height:100%;object-fit:contain;}
.cls-name{font-size:15px;font-weight:900;color:#fff;}
.cls-sub{font-size:10.5px;color:#fecaca;margin-top:2px;}
.hdr-title{font-size:14px;font-weight:900;color:#fff;text-align:left;}
.hdr-date{font-size:11px;color:#fecaca;margin-top:3px;}
.hero{background:linear-gradient(135deg,#dc2626,#991b1b);color:#fff;padding:18px 22px;border-radius:14px;margin-bottom:14px;display:flex;justify-content:space-between;align-items:center;box-shadow:0 12px 28px rgba(220,38,38,.3);}
.hero-l{font-size:14px;font-weight:800;margin-bottom:5px;}
.hero-sub{font-size:11px;opacity:.85;}
.hero-v{font-size:32px;font-weight:900;letter-spacing:-1px;}
.kpi-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:14px;}
.kpi{padding:13px;background:#fafafa;border:1px solid #e5e5e5;border-radius:11px;text-align:center;}
.kpi-l{font-size:10.5px;color:#666;font-weight:700;margin-bottom:5px;}
.kpi-v{font-size:17px;font-weight:900;color:#1a1a1a;}
.sec{margin-bottom:14px;page-break-inside:avoid;}
.sec-h{padding:9px 14px;background:linear-gradient(135deg,#7f1d1d,#dc2626);color:#fff;border-radius:10px 10px 0 0;font-size:13px;font-weight:900;}
.sec-b{background:#fff;border:1.5px solid #e5e5e5;border-top:none;border-radius:0 0 12px 12px;padding:0;overflow:hidden;}
table{width:100%;border-collapse:collapse;}
th{background:linear-gradient(135deg,#fafafa,#f5f5f5);color:#555;padding:9px 12px;text-align:right;font-size:11px;font-weight:800;border-bottom:2px solid #e5e5e5;}
td{padding:9px 12px;border-bottom:1px solid #f0f0f0;font-size:11.5px;font-weight:700;color:#333;vertical-align:top;}
tr:nth-child(even) td{background:#fafafa;}
.footer{margin-top:24px;padding:14px;text-align:center;border-top:1.5px solid #ddd;font-size:10px;color:#999;}
.footer .o{font-weight:900;color:#5A4520;}
@media print{.print-bar{display:none;}body{padding:0;}.sec{page-break-inside:avoid;}.hero,th,.center-hdr,.sec-h,.brand-bar{-webkit-print-color-adjust:exact;print-color-adjust:exact;}}

.permit-title{text-align:center;padding:24px;margin-bottom:20px;background:linear-gradient(135deg,#1a1a1a,#7f1d1d);color:#fff;border-radius:14px;}
.permit-title-l{font-size:14px;font-weight:700;opacity:.9;margin-bottom:6px;}
.permit-title-h{font-size:26px;font-weight:900;letter-spacing:-.5px;color:#fde68a;}
.permit-title-num{font-size:13px;color:#fcd34d;font-weight:800;margin-top:6px;}
.center-info{display:flex;justify-content:space-between;align-items:center;padding:14px 18px;margin-bottom:16px;background:#f5f5f5;border-radius:11px;}
.center-info-l{font-size:13px;font-weight:900;color:#1a1a1a;}
.center-info-r{font-size:11.5px;color:#666;text-align:left;}
.field-row{display:flex;align-items:center;padding:10px 0;border-bottom:1px dashed #eee;}
.field-row:last-child{border-bottom:none;}
.field-label{flex:0 0 40%;font-size:12.5px;color:#666;font-weight:800;}
.field-value{flex:1;font-size:13px;font-weight:900;color:#1a1a1a;}
.amount-hero{background:linear-gradient(135deg,#9F7E1C,#C9A84C);color:#fff;padding:24px;border-radius:14px;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center;box-shadow:0 12px 28px rgba(201,168,76,.35);}
.amount-hero-l{font-size:14px;font-weight:800;opacity:.95;margin-bottom:3px;}
.amount-hero-sub{font-size:11px;opacity:.85;}
.amount-hero-v{font-size:34px;font-weight:900;letter-spacing:-1px;}
.signatures{display:grid;grid-template-columns:1fr 1fr 1fr;gap:14px;margin-top:24px;}
.sig-box{padding:18px 14px;border:2px dashed #c4c4c4;border-radius:11px;text-align:center;}
.sig-box-l{font-size:11px;color:#666;font-weight:800;margin-bottom:30px;}
.sig-box-line{border-top:1.5px solid #1a1a1a;padding-top:5px;font-size:11px;color:#888;}
@media print{.print-bar{display:none;}body{padding:0;}.section,.amount-hero,.permit-title,.brand-bar{page-break-inside:avoid;-webkit-print-color-adjust:exact;print-color-adjust:exact;}}



*{box-sizing:border-box;margin:0;padding:0;}
@page{size:A4;margin:12mm 10mm;}
body{font-family:'Cairo','Tajawal','Segoe UI',Arial,sans-serif;color:#1a1a1a;background:#fff;line-height:1.6;}
.page{max-width:1100px;margin:0 auto;padding:18px;}

/* 🆕 REPORT BRAND BAR — Elegant system logo display at top */
.report-brand-bar{
  display:flex;align-items:center;gap:14px;
  margin-bottom:18px;
  padding:12px 18px;
  background:linear-gradient(135deg, #fdf8eb 0%, #faf3e0 50%, #fdf8eb 100%);
  border:1.5px solid #C9A84C;
  border-radius:14px;
  position:relative;
  overflow:hidden;
  box-shadow:0 4px 14px rgba(201,168,76,.18), inset 0 1px 0 rgba(255,255,255,.5);
}
.report-brand-bar::before{
  content:'';
  position:absolute;
  top:0;left:0;right:0;
  height:3px;
  background:linear-gradient(90deg, transparent, #C9A84C, #fbbf24, #C9A84C, transparent);
}
.report-brand-bar::after{
  content:'';
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 15% 50%, rgba(251,191,36,.08), transparent 40%),
    radial-gradient(circle at 85% 50%, rgba(201,168,76,.06), transparent 40%);
  pointer-events:none;
}
.rbb-logo{
  width:60px;height:60px;
  display:flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg, #fbbf24 0%, #C9A84C 50%, #9F7E1C 100%);
  border-radius:14px;
  color:#fff;
  flex-shrink:0;
  box-shadow:
    0 6px 16px rgba(201,168,76,.4),
    inset 0 1.5px 0 rgba(255,255,255,.3),
    inset 0 -1.5px 0 rgba(0,0,0,.15);
  position:relative;
  overflow:hidden;
}
.rbb-logo::before{
  content:'';
  position:absolute;
  top:0;left:0;right:0;height:50%;
  background:linear-gradient(180deg, rgba(255,255,255,.25), transparent);
  pointer-events:none;
}
.rbb-logo img{
  width:78%;
  height:78%;
  object-fit:contain;
  display:block;
  position:relative;
  z-index:1;
  filter:drop-shadow(0 2px 4px rgba(0,0,0,.15));
}
.rbb-logo svg{color:#fff;}
.rbb-text{flex:1;}
.rbb-system{
  font-family:'Cairo','Tajawal',sans-serif;
  font-size:18px;
  font-weight:900;
  color:#5A4520;
  letter-spacing:-.3px;
  background:linear-gradient(135deg, #5A4520 0%, #9F7E1C 50%, #5A4520 100%);
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
  margin-bottom:2px;
  line-height:1.2;
}
.rbb-tagline{
  font-size:10.5px;
  color:#9F7E1C;
  font-weight:700;
  letter-spacing:.2px;
  opacity:.85;
}
.rbb-decor{
  display:flex;align-items:center;gap:6px;
  padding:6px 10px;
  background:rgba(201,168,76,.12);
  border:1px solid rgba(201,168,76,.3);
  border-radius:10px;
  position:relative;
}
.rbb-decor::before, .rbb-decor::after{
  content:'';
  width:5px;height:5px;
  border-radius:50%;
  background:linear-gradient(135deg,#fbbf24,#C9A84C);
  box-shadow:0 1px 3px rgba(201,168,76,.4);
}
.rbb-decor::after{margin:0 2px;}
@media print{
  .report-brand-bar{-webkit-print-color-adjust:exact;print-color-adjust:exact;}
  .rbb-logo{-webkit-print-color-adjust:exact;print-color-adjust:exact;}
  .rbb-system{-webkit-print-color-adjust:exact;print-color-adjust:exact;}
}

/* HEADER */
/* 🆕 هيدر موحّد احترافي */
.rpt-header{margin-bottom:24px;border:1.5px solid #E8DCC0;border-radius:18px;overflow:hidden;box-shadow:0 4px 16px rgba(201,168,76,.1);}
.rpt-header-top{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 24px;background:linear-gradient(135deg,#fdfaf2 0%,#faf4e6 100%);}
.rpt-center{display:flex;align-items:center;gap:15px;}
.rpt-center-logo{width:64px;height:64px;border-radius:16px;display:flex;align-items:center;justify-content:center;font-size:32px;background:linear-gradient(135deg,#fbbf24,#C9A84C,#9F7E1C);color:#fff;flex-shrink:0;box-shadow:0 6px 16px rgba(201,168,76,.35),inset 0 1.5px 0 rgba(255,255,255,.3);overflow:hidden;}
.rpt-center-logo img{width:100%;height:100%;object-fit:cover;border-radius:16px;}
.rpt-center-name{font-size:20px;font-weight:900;color:#1a1a1a;letter-spacing:-.3px;}
.rpt-center-sub{font-size:12.5px;color:#7a6f55;font-weight:600;margin-top:3px;}
.rpt-center-vat{font-size:10.5px;color:#a39577;font-weight:600;margin-top:2px;}
.rpt-meta{text-align:left;flex-shrink:0;}
.rpt-title{font-size:16px;font-weight:900;color:#9F7E1C;}
.rpt-date{font-size:12px;color:#7a6f55;font-weight:700;margin-top:4px;}
.rpt-mode-badge{display:inline-block;margin-top:8px;padding:4px 12px;border-radius:20px;font-size:11px;font-weight:800;}
.rpt-mode-badge.is-op{background:rgba(245,158,11,.14);color:#b45309;border:1px solid rgba(245,158,11,.3);}
.rpt-mode-badge.is-full{background:rgba(16,185,129,.14);color:#047857;border:1px solid rgba(16,185,129,.3);}
.rpt-header-brand{padding:9px 24px;background:linear-gradient(90deg,#1a1505,#2a2008);color:#d4b86a;font-size:11px;font-weight:600;text-align:center;letter-spacing:.2px;}
.rpt-header-brand strong{color:#fbbf24;font-weight:800;}
.hdr{display:flex;align-items:center;justify-content:space-between;padding-bottom:18px;border-bottom:3px solid #C9A84C;margin-bottom:24px;}
.hdr-left{display:flex;align-items:center;gap:14px;}
.hdr-logo{width:60px;height:60px;background:linear-gradient(135deg,#C9A84C,#9F7E1C);border-radius:14px;display:flex;align-items:center;justify-content:center;font-size:30px;color:#fff;box-shadow:0 4px 12px rgba(201,168,76,.3);}
.hdr-name{font-size:22px;font-weight:900;color:#0a0800;line-height:1.2;}
.hdr-sub{font-size:11px;color:#666;margin-top:3px;}
.hdr-right{text-align:left;}
.hdr-title{font-size:14px;color:#9F7E1C;font-weight:800;letter-spacing:.5px;}
.hdr-date{font-size:12px;color:#444;margin-top:3px;font-weight:600;}
.hdr-date-tag{font-size:10px;color:#888;margin-top:2px;}

/* KPI cards */
.kpi-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin-bottom:22px;}
.kpi{background:linear-gradient(160deg,#ffffff,#f8f6f0);border:1px solid #ece5d4;border-right:4px solid;border-radius:14px;padding:14px 16px;box-shadow:0 2px 8px rgba(0,0,0,.04);}
.kpi.green{border-right-color:#22C55E;}
.kpi.purple{border-right-color:#a855f7;}
.kpi.gold{border-right-color:#C9A84C;}
.kpi.red{border-right-color:#EF4444;}
.kpi.blue{border-right-color:#3B82F6;}
.kpi-l{font-size:10px;color:#777;font-weight:700;margin-bottom:4px;}
.kpi-v{font-family:'IBM Plex Mono','Roboto Mono',monospace;font-size:22px;font-weight:900;color:#0a0800;line-height:1;letter-spacing:-1px;}
.kpi-u{font-size:10px;color:#888;margin-top:3px;}

/* Net profit hero */
.hero{background:linear-gradient(135deg,#9F7E1C,#C9A84C);color:#fff;border-radius:14px;padding:18px 24px;margin-bottom:20px;display:flex;align-items:center;justify-content:space-between;box-shadow:0 6px 20px rgba(201,168,76,.25);}
.hero-l{font-size:13px;font-weight:700;opacity:.9;letter-spacing:.5px;}
.hero-v{font-family:'IBM Plex Mono','Roboto Mono',monospace;font-size:32px;font-weight:900;letter-spacing:-1px;}
.hero-sub{font-size:11px;opacity:.85;margin-top:3px;}

/* Section headings */
.sec{margin-bottom:22px;break-inside:avoid;page-break-inside:avoid;}
/* 🆕 تقسيم ذكي: الأقسام الكبيرة تبدأ صفحة جديدة */
.sec-page{break-before:page;page-break-before:always;}
/* الجداول الطويلة: السماح بالتقسيم لكن مع تكرار الرأس */
.sec-long{break-inside:auto;page-break-inside:auto;}
.sec-long thead{display:table-header-group;}
.sec-long tr{break-inside:avoid;page-break-inside:avoid;}
/* منع يُتم الصفوف */
table{break-inside:auto;}
thead{display:table-header-group;}
tfoot{display:table-footer-group;}
tr{break-inside:avoid;page-break-inside:avoid;}
/* عناوين الأقسام لا تنفصل عن محتواها */
.sec-h{break-after:avoid;page-break-after:avoid;}
@media print{
  .print-bar{display:none !important;}
  .sec{margin-bottom:18px;}
}
.sec-h{display:flex;align-items:center;gap:8px;margin-bottom:10px;padding-bottom:8px;border-bottom:2px solid #e5e5e5;}
.sec-h-ico{width:28px;height:28px;background:#9F7E1C;color:#fff;border-radius:7px;display:flex;align-items:center;justify-content:center;font-size:14px;}
.sec-h-name{font-size:14px;font-weight:800;color:#0a0800;}

/* Tables */
table{width:100%;border-collapse:collapse;font-size:11px;}
th{background:linear-gradient(135deg,#0a0800,#2d2100);color:#C9A84C;padding:9px 8px;text-align:right;font-weight:700;font-size:11px;border:1px solid #1a1200;}
td{padding:8px;text-align:right;border:1px solid #e5e5e5;color:#222;}
tr:nth-child(even) td{background:#fafafa;}
td.amt{font-family:'IBM Plex Mono','Roboto Mono',monospace;font-weight:800;color:#9F7E1C;text-align:left;direction:ltr;}
.bd-paid{background:#dcfce7;color:#15803d;padding:2px 8px;border-radius:8px;font-size:10px;font-weight:800;}
.bd-unp{background:#fee2e2;color:#991b1b;padding:2px 8px;border-radius:8px;font-size:10px;font-weight:800;}
.bd-ref{background:#f3e8ff;color:#7c3aed;padding:2px 8px;border-radius:8px;font-size:10px;font-weight:800;}
.bd-partial{background:#fef3c7;color:#b45309;padding:2px 8px;border-radius:8px;font-size:10px;font-weight:800;}

/* Two-column tables */
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:14px;}

/* Footer */
.foot{margin-top:30px;padding-top:14px;border-top:2px solid #C9A84C;text-align:center;font-size:10px;color:#888;line-height:1.8;}
.foot strong{color:#9F7E1C;}

/* 🆕 Powered-by strip (admin branding badge) */
/* 🆕✨ LUXURY POWERED-BY STRIP — more prominent with logo showcase */
.powered-by-strip{
  display:flex;align-items:center;justify-content:center;gap:11px;
  padding:11px 18px;
  margin-bottom:14px;
  background:
    radial-gradient(ellipse at center, rgba(201,168,76,.08) 0%, rgba(201,168,76,.02) 70%),
    linear-gradient(135deg, rgba(159,126,28,.06) 0%, rgba(159,126,28,.01) 100%);
  border:1px solid rgba(159,126,28,.28);
  border-radius:12px;
  font-size:11px;
  color:#5A4520;
  font-weight:700;
  letter-spacing:.3px;
  position:relative;
  overflow:hidden;
}
/* Subtle gold shine line at top of strip */
.powered-by-strip::before{
  content:'';
  position:absolute;
  top:0;left:0;right:0;
  height:1.5px;
  background:linear-gradient(90deg, transparent 0%, rgba(201,168,76,.6) 50%, transparent 100%);
}
/* Inner decorative dot */
.powered-by-strip::after{
  content:'';
  position:absolute;
  width:4px;height:4px;
  background:linear-gradient(135deg,#fbbf24,#C9A84C);
  border-radius:50%;
  box-shadow:0 0 8px rgba(201,168,76,.5);
  right:14px;top:50%;transform:translateY(-50%);
}
.pbs-logo{
  display:inline-flex;align-items:center;justify-content:center;
  width:30px;height:30px;
  background:linear-gradient(135deg,#fef3c7,#fde68a 50%,#C9A84C);
  border-radius:8px;
  color:#5A4520;
  flex-shrink:0;
  overflow:hidden;
  box-shadow:
    0 4px 10px rgba(201,168,76,.35),
    inset 0 1px 0 rgba(255,255,255,.6),
    inset 0 -1px 0 rgba(0,0,0,.1);
  border:1px solid rgba(201,168,76,.45);
  position:relative;
}
.pbs-logo img{
  width:80%;height:80%;
  object-fit:contain;
  display:block;
  margin:auto;
  filter:drop-shadow(0 1px 2px rgba(0,0,0,.15));
}
.pbs-text{
  display:inline-flex;align-items:center;gap:7px;
  font-size:11.5px;
  font-weight:800;
  color:#7A6420;
}
.pbs-sep{
  opacity:.5;
  font-weight:900;
}
.pbs-owner{
  color:#5A4520;
  font-weight:900;
  letter-spacing:-.1px;
}

/* 🆕 Expense mode badge in header */
.exp-mode-badge{
  display:inline-flex;align-items:center;justify-content:center;
  margin-top:8px;
  padding:5px 11px;
  border-radius:9px;
  font-size:10.5px;
  font-weight:900;
  letter-spacing:.3px;
  border:1.5px solid;
}
.exp-mode-badge.mode-operational{
  background:linear-gradient(135deg,#FEF3C7,#FDE68A);
  color:#92400E;
  border-color:#F59E0B;
}
.exp-mode-badge.mode-full{
  background:linear-gradient(135deg,#DBEAFE,#BFDBFE);
  color:#1E40AF;
  border-color:#3B82F6;
}

/* 🆕 Expense mode explanation card */
.exp-mode-card{
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:14px;
  align-items:center;
  padding:14px 18px;
  margin-bottom:14px;
  border-radius:14px;
  border:1.5px solid;
  position:relative;
  overflow:hidden;
}
.exp-mode-card.is-op{
  background:linear-gradient(155deg, rgba(245,158,11,.08), rgba(245,158,11,.02));
  border-color:rgba(245,158,11,.35);
}
.exp-mode-card.is-full{
  background:linear-gradient(155deg, rgba(59,130,246,.08), rgba(59,130,246,.02));
  border-color:rgba(59,130,246,.35);
}
.exp-mode-card::before{
  content:'';
  position:absolute;
  top:0;left:0;right:0;
  height:2px;
  background:linear-gradient(90deg,transparent,currentColor,transparent);
  opacity:.4;
}
.exp-mode-card.is-op{color:#92400E;}
.exp-mode-card.is-full{color:#1E40AF;}
.emc-icon{
  font-size:30px;
  flex-shrink:0;
  line-height:1;
}
.emc-content{flex:1;min-width:0;}
.emc-title{
  font-size:13.5px;
  font-weight:800;
  margin-bottom:5px;
  letter-spacing:-.2px;
}
.emc-title strong{
  font-weight:900;
  padding:1px 6px;
  border-radius:5px;
}
.exp-mode-card.is-op .emc-title strong{background:rgba(245,158,11,.18);}
.exp-mode-card.is-full .emc-title strong{background:rgba(59,130,246,.18);}
.emc-desc{
  font-size:11px;
  color:#555;
  font-weight:600;
  line-height:1.65;
  letter-spacing:.1px;
}
.emc-desc strong{font-weight:900;color:#222;}
.emc-formula{
  flex-shrink:0;
  background:rgba(255,255,255,.55);
  border:1px solid currentColor;
  border-radius:10px;
  padding:8px 12px;
  text-align:center;
  min-width:140px;
}
.emc-formula-lbl{
  font-size:9px;
  font-weight:800;
  opacity:.65;
  letter-spacing:.6px;
  margin-bottom:3px;
}
.emc-formula-val{
  font-size:10.5px;
  font-weight:900;
  letter-spacing:-.1px;
}
@media(max-width:700px){
  .exp-mode-card{
    grid-template-columns:auto 1fr;
  }
  .emc-formula{
    grid-column:1/-1;
    margin-top:6px;
  }
}

/* Print button */
.print-bar{position:fixed;top:10px;left:10px;display:flex;gap:8px;z-index:9999;}
.print-bar button{padding:10px 18px;background:#9F7E1C;color:#fff;border:none;border-radius:8px;font-family:inherit;font-size:12px;font-weight:800;cursor:pointer;box-shadow:0 4px 12px rgba(0,0,0,.2);}
.print-bar button.close{background:#666;}

@media print{
  .print-bar{display:none;}
  body{padding:0;}
  .sec{page-break-inside:avoid;}
  .hero{background:linear-gradient(135deg,#9F7E1C,#C9A84C) !important;-webkit-print-color-adjust:exact;print-color-adjust:exact;}
  th{background:linear-gradient(135deg,#0a0800,#2d2100) !important;color:#C9A84C !important;-webkit-print-color-adjust:exact;print-color-adjust:exact;}
  .exp-mode-badge, .exp-mode-card, .powered-by-strip{
    -webkit-print-color-adjust:exact;
    print-color-adjust:exact;
  }
  .exp-mode-card{page-break-inside:avoid;}
}
.rpt-cover-page{width:100%;text-align:center;break-after:page;page-break-after:always;margin:0;padding:0;line-height:0;}
  .rpt-cover-img{max-width:100%;max-height:92vh;width:auto;height:auto;display:block;margin:0 auto;}
  .rpt-cover-frame{width:100%;height:92vh;border:none;display:block;}
  @media print{
    .rpt-cover-page{break-after:page;page-break-after:always;margin:0;padding:0;}
    .rpt-cover-img{max-height:96vh;}
  }
  ${window._pdfFmtCSS ? window._pdfFmtCSS() : ''}

/* 🆕 تعريف brand-bar للتقرير الشهري (كان مفقوداً) */
.brand-bar{display:flex;align-items:center;gap:14px;margin-bottom:18px;padding:14px 20px;background:linear-gradient(135deg,#fdf8eb,#faf3e0);border:1.5px solid #C9A84C;border-radius:13px;}
.brand-bar-logo{width:50px;height:50px;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#fef3c7,#C9A84C);border-radius:11px;overflow:hidden;flex-shrink:0;}
.brand-bar-logo img{width:80%;height:80%;object-fit:contain;}
.brand-bar-logo svg{color:#5A4520;}
.brand-bar-text{flex:1;}
.brand-bar-title{font-size:16px;font-weight:900;color:#5A4520;letter-spacing:-.3px;}
.brand-bar-sub{font-size:11px;color:#7A6420;font-weight:700;margin-top:2px;}



* { margin:0; padding:0; box-sizing:border-box; }
  body {
    font-family:'Cairo',sans-serif;
    background:${t.preview.bg};
    color:${t.colors.primary === '#0f172a' || t.colors.primary === '#1e40af' || t.colors.primary === '#8b5cf6' || t.colors.primary === '#dc2626' ? '#fff' : t.colors.primary};
    min-height:100vh;
    padding:20px;
  }
  .demo-wrap { max-width:800px; margin:0 auto; }
  .demo-header {
    background:${t.preview.header};
    color:#fff;
    padding:30px 28px;
    border-radius:18px 18px 0 0;
    box-shadow:0 8px 24px rgba(0,0,0,0.20);
    position:relative;
    overflow:hidden;
  }
  .demo-header::before {
    content:'';
    position:absolute;top:-50px;right:-50px;
    width:200px;height:200px;
    border-radius:50%;
    background:rgba(255,255,255,0.10);
    filter:blur(40px);
  }
  .demo-header h1 { font-size:28px; font-weight:900; margin-bottom:6px; }
  .demo-header .sub { opacity:0.85; font-size:13px; font-weight:700; }
  .demo-body {
    background:${t.colors.primary === '#0f172a' || t.colors.primary === '#1e40af' || t.colors.primary === '#8b5cf6' || t.colors.primary === '#dc2626' ? 'rgba(255,255,255,0.04)' : '#fff'};
    border-radius:0 0 18px 18px;
    padding:24px 28px;
    box-shadow:0 8px 24px rgba(0,0,0,0.10);
    border:1px solid ${t.colors.primary}22;
    border-top:none;
  }
  .demo-row {
    display:grid; grid-template-columns:1fr 1fr; gap:14px;
    padding:14px 0; border-bottom:1px dashed ${t.colors.primary}33;
  }
  .demo-row:last-child { border-bottom:none; }
  .demo-label { font-size:12px; font-weight:800; opacity:0.65; }
  .demo-val { font-size:14px; font-weight:900; }
  .demo-section { margin-top:18px; }
  .demo-section-title {
    background:${t.colors.accent};
    color:#fff;
    padding:8px 16px;
    border-radius:50px;
    font-size:13px;
    font-weight:900;
    display:inline-block;
    margin-bottom:12px;
  }
  .demo-badges { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
  .demo-badge {
    padding:6px 12px; border-radius:8px;
    font-size:11px; font-weight:800;
  }
  .b-ok { background:#10b98122; color:#10b981; border:1px solid #10b98144; }
  .b-warn { background:#f59e0b22; color:#f59e0b; border:1px solid #f59e0b44; }
  .b-bad { background:#ef444422; color:#ef4444; border:1px solid #ef444444; }
  .close-bar {
    position:fixed; bottom:0; left:0; right:0;
    background:${t.colors.secondary};
    color:#fff;
    padding:12px;
    text-align:center;
    z-index:100;
    box-shadow:0 -4px 20px rgba(0,0,0,0.30);
  }
  .close-bar button {
    background:${t.colors.accent}; color:#fff;
    border:none; padding:10px 22px; border-radius:9px;
    font-family:inherit; font-size:13px; font-weight:900;
    cursor:pointer; margin:0 6px;
  }
  .close-bar button.secondary {
    background:rgba(255,255,255,0.15);
  }
  body { padding-bottom:80px; }

/* ═══ Booking ticket badge ═══ */
.booking-status-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 7px;
  font-size: 10px; font-weight: 800; font-family: 'Cairo', sans-serif;
}
.booking-status-badge.pending  { background:rgba(245,158,11,0.12); border:1px solid rgba(245,158,11,0.28); color:#fbbf24; }
.booking-status-badge.confirmed{ background:rgba(34,197,94,0.12);  border:1px solid rgba(34,197,94,0.28);  color:#4ade80; }
.booking-status-badge.cancelled{ background:rgba(239,68,68,0.10);  border:1px solid rgba(239,68,68,0.22);  color:#f87171; }



.bkcm-wrap{background:#0d1117;border:1px solid rgba(255,255,255,.10);border-radius:22px;width:100%;max-width:440px;overflow:hidden;box-shadow:0 32px 80px rgba(0,0,0,.7);animation:bkcmIn .35s cubic-bezier(.34,1.56,.64,1);}
    @keyframes bkcmIn{from{opacity:0;transform:translateY(20px) scale(.96)}to{opacity:1;transform:none}}
    .bkcm-head{padding:18px 20px 14px;border-bottom:1px solid rgba(255,255,255,.07);display:flex;align-items:center;gap:12px;}
    .bkcm-ico{width:42px;height:42px;border-radius:13px;background:linear-gradient(135deg,rgba(201,168,76,.25),rgba(201,168,76,.10));border:1px solid rgba(201,168,76,.35);display:flex;align-items:center;justify-content:center;font-size:20px;flex-shrink:0;}
    .bkcm-title{font-size:15px;font-weight:900;color:#f4f0e6;font-family:'Cairo',sans-serif;}
    .bkcm-sub{font-size:11px;color:rgba(255,255,255,.35);font-weight:600;margin-top:2px;font-family:'Cairo',sans-serif;}
    .bkcm-close{margin-right:auto;width:30px;height:30px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.10);border-radius:9px;cursor:pointer;color:rgba(255,255,255,.5);display:flex;align-items:center;justify-content:center;font-size:14px;}
    .bkcm-info{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:14px 20px 10px;}
    .bkcm-info-item{background:rgba(255,255,255,.04);border-radius:9px;padding:8px 10px;}
    .bkcm-info-k{font-size:9.5px;font-weight:800;color:rgba(255,255,255,.3);letter-spacing:.4px;font-family:'Cairo',sans-serif;}
    .bkcm-info-v{font-size:12px;font-weight:800;color:#f4f0e6;margin-top:2px;font-family:'Cairo',sans-serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
    .bkcm-pay-sect{padding:4px 20px 14px;}
    .bkcm-pay-lbl{font-size:11px;font-weight:800;color:rgba(255,255,255,.45);margin-bottom:10px;font-family:'Cairo',sans-serif;}
    .bkcm-pay-opts{display:flex;flex-direction:column;gap:7px;max-height:220px;overflow-y:auto;}
    .bkcm-pay-opt{display:flex;align-items:center;gap:11px;padding:11px 13px;border-radius:12px;border:1.5px solid rgba(255,255,255,.08);background:rgba(255,255,255,.03);cursor:pointer;transition:all .2s;font-family:'Cairo',sans-serif;}
    .bkcm-pay-opt:hover{border-color:rgba(255,255,255,.18);}
    .bkcm-pay-opt.sel{background:rgba(201,168,76,.10);border-color:rgba(201,168,76,.38);}
    .bkcm-pay-ico{font-size:20px;flex-shrink:0;}
    .bkcm-pay-name{font-size:13px;font-weight:800;color:#f4f0e6;}
    .bkcm-pay-sub{font-size:10px;color:rgba(255,255,255,.35);font-weight:600;margin-top:1px;}
    .bkcm-pay-check{margin-right:auto;width:18px;height:18px;border-radius:50%;border:2px solid rgba(255,255,255,.15);display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:all .18s;}
    .bkcm-pay-opt.sel .bkcm-pay-check{background:var(--gold,#c9a84c);border-color:var(--gold,#c9a84c);}
    .bkcm-pay-opt.sel .bkcm-pay-check::after{content:'✓';font-size:10px;font-weight:900;color:#1a0f00;}
    .bkcm-paid-toggle{display:flex;align-items:center;gap:10px;padding:10px 13px;background:rgba(34,197,94,.06);border:1px solid rgba(34,197,94,.20);border-radius:11px;margin-top:8px;cursor:pointer;}
    .bkcm-paid-lbl{font-size:12.5px;font-weight:800;color:rgba(255,255,255,.7);font-family:'Cairo',sans-serif;flex:1;}
    .bkcm-foot{padding:12px 20px 18px;border-top:1px solid rgba(255,255,255,.07);display:flex;gap:9px;}
    .bkcm-btn-main{flex:2;background:linear-gradient(135deg,#b8860b,#d4af37);color:#1a0f00;border:none;padding:12px;border-radius:12px;font-size:14px;font-weight:900;cursor:pointer;font-family:'Cairo',sans-serif;display:flex;align-items:center;justify-content:center;gap:7px;}
    .bkcm-btn-cancel{flex:1;background:rgba(255,255,255,.05);color:rgba(255,255,255,.55);border:1px solid rgba(255,255,255,.09);padding:12px;border-radius:12px;font-size:13px;font-weight:700;cursor:pointer;font-family:'Cairo',sans-serif;}
    #bkcm-err{font-size:11.5px;font-weight:700;color:#f87171;text-align:center;min-height:14px;padding:0 20px;font-family:'Cairo',sans-serif;}



@keyframes bkShareIn{from{opacity:0;transform:translateY(-10px) scale(.95)}to{opacity:1;transform:none}}
        .bksp-url{background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.09);border-radius:9px;padding:9px 11px;font-size:11px;color:#38bdf8;direction:ltr;text-align:left;word-break:break-all;margin:10px 0;cursor:pointer;transition:background .15s;font-family:monospace;}
        .bksp-url:hover{background:rgba(14,165,233,.12);}
        .bksp-btn{display:flex;align-items:center;gap:7px;width:100%;padding:10px 13px;border-radius:10px;border:1px solid rgba(255,255,255,.09);background:rgba(255,255,255,.04);color:var(--t1,#f4f0e6);font-size:12px;font-weight:700;cursor:pointer;font-family:'Cairo',sans-serif;transition:all .18s;margin-bottom:7px;}
        .bksp-btn:hover{background:rgba(255,255,255,.10);}
        .bksp-btn.primary{background:rgba(14,165,233,.15);border-color:rgba(14,165,233,.35);color:#38bdf8;}
        .bksp-btn.primary:hover{background:rgba(14,165,233,.25);}


'
   +'@page{size:A4;margin:0;}*{margin:0;padding:0;box-sizing:border-box;font-family:"Segoe UI",Tahoma,Arial,sans-serif;-webkit-print-color-adjust:exact;print-color-adjust:exact;}'
   +'body{background:#eef1f6;color:#16202e;direction:rtl;text-align:right;padding:24px;}'
   +'.page{max-width:840px;margin:0 auto;background:#fff;border-radius:18px;overflow:hidden;box-shadow:0 24px 60px rgba(13,20,40,.16);}'
   +'.hd{position:relative;background:linear-gradient(135deg,#0b1220 0%,#1b2750 58%,'+accent+' 145%);color:#fff;padding:30px 32px 26px;overflow:hidden;}'
   +'.hd::after{content:"";position:absolute;inset:0;background:radial-gradient(130% 130% at 100% 0%,rgba(255,255,255,.13),transparent 52%);}'
   +'.hd .row{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;position:relative;z-index:1;}'
   +'.hd .ttl{font-size:23px;font-weight:800;letter-spacing:-.3px;}'
   +'.hd .badge{display:inline-block;margin-top:10px;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.26);padding:5px 14px;border-radius:30px;font-size:13px;font-weight:700;}'
   +'.hd .sub{font-size:12.5px;color:rgba(255,255,255,.8);margin-top:11px;}'
   +'.hd .c{text-align:left;flex-shrink:0;}.hd .c .nm{font-size:17px;font-weight:800;}.hd .c .tag{font-size:10px;color:rgba(255,255,255,.66);margin-top:4px;letter-spacing:2px;}'
   +'.bd{padding:24px 28px 6px;}'
   +'.stats{display:flex;gap:11px;flex-wrap:wrap;margin-bottom:18px;}'
   +'.st{position:relative;flex:1;min-width:120px;background:#fff;border:1px solid #eef1f6;border-radius:14px;padding:16px 16px 14px;box-shadow:0 6px 18px rgba(13,20,40,.06);overflow:hidden;transition:transform .25s ease,box-shadow .25s ease;animation:stIn .55s cubic-bezier(.16,1,.3,1) both;}'
   +'.st:hover{transform:translateY(-5px) scale(1.015);box-shadow:0 16px 34px rgba(13,20,40,.14);}'
   +'.st:nth-child(2){animation-delay:.07s}.st:nth-child(3){animation-delay:.14s}.st:nth-child(4){animation-delay:.21s}.st:nth-child(5){animation-delay:.28s}.st:nth-child(6){animation-delay:.35s}'
   +'@keyframes stIn{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}'
   +'.st-bar{position:absolute;top:0;right:0;left:0;height:4px;}'
   +'.st-l{font-size:11px;color:#64748b;font-weight:700;}'
   +'.st-v{font-size:21px;font-weight:800;margin-top:8px;font-variant-numeric:tabular-nums;}'
   +'.st-s{font-size:10px;color:#94a3b8;margin-top:4px;}'
   +'.sec-h{display:flex;align-items:center;gap:9px;font-size:14.5px;font-weight:800;color:#0b1220;margin:22px 0 10px;}'
   +'.sec-h .ic{width:26px;height:26px;border-radius:8px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:13px;flex-shrink:0;}'
   +'.sec-h .cnt{font-size:11px;color:#94a3b8;font-weight:700;}'
   +'table{width:100%;border-collapse:collapse;border:1px solid #eef1f6;border-radius:12px;overflow:hidden;}'
   +'thead th{background:#f5f7fb;color:#0b1220;font-size:11.5px;font-weight:800;padding:11px 12px;text-align:right;border-bottom:1px solid #e6eaf2;}'
   +'tbody td{padding:11px 12px;font-size:12.5px;border-bottom:1px solid #f1f4f9;text-align:right;}'
   +'tbody tr:nth-child(even){background:#fafbfd;}'
   +'td.c{text-align:center;color:#94a3b8;font-size:11px;}td.num{font-variant-numeric:tabular-nums;font-weight:700;white-space:nowrap;}td.fee{color:#dc2626;}td.net{color:#059669;font-weight:800;}'
   +'.dir{font-size:10.5px;font-weight:800;padding:3px 10px;border-radius:20px;}.dir.in{background:#dcfce7;color:#166534;}.dir.out{background:#fee2e2;color:#b91c1c;}'
   +'.typ{font-size:10.5px;font-weight:800;padding:3px 10px;border-radius:20px;}.typ.cash{background:#dcfce7;color:#166534;}.typ.bank{background:#dbeafe;color:#1e40af;}'
   +'tr.tot td{background:linear-gradient(135deg,#0b1220,#1b2750);color:#fff;font-weight:800;border:0;}'
   +'.foot{margin-top:20px;font-size:11px;color:#94a3b8;text-align:center;border-top:1px solid #eef1f6;padding-top:14px;}'
   +'.noprint{text-align:center;padding:14px 28px 28px;}.noprint button{background:linear-gradient(135deg,'+accent+',#1b2750);color:#fff;border:0;padding:13px 32px;border-radius:11px;font-size:14px;font-weight:800;cursor:pointer;font-family:inherit;box-shadow:0 10px 24px rgba(27,39,80,.3);transition:transform .2s ease;}.noprint button:hover{transform:translateY(-2px);}'
   +'@media print{body{background:#fff;padding:0;}.page{box-shadow:none;border-radius:0;max-width:none;}.noprint{display:none;}.st{animation:none!important;}}'
   +'


*{box-sizing:border-box;margin:0;padding:0;}
@page{size:A4;margin:12mm 10mm;}
body{font-family:'Cairo','Tajawal','Segoe UI',Arial,sans-serif;color:#1a1a1a;background:#fff;line-height:1.6;}
.page{max-width:1100px;margin:0 auto;padding:18px;}

/* 🆕 REPORT BRAND BAR — Elegant system logo display at top */
.report-brand-bar{
  display:flex;align-items:center;gap:14px;
  margin-bottom:18px;
  padding:12px 18px;
  background:linear-gradient(135deg, #fdf8eb 0%, #faf3e0 50%, #fdf8eb 100%);
  border:1.5px solid #C9A84C;
  border-radius:14px;
  position:relative;
  overflow:hidden;
  box-shadow:0 4px 14px rgba(201,168,76,.18), inset 0 1px 0 rgba(255,255,255,.5);
}
.report-brand-bar::before{
  content:'';
  position:absolute;
  top:0;left:0;right:0;
  height:3px;
  background:linear-gradient(90deg, transparent, #C9A84C, #fbbf24, #C9A84C, transparent);
}
.report-brand-bar::after{
  content:'';
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 15% 50%, rgba(251,191,36,.08), transparent 40%),
    radial-gradient(circle at 85% 50%, rgba(201,168,76,.06), transparent 40%);
  pointer-events:none;
}
.rbb-logo{
  width:60px;height:60px;
  display:flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg, #fbbf24 0%, #C9A84C 50%, #9F7E1C 100%);
  border-radius:14px;
  color:#fff;
  flex-shrink:0;
  box-shadow:
    0 6px 16px rgba(201,168,76,.4),
    inset 0 1.5px 0 rgba(255,255,255,.3),
    inset 0 -1.5px 0 rgba(0,0,0,.15);
  position:relative;
  overflow:hidden;
}
.rbb-logo::before{
  content:'';
  position:absolute;
  top:0;left:0;right:0;height:50%;
  background:linear-gradient(180deg, rgba(255,255,255,.25), transparent);
  pointer-events:none;
}
.rbb-logo img{
  width:78%;
  height:78%;
  object-fit:contain;
  display:block;
  position:relative;
  z-index:1;
  filter:drop-shadow(0 2px 4px rgba(0,0,0,.15));
}
.rbb-logo svg{color:#fff;}
.rbb-text{flex:1;}
.rbb-system{
  font-family:'Cairo','Tajawal',sans-serif;
  font-size:18px;
  font-weight:900;
  color:#5A4520;
  letter-spacing:-.3px;
  background:linear-gradient(135deg, #5A4520 0%, #9F7E1C 50%, #5A4520 100%);
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
  margin-bottom:2px;
  line-height:1.2;
}
.rbb-tagline{
  font-size:10.5px;
  color:#9F7E1C;
  font-weight:700;
  letter-spacing:.2px;
  opacity:.85;
}
.rbb-decor{
  display:flex;align-items:center;gap:6px;
  padding:6px 10px;
  background:rgba(201,168,76,.12);
  border:1px solid rgba(201,168,76,.3);
  border-radius:10px;
  position:relative;
}
.rbb-decor::before, .rbb-decor::after{
  content:'';
  width:5px;height:5px;
  border-radius:50%;
  background:linear-gradient(135deg,#fbbf24,#C9A84C);
  box-shadow:0 1px 3px rgba(201,168,76,.4);
}
.rbb-decor::after{margin:0 2px;}
@media print{
  .report-brand-bar{-webkit-print-color-adjust:exact;print-color-adjust:exact;}
  .rbb-logo{-webkit-print-color-adjust:exact;print-color-adjust:exact;}
  .rbb-system{-webkit-print-color-adjust:exact;print-color-adjust:exact;}
}

/* HEADER */
/* 🆕 هيدر موحّد احترافي */
.rpt-header{margin-bottom:24px;border:1.5px solid #E8DCC0;border-radius:18px;overflow:hidden;box-shadow:0 4px 16px rgba(201,168,76,.1);}
.rpt-header-top{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 24px;background:linear-gradient(135deg,#fdfaf2 0%,#faf4e6 100%);}
.rpt-center{display:flex;align-items:center;gap:15px;}
.rpt-center-logo{width:64px;height:64px;border-radius:16px;display:flex;align-items:center;justify-content:center;font-size:32px;background:linear-gradient(135deg,#fbbf24,#C9A84C,#9F7E1C);color:#fff;flex-shrink:0;box-shadow:0 6px 16px rgba(201,168,76,.35),inset 0 1.5px 0 rgba(255,255,255,.3);overflow:hidden;}
.rpt-center-logo img{width:100%;height:100%;object-fit:cover;border-radius:16px;}
.rpt-center-name{font-size:20px;font-weight:900;color:#1a1a1a;letter-spacing:-.3px;}
.rpt-center-sub{font-size:12.5px;color:#7a6f55;font-weight:600;margin-top:3px;}
.rpt-center-vat{font-size:10.5px;color:#a39577;font-weight:600;margin-top:2px;}
.rpt-meta{text-align:left;flex-shrink:0;}
.rpt-title{font-size:16px;font-weight:900;color:#9F7E1C;}
.rpt-date{font-size:12px;color:#7a6f55;font-weight:700;margin-top:4px;}
.rpt-mode-badge{display:inline-block;margin-top:8px;padding:4px 12px;border-radius:20px;font-size:11px;font-weight:800;}
.rpt-mode-badge.is-op{background:rgba(245,158,11,.14);color:#b45309;border:1px solid rgba(245,158,11,.3);}
.rpt-mode-badge.is-full{background:rgba(16,185,129,.14);color:#047857;border:1px solid rgba(16,185,129,.3);}
.rpt-header-brand{padding:9px 24px;background:linear-gradient(90deg,#1a1505,#2a2008);color:#d4b86a;font-size:11px;font-weight:600;text-align:center;letter-spacing:.2px;}
.rpt-header-brand strong{color:#fbbf24;font-weight:800;}
.hdr{display:flex;align-items:center;justify-content:space-between;padding-bottom:18px;border-bottom:3px solid #C9A84C;margin-bottom:24px;}
.hdr-left{display:flex;align-items:center;gap:14px;}
.hdr-logo{width:60px;height:60px;background:linear-gradient(135deg,#C9A84C,#9F7E1C);border-radius:14px;display:flex;align-items:center;justify-content:center;font-size:30px;color:#fff;box-shadow:0 4px 12px rgba(201,168,76,.3);}
.hdr-name{font-size:22px;font-weight:900;color:#0a0800;line-height:1.2;}
.hdr-sub{font-size:11px;color:#666;margin-top:3px;}
.hdr-right{text-align:left;}
.hdr-title{font-size:14px;color:#9F7E1C;font-weight:800;letter-spacing:.5px;}
.hdr-date{font-size:12px;color:#444;margin-top:3px;font-weight:600;}
.hdr-date-tag{font-size:10px;color:#888;margin-top:2px;}

/* KPI cards */
.kpi-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin-bottom:22px;}
.kpi{background:linear-gradient(160deg,#ffffff,#f8f6f0);border:1px solid #ece5d4;border-right:4px solid;border-radius:14px;padding:14px 16px;box-shadow:0 2px 8px rgba(0,0,0,.04);}
.kpi.green{border-right-color:#22C55E;}
.kpi.purple{border-right-color:#a855f7;}
.kpi.gold{border-right-color:#C9A84C;}
.kpi.red{border-right-color:#EF4444;}
.kpi.blue{border-right-color:#3B82F6;}
.kpi-l{font-size:10px;color:#777;font-weight:700;margin-bottom:4px;}
.kpi-v{font-family:'IBM Plex Mono','Roboto Mono',monospace;font-size:22px;font-weight:900;color:#0a0800;line-height:1;letter-spacing:-1px;}
.kpi-u{font-size:10px;color:#888;margin-top:3px;}

/* Net profit hero */
.hero{background:linear-gradient(135deg,#9F7E1C,#C9A84C);color:#fff;border-radius:14px;padding:18px 24px;margin-bottom:20px;display:flex;align-items:center;justify-content:space-between;box-shadow:0 6px 20px rgba(201,168,76,.25);}
.hero-l{font-size:13px;font-weight:700;opacity:.9;letter-spacing:.5px;}
.hero-v{font-family:'IBM Plex Mono','Roboto Mono',monospace;font-size:32px;font-weight:900;letter-spacing:-1px;}
.hero-sub{font-size:11px;opacity:.85;margin-top:3px;}

/* Section headings */
.sec{margin-bottom:22px;break-inside:avoid;page-break-inside:avoid;}
/* 🆕 تقسيم ذكي: الأقسام الكبيرة تبدأ صفحة جديدة */
.sec-page{break-before:page;page-break-before:always;}
/* الجداول الطويلة: السماح بالتقسيم لكن مع تكرار الرأس */
.sec-long{break-inside:auto;page-break-inside:auto;}
.sec-long thead{display:table-header-group;}
.sec-long tr{break-inside:avoid;page-break-inside:avoid;}
/* منع يُتم الصفوف */
table{break-inside:auto;}
thead{display:table-header-group;}
tfoot{display:table-footer-group;}
.footer{margin-top:24px;padding:14px 12px;text-align:center;border-top:1.5px solid #ddd;font-size:10.5px;line-height:1.9;color:#777;}
.footer .o{color:#C9A84C;font-weight:800;}
.footer a{color:inherit;text-decoration:none;}
.footer strong{font-weight:800;}
tr{break-inside:avoid;page-break-inside:avoid;}
/* عناوين الأقسام لا تنفصل عن محتواها */
.sec-h{break-after:avoid;page-break-after:avoid;}
@media print{
  .print-bar{display:none !important;}
  .sec{margin-bottom:18px;}
}
.sec-h{display:flex;align-items:center;gap:8px;margin-bottom:10px;padding-bottom:8px;border-bottom:2px solid #e5e5e5;}
.sec-h-ico{width:28px;height:28px;background:#9F7E1C;color:#fff;border-radius:7px;display:flex;align-items:center;justify-content:center;font-size:14px;}
.sec-h-name{font-size:14px;font-weight:800;color:#0a0800;}

/* Tables */
table{width:100%;border-collapse:collapse;font-size:11px;}
th{background:linear-gradient(135deg,#0a0800,#2d2100);color:#C9A84C;padding:9px 8px;text-align:right;font-weight:700;font-size:11px;border:1px solid #1a1200;}
td{padding:8px;text-align:right;border:1px solid #e5e5e5;color:#222;}
tr:nth-child(even) td{background:#fafafa;}
td.amt{font-family:'IBM Plex Mono','Roboto Mono',monospace;font-weight:800;color:#9F7E1C;text-align:left;direction:ltr;}
.bd-paid{background:#dcfce7;color:#15803d;padding:2px 8px;border-radius:8px;font-size:10px;font-weight:800;}
.bd-unp{background:#fee2e2;color:#991b1b;padding:2px 8px;border-radius:8px;font-size:10px;font-weight:800;}
.bd-ref{background:#f3e8ff;color:#7c3aed;padding:2px 8px;border-radius:8px;font-size:10px;font-weight:800;}
.bd-partial{background:#fef3c7;color:#b45309;padding:2px 8px;border-radius:8px;font-size:10px;font-weight:800;}

/* Two-column tables */
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:14px;}

/* Footer */
.foot{margin-top:30px;padding-top:14px;border-top:2px solid #C9A84C;text-align:center;font-size:10px;color:#888;line-height:1.8;}
.foot strong{color:#9F7E1C;}

/* 🆕 Powered-by strip (admin branding badge) */
/* 🆕✨ LUXURY POWERED-BY STRIP — more prominent with logo showcase */
.powered-by-strip{
  display:flex;align-items:center;justify-content:center;gap:11px;
  padding:11px 18px;
  margin-bottom:14px;
  background:
    radial-gradient(ellipse at center, rgba(201,168,76,.08) 0%, rgba(201,168,76,.02) 70%),
    linear-gradient(135deg, rgba(159,126,28,.06) 0%, rgba(159,126,28,.01) 100%);
  border:1px solid rgba(159,126,28,.28);
  border-radius:12px;
  font-size:11px;
  color:#5A4520;
  font-weight:700;
  letter-spacing:.3px;
  position:relative;
  overflow:hidden;
}
/* Subtle gold shine line at top of strip */
.powered-by-strip::before{
  content:'';
  position:absolute;
  top:0;left:0;right:0;
  height:1.5px;
  background:linear-gradient(90deg, transparent 0%, rgba(201,168,76,.6) 50%, transparent 100%);
}
/* Inner decorative dot */
.powered-by-strip::after{
  content:'';
  position:absolute;
  width:4px;height:4px;
  background:linear-gradient(135deg,#fbbf24,#C9A84C);
  border-radius:50%;
  box-shadow:0 0 8px rgba(201,168,76,.5);
  right:14px;top:50%;transform:translateY(-50%);
}
.pbs-logo{
  display:inline-flex;align-items:center;justify-content:center;
  width:30px;height:30px;
  background:linear-gradient(135deg,#fef3c7,#fde68a 50%,#C9A84C);
  border-radius:8px;
  color:#5A4520;
  flex-shrink:0;
  overflow:hidden;
  box-shadow:
    0 4px 10px rgba(201,168,76,.35),
    inset 0 1px 0 rgba(255,255,255,.6),
    inset 0 -1px 0 rgba(0,0,0,.1);
  border:1px solid rgba(201,168,76,.45);
  position:relative;
}
.pbs-logo img{
  width:80%;height:80%;
  object-fit:contain;
  display:block;
  margin:auto;
  filter:drop-shadow(0 1px 2px rgba(0,0,0,.15));
}
.pbs-text{
  display:inline-flex;align-items:center;gap:7px;
  font-size:11.5px;
  font-weight:800;
  color:#7A6420;
}
.pbs-sep{
  opacity:.5;
  font-weight:900;
}
.pbs-owner{
  color:#5A4520;
  font-weight:900;
  letter-spacing:-.1px;
}

/* 🆕 Expense mode badge in header */
.exp-mode-badge{
  display:inline-flex;align-items:center;justify-content:center;
  margin-top:8px;
  padding:5px 11px;
  border-radius:9px;
  font-size:10.5px;
  font-weight:900;
  letter-spacing:.3px;
  border:1.5px solid;
}
.exp-mode-badge.mode-operational{
  background:linear-gradient(135deg,#FEF3C7,#FDE68A);
  color:#92400E;
  border-color:#F59E0B;
}
.exp-mode-badge.mode-full{
  background:linear-gradient(135deg,#DBEAFE,#BFDBFE);
  color:#1E40AF;
  border-color:#3B82F6;
}

/* 🆕 Expense mode explanation card */
.exp-mode-card{
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:14px;
  align-items:center;
  padding:14px 18px;
  margin-bottom:14px;
  border-radius:14px;
  border:1.5px solid;
  position:relative;
  overflow:hidden;
}
.exp-mode-card.is-op{
  background:linear-gradient(155deg, rgba(245,158,11,.08), rgba(245,158,11,.02));
  border-color:rgba(245,158,11,.35);
}
.exp-mode-card.is-full{
  background:linear-gradient(155deg, rgba(59,130,246,.08), rgba(59,130,246,.02));
  border-color:rgba(59,130,246,.35);
}
.exp-mode-card::before{
  content:'';
  position:absolute;
  top:0;left:0;right:0;
  height:2px;
  background:linear-gradient(90deg,transparent,currentColor,transparent);
  opacity:.4;
}
.exp-mode-card.is-op{color:#92400E;}
.exp-mode-card.is-full{color:#1E40AF;}
.emc-icon{
  font-size:30px;
  flex-shrink:0;
  line-height:1;
}
.emc-content{flex:1;min-width:0;}
.emc-title{
  font-size:13.5px;
  font-weight:800;
  margin-bottom:5px;
  letter-spacing:-.2px;
}
.emc-title strong{
  font-weight:900;
  padding:1px 6px;
  border-radius:5px;
}
.exp-mode-card.is-op .emc-title strong{background:rgba(245,158,11,.18);}
.exp-mode-card.is-full .emc-title strong{background:rgba(59,130,246,.18);}
.emc-desc{
  font-size:11px;
  color:#555;
  font-weight:600;
  line-height:1.65;
  letter-spacing:.1px;
}
.emc-desc strong{font-weight:900;color:#222;}
.emc-formula{
  flex-shrink:0;
  background:rgba(255,255,255,.55);
  border:1px solid currentColor;
  border-radius:10px;
  padding:8px 12px;
  text-align:center;
  min-width:140px;
}
.emc-formula-lbl{
  font-size:9px;
  font-weight:800;
  opacity:.65;
  letter-spacing:.6px;
  margin-bottom:3px;
}
.emc-formula-val{
  font-size:10.5px;
  font-weight:900;
  letter-spacing:-.1px;
}
@media(max-width:700px){
  .exp-mode-card{
    grid-template-columns:auto 1fr;
  }
  .emc-formula{
    grid-column:1/-1;
    margin-top:6px;
  }
}

/* Print button */
.print-bar{position:fixed;top:10px;left:10px;display:flex;gap:8px;z-index:9999;}
.print-bar button{padding:10px 18px;background:#9F7E1C;color:#fff;border:none;border-radius:8px;font-family:inherit;font-size:12px;font-weight:800;cursor:pointer;box-shadow:0 4px 12px rgba(0,0,0,.2);}
.print-bar button.close{background:#666;}

@media print{
  .print-bar{display:none;}
  body{padding:0;}
  .sec{page-break-inside:avoid;}
  .hero{background:linear-gradient(135deg,#9F7E1C,#C9A84C) !important;-webkit-print-color-adjust:exact;print-color-adjust:exact;}
  th{background:linear-gradient(135deg,#0a0800,#2d2100) !important;color:#C9A84C !important;-webkit-print-color-adjust:exact;print-color-adjust:exact;}
  .exp-mode-badge, .exp-mode-card, .powered-by-strip{
    -webkit-print-color-adjust:exact;
    print-color-adjust:exact;
  }
  .exp-mode-card{page-break-inside:avoid;}
}
.rpt-cover-page{width:100%;text-align:center;break-after:page;page-break-after:always;margin:0;padding:0;line-height:0;}
  .rpt-cover-img{max-width:100%;max-height:92vh;width:auto;height:auto;display:block;margin:0 auto;}
  .rpt-cover-frame{width:100%;height:92vh;border:none;display:block;}
  @media print{
    .rpt-cover-page{break-after:page;page-break-after:always;margin:0;padding:0;}
    .rpt-cover-img{max-height:96vh;}
  }
  ${window._pdfFmtCSS ? window._pdfFmtCSS() : ''}
/* 🆕 brand-bar للتقرير الشهري */
.brand-bar{display:flex;align-items:center;gap:14px;margin-bottom:18px;padding:14px 20px;background:linear-gradient(135deg,#fdf8eb,#faf3e0);border:1.5px solid #C9A84C;border-radius:13px;}
.brand-bar-logo{width:50px;height:50px;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#fef3c7,#C9A84C);border-radius:11px;overflow:hidden;flex-shrink:0;}
.brand-bar-logo img{width:80%;height:80%;object-fit:contain;}
.brand-bar-logo svg{color:#5A4520;}
.brand-bar-text{flex:1;}
.brand-bar-title{font-size:16px;font-weight:900;color:#5A4520;letter-spacing:-.3px;}
.brand-bar-sub{font-size:11px;color:#7A6420;font-weight:700;margin-top:2px;}
.fc-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.fc-card{padding:12px;background:#fff;border:1.5px solid #e5e5e5;border-radius:10px;}
.fc-h{font-size:12px;font-weight:900;color:#1a1a1a;margin-bottom:8px;}
.fc-row{display:flex;justify-content:space-between;padding:5px 0;font-size:11px;border-bottom:1px dashed #eee;}
.fc-row:last-child{border-bottom:none;}
.fc-row-l{color:#666;font-weight:700;}
.fc-row-v{font-weight:900;}
.sec-h-title{font-size:13px;font-weight:900;letter-spacing:.3px;}
/* 🆕 تخطيط الهيدر المفقود للتقرير الشهري */
.hdr-l{display:flex;align-items:center;gap:14px;}
.hdr-r{text-align:left;}
.hdr-l .lg{width:56px;height:56px;background:#fff;border-radius:13px;display:flex;align-items:center;justify-content:center;overflow:hidden;box-shadow:0 6px 16px rgba(201,168,76,.4);flex-shrink:0;}
.hdr-l .lg img{width:100%;height:100%;object-fit:contain;}
.hdr-l .lg .ph{font-size:28px;}
.hdr-tag{font-size:10px;color:#9F7E1C;margin-top:2px;}



*{box-sizing:border-box;margin:0;padding:0;font-family:'Cairo',sans-serif;}
@page{size:A4;margin:12mm 10mm;}
body{font-family:'Cairo',sans-serif;color:#1f2430;background:#eef1f5;line-height:1.55;}
/* 🆕 قسم تفاصيل المركبة */
.z-vehicle{border:1px solid #e8ebf0;border-radius:14px;overflow:hidden;margin-bottom:16px;box-shadow:0 2px 8px rgba(0,0,0,.03);}
.z-vehicle-h{background:linear-gradient(135deg,#0e2a47,#1a4971);color:#fff;font-size:12px;font-weight:900;padding:11px 16px;letter-spacing:.2px;display:flex;align-items:center;gap:9px;}
.z-veh-ico{font-size:16px;}
.z-vehicle-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;padding:16px;background:#fafbfc;}
.z-vcell{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid #eef0f3;border-radius:11px;padding:11px 13px;}
.z-vcell-ic{width:34px;height:34px;flex-shrink:0;display:flex;align-items:center;justify-content:center;border-radius:9px;font-size:16px;background:linear-gradient(135deg,#eef4fb,#e0ecf8);}
.z-vcell-tx{display:flex;flex-direction:column;gap:2px;min-width:0;}
.z-vcell-tx span{color:#5a6472;font-weight:700;font-size:9.5px;}
.z-vcell-tx b{color:#1f2430;font-weight:900;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
@media(max-width:560px){.z-vehicle-grid{grid-template-columns:repeat(2,1fr);gap:9px;padding:12px;}}
.inv-page{max-width:820px;margin:0 auto;padding:0;background:#fff;}
.print-bar{position:sticky;top:0;background:#11131a;padding:11px;display:flex;gap:8px;justify-content:center;z-index:10;}
.print-bar button{padding:9px 22px;background:linear-gradient(135deg,#C9A84C,#9F7E1C);color:#fff;border:none;border-radius:9px;font-weight:800;cursor:pointer;font-family:inherit;font-size:13px;}
.z-invoice{padding:26px 30px 30px;}
.z-top{display:flex;justify-content:space-between;align-items:flex-start;padding-bottom:16px;border-bottom:3px solid #C9A84C;margin-bottom:18px;}
.z-top-r{display:flex;align-items:center;gap:13px;}
.z-logo{width:58px;height:58px;border-radius:13px;background:linear-gradient(135deg,#fdf6e3,#f0e2bd);display:flex;align-items:center;justify-content:center;overflow:hidden;border:1px solid #e8d9ad;flex-shrink:0;}
.z-logo img{width:100%;height:100%;object-fit:contain;}
.z-logo span{font-size:28px;}
.z-seller-name{font-size:18px;font-weight:900;color:#1a1a1a;letter-spacing:-.3px;}
.z-seller-sub{font-size:11.5px;color:#8a8a8a;font-weight:700;margin-top:3px;}
.z-top-l{text-align:left;}
.z-doc-title{font-size:20px;font-weight:900;color:#9F7E1C;letter-spacing:-.5px;}
.z-doc-title-en{font-size:10px;font-weight:800;color:#8a8a8a;letter-spacing:2px;margin-bottom:6px;}
.zb{display:inline-block;padding:4px 13px;border-radius:20px;font-size:10.5px;font-weight:900;}
.zb-paid{background:#dcfce7;color:#15803d;border:1px solid #86efac;}
.zb-due{background:#fee2e2;color:#dc2626;border:1px solid #fca5a5;}
.zb-refund{background:#f3e8ff;color:#9333ea;border:1px solid #d8b4fe;}
.z-meta{display:flex;justify-content:space-between;align-items:center;gap:18px;background:linear-gradient(135deg,#fafbfc,#f3f5f8);border:1px solid #e8ebf0;border-radius:13px;padding:14px 18px;margin-bottom:16px;}
.z-meta-info{flex:1;display:grid;grid-template-columns:1fr 1fr;gap:7px 22px;}
.z-mrow{display:flex;justify-content:space-between;font-size:11.5px;border-bottom:1px dashed #e3e6eb;padding-bottom:5px;}
.z-mrow span{color:#5a6472;font-weight:700;}
.z-mrow b{color:#1f2430;font-weight:900;}
.z-qr{width:108px;height:108px;flex-shrink:0;background:#fff;border:1px solid #e3e6eb;border-radius:10px;padding:4px;}
.z-qr-grid{width:100%;height:100%;display:grid;grid-template-columns:repeat(7,1fr);grid-template-rows:repeat(7,1fr);gap:1px;}
.z-qr-grid span{background:#fff;border-radius:1px;}
.z-qr-grid span.on{background:#1a1a1a;}
.z-parties{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:16px;align-items:stretch;}
.z-party{border:1px solid #e8ebf0;border-radius:12px;overflow:hidden;display:flex;flex-direction:column;background:#fff;}
.z-party-h{background:linear-gradient(135deg,#0e2a47,#1a4971);color:#fff;font-size:11px;font-weight:900;padding:9px 14px;letter-spacing:.3px;}
.z-prow{display:flex;justify-content:space-between;padding:7px 14px;font-size:11.5px;border-bottom:1px dashed #eef0f3;}
.z-prow:last-child{border-bottom:none;}
.z-prow span{color:#5a6472;font-weight:700;}
.z-prow b{color:#1f2430;font-weight:900;text-align:left;}
.z-muted b{color:#9098a5;}
.z-table{width:100%;table-layout:fixed;border-collapse:collapse;margin-bottom:16px;border-radius:12px;overflow:hidden;border:1px solid #e8ebf0;}
.z-table thead th{background:linear-gradient(135deg,#0e2a47,#1a4971);color:#fff;font-size:9.5px;font-weight:800;padding:9px 5px;text-align:center;line-height:1.3;}
.z-table thead th:nth-child(2){text-align:right;}
.z-table tbody td{padding:10px 5px;font-size:10.5px;font-weight:700;border-bottom:1px solid #f0f2f5;color:#1f2430;vertical-align:middle;text-align:center;word-break:break-word;}
.z-table tbody td:nth-child(2){text-align:right;}
.z-table .z-num{font-family:'Cairo';direction:ltr;}
.z-table tbody tr:last-child td{border-bottom:none;}
.z-table .z-c{text-align:center;}
.z-table .z-num{text-align:center;font-weight:800;direction:ltr;}
.z-desc strong{font-weight:900;color:#1a1a1a;}
.z-sub{font-size:10px;color:#5a6472;font-weight:700;margin-top:3px;}
.z-note{font-size:11px;font-weight:800;padding:10px 14px;border-radius:10px;margin-bottom:14px;}
.z-loyal{background:linear-gradient(135deg,#fef9c3,#fef3c7);color:#a16207;border:1px solid #fde68a;}
.z-summary-wrap{display:flex;justify-content:space-between;gap:18px;margin-bottom:16px;align-items:flex-start;flex-wrap:wrap;}
.z-summary-side{flex:1;min-width:240px;}
.z-pay{font-size:11.5px;margin-bottom:12px;background:#fafbfc;border:1px solid #eef0f3;border-radius:11px;padding:11px 14px;}
.z-pay span{color:#5a6472;font-weight:700;display:block;margin-bottom:4px;font-size:10px;}
.z-pay b{color:#1f2430;font-weight:900;font-size:12.5px;}
.z-legal{font-size:9px;color:#4b5563;font-weight:700;line-height:1.6;max-width:340px;}
.z-summary{width:290px;flex-shrink:0;border:1px solid #e8ebf0;border-radius:12px;overflow:hidden;align-self:flex-start;}
.z-srow{display:flex;justify-content:space-between;padding:10px 16px;font-size:12px;border-bottom:1px solid #f0f2f5;}
.z-srow span{color:#4b5563;font-weight:700;}
.z-srow b{color:#1f2430;font-weight:900;direction:ltr;}
.z-srow.z-total{background:linear-gradient(135deg,#9F7E1C,#C9A84C);border-bottom:none;}
.z-srow.z-total span{color:#fff;font-size:13px;font-weight:900;}
.z-srow.z-total b{color:#fff;font-size:16px;}
.z-refund{border:1.5px solid #d8b4fe;border-radius:12px;overflow:hidden;margin-bottom:16px;}
.z-refund-h{background:linear-gradient(135deg,#7c3aed,#9333ea);color:#fff;font-size:11.5px;font-weight:900;padding:9px 14px;}
.z-rgrid{display:grid;grid-template-columns:1fr 1fr;gap:8px 18px;padding:13px 16px;background:#faf5ff;}
.z-rgrid>div{display:flex;justify-content:space-between;font-size:11.5px;border-bottom:1px dashed #e9d5ff;padding-bottom:5px;}
.z-rgrid>div span{color:#5a6472;font-weight:700;}
.z-rgrid>div b{color:#7c3aed;font-weight:900;}
.z-rfull{grid-column:1/-1;}
.z-foot{text-align:center;padding-top:16px;border-top:2px solid #eef0f3;font-size:11px;color:#5a6472;font-weight:700;}
.z-foot-sys{font-size:10px;color:#9098a5;margin-top:5px;}
.z-foot-sys strong{color:#9F7E1C;}
.z-foot-link{font-size:9.5px;color:#5a6472;font-weight:700;margin-top:6px;word-break:break-all;}
.z-foot-link span{color:#9F7E1C;}
.inv-page:not(:last-child){page-break-after:always;}
@media print{.print-bar{display:none;}body{background:#fff;}.z-invoice{padding:0;}.z-party,.z-table,.z-summary,.z-refund,.z-meta,.z-vehicle{page-break-inside:avoid;}.z-top,.z-party-h,.z-table thead th,.z-srow.z-total,.z-refund-h,.z-vehicle-h{-webkit-print-color-adjust:exact;print-color-adjust:exact;}.z-top{margin-bottom:8px;padding-bottom:8px;}.z-meta{margin-bottom:8px;}.z-parties{margin-bottom:8px;gap:10px;}.z-vehicle{margin-bottom:8px;}.z-vehicle-grid{padding:9px;gap:7px;}.z-table{margin-bottom:8px;}.z-table thead th{padding:6px 4px;}.z-table tbody td{padding:7px 4px;}.z-summary-wrap{margin-bottom:8px;}.z-prow{padding:5px 12px;}.z-vcell{padding:8px 10px;}.z-foot{padding-top:8px;margin-bottom:0;}.z-legal{margin-bottom:0;}.inv-page{margin:0;padding:0;}.inv-page>*:last-child{margin-bottom:0 !important;}html,body{height:auto !important;overflow:visible !important;}@page{size:A4 portrait;margin:7mm;}}
.print-bar{position:sticky;top:0;background:#1f2430;padding:10px;text-align:center;z-index:100;}
.print-bar button{background:#5C2E96;color:#fff;border:none;padding:9px 18px;border-radius:8px;font-size:13px;font-weight:700;cursor:pointer;margin:0 4px;font-family:'Cairo',sans-serif;}
@media print{.print-bar{display:none;}}



*{box-sizing:border-box;margin:0;padding:0;font-family:'Cairo',sans-serif;}
@page{size:A4;margin:12mm 10mm;}
body{font-family:'Cairo',sans-serif;color:#1f2430;background:#eef1f5;line-height:1.55;}
/* 🆕 قسم تفاصيل المركبة */
.z-vehicle{border:1px solid #e8ebf0;border-radius:14px;overflow:hidden;margin-bottom:16px;box-shadow:0 2px 8px rgba(0,0,0,.03);}
.z-vehicle-h{background:linear-gradient(135deg,#0e2a47,#1a4971);color:#fff;font-size:12px;font-weight:900;padding:11px 16px;letter-spacing:.2px;display:flex;align-items:center;gap:9px;}
.z-veh-ico{font-size:16px;}
.z-vehicle-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;padding:16px;background:#fafbfc;}
.z-vcell{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid #eef0f3;border-radius:11px;padding:11px 13px;}
.z-vcell-ic{width:34px;height:34px;flex-shrink:0;display:flex;align-items:center;justify-content:center;border-radius:9px;font-size:16px;background:linear-gradient(135deg,#eef4fb,#e0ecf8);}
.z-vcell-tx{display:flex;flex-direction:column;gap:2px;min-width:0;}
.z-vcell-tx span{color:#5a6472;font-weight:700;font-size:9.5px;}
.z-vcell-tx b{color:#1f2430;font-weight:900;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
@media(max-width:560px){.z-vehicle-grid{grid-template-columns:repeat(2,1fr);gap:9px;padding:12px;}}
.inv-page{max-width:820px;margin:0 auto;padding:0;background:#fff;}
.print-bar{position:sticky;top:0;background:#11131a;padding:11px;display:flex;gap:8px;justify-content:center;z-index:10;}
.print-bar button{padding:9px 22px;background:linear-gradient(135deg,#C9A84C,#9F7E1C);color:#fff;border:none;border-radius:9px;font-weight:800;cursor:pointer;font-family:inherit;font-size:13px;}
.z-invoice{padding:26px 30px 30px;}
.z-top{display:flex;justify-content:space-between;align-items:flex-start;padding-bottom:16px;border-bottom:3px solid #C9A84C;margin-bottom:18px;}
.z-top-r{display:flex;align-items:center;gap:13px;}
.z-logo{width:58px;height:58px;border-radius:13px;background:linear-gradient(135deg,#fdf6e3,#f0e2bd);display:flex;align-items:center;justify-content:center;overflow:hidden;border:1px solid #e8d9ad;flex-shrink:0;}
.z-logo img{width:100%;height:100%;object-fit:contain;}
.z-logo span{font-size:28px;}
.z-seller-name{font-size:18px;font-weight:900;color:#1a1a1a;letter-spacing:-.3px;}
.z-seller-sub{font-size:11.5px;color:#8a8a8a;font-weight:700;margin-top:3px;}
.z-top-l{text-align:left;}
.z-doc-title{font-size:20px;font-weight:900;color:#9F7E1C;letter-spacing:-.5px;}
.z-doc-title-en{font-size:10px;font-weight:800;color:#8a8a8a;letter-spacing:2px;margin-bottom:6px;}
.zb{display:inline-block;padding:4px 13px;border-radius:20px;font-size:10.5px;font-weight:900;}
.zb-paid{background:#dcfce7;color:#15803d;border:1px solid #86efac;}
.zb-due{background:#fee2e2;color:#dc2626;border:1px solid #fca5a5;}
.zb-refund{background:#f3e8ff;color:#9333ea;border:1px solid #d8b4fe;}
.z-meta{display:flex;justify-content:space-between;align-items:center;gap:18px;background:linear-gradient(135deg,#fafbfc,#f3f5f8);border:1px solid #e8ebf0;border-radius:13px;padding:14px 18px;margin-bottom:16px;}
.z-meta-info{flex:1;display:grid;grid-template-columns:1fr 1fr;gap:7px 22px;}
.z-mrow{display:flex;justify-content:space-between;font-size:11.5px;border-bottom:1px dashed #e3e6eb;padding-bottom:5px;}
.z-mrow span{color:#5a6472;font-weight:700;}
.z-mrow b{color:#1f2430;font-weight:900;}
.z-qr{width:108px;height:108px;flex-shrink:0;background:#fff;border:1px solid #e3e6eb;border-radius:10px;padding:4px;}
.z-qr-grid{width:100%;height:100%;display:grid;grid-template-columns:repeat(7,1fr);grid-template-rows:repeat(7,1fr);gap:1px;}
.z-qr-grid span{background:#fff;border-radius:1px;}
.z-qr-grid span.on{background:#1a1a1a;}
.z-parties{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:16px;align-items:stretch;}
.z-party{border:1px solid #e8ebf0;border-radius:12px;overflow:hidden;display:flex;flex-direction:column;background:#fff;}
.z-party-h{background:linear-gradient(135deg,#0e2a47,#1a4971);color:#fff;font-size:11px;font-weight:900;padding:9px 14px;letter-spacing:.3px;}
.z-prow{display:flex;justify-content:space-between;padding:7px 14px;font-size:11.5px;border-bottom:1px dashed #eef0f3;}
.z-prow:last-child{border-bottom:none;}
.z-prow span{color:#5a6472;font-weight:700;}
.z-prow b{color:#1f2430;font-weight:900;text-align:left;}
.z-muted b{color:#9098a5;}
.z-table{width:100%;table-layout:fixed;border-collapse:collapse;margin-bottom:16px;border-radius:12px;overflow:hidden;border:1px solid #e8ebf0;}
.z-table thead th{background:linear-gradient(135deg,#0e2a47,#1a4971);color:#fff;font-size:9.5px;font-weight:800;padding:9px 5px;text-align:center;line-height:1.3;}
.z-table thead th:nth-child(2){text-align:right;}
.z-table tbody td{padding:10px 5px;font-size:10.5px;font-weight:700;border-bottom:1px solid #f0f2f5;color:#1f2430;vertical-align:middle;text-align:center;word-break:break-word;}
.z-table tbody td:nth-child(2){text-align:right;}
.z-table .z-num{font-family:'Cairo';direction:ltr;}
.z-table tbody tr:last-child td{border-bottom:none;}
.z-table .z-c{text-align:center;}
.z-table .z-num{text-align:center;font-weight:800;direction:ltr;}
.z-desc strong{font-weight:900;color:#1a1a1a;}
.z-sub{font-size:10px;color:#5a6472;font-weight:700;margin-top:3px;}
.z-note{font-size:11px;font-weight:800;padding:10px 14px;border-radius:10px;margin-bottom:14px;}
.z-loyal{background:linear-gradient(135deg,#fef9c3,#fef3c7);color:#a16207;border:1px solid #fde68a;}
.z-summary-wrap{display:flex;justify-content:space-between;gap:18px;margin-bottom:16px;align-items:flex-start;flex-wrap:wrap;}
.z-summary-side{flex:1;min-width:240px;}
.z-pay{font-size:11.5px;margin-bottom:12px;background:#fafbfc;border:1px solid #eef0f3;border-radius:11px;padding:11px 14px;}
.z-pay span{color:#5a6472;font-weight:700;display:block;margin-bottom:4px;font-size:10px;}
.z-pay b{color:#1f2430;font-weight:900;font-size:12.5px;}
.z-legal{font-size:9px;color:#4b5563;font-weight:700;line-height:1.6;max-width:340px;}
.z-summary{width:290px;flex-shrink:0;border:1px solid #e8ebf0;border-radius:12px;overflow:hidden;align-self:flex-start;}
.z-srow{display:flex;justify-content:space-between;padding:10px 16px;font-size:12px;border-bottom:1px solid #f0f2f5;}
.z-srow span{color:#4b5563;font-weight:700;}
.z-srow b{color:#1f2430;font-weight:900;direction:ltr;}
.z-srow.z-total{background:linear-gradient(135deg,#9F7E1C,#C9A84C);border-bottom:none;}
.z-srow.z-total span{color:#fff;font-size:13px;font-weight:900;}
.z-srow.z-total b{color:#fff;font-size:16px;}
.z-refund{border:1.5px solid #d8b4fe;border-radius:12px;overflow:hidden;margin-bottom:16px;}
.z-refund-h{background:linear-gradient(135deg,#7c3aed,#9333ea);color:#fff;font-size:11.5px;font-weight:900;padding:9px 14px;}
.z-rgrid{display:grid;grid-template-columns:1fr 1fr;gap:8px 18px;padding:13px 16px;background:#faf5ff;}
.z-rgrid>div{display:flex;justify-content:space-between;font-size:11.5px;border-bottom:1px dashed #e9d5ff;padding-bottom:5px;}
.z-rgrid>div span{color:#5a6472;font-weight:700;}
.z-rgrid>div b{color:#7c3aed;font-weight:900;}
.z-rfull{grid-column:1/-1;}
.z-foot{text-align:center;padding-top:16px;border-top:2px solid #eef0f3;font-size:11px;color:#5a6472;font-weight:700;}
.z-foot-sys{font-size:10px;color:#9098a5;margin-top:5px;}
.z-foot-sys strong{color:#9F7E1C;}
.z-foot-link{font-size:9.5px;color:#5a6472;font-weight:700;margin-top:6px;word-break:break-all;}
.z-foot-link span{color:#9F7E1C;}
.inv-page:not(:last-child){page-break-after:always;}
@media print{.print-bar{display:none;}body{background:#fff;}.z-invoice{padding:0;}.z-party,.z-table,.z-summary,.z-refund,.z-meta,.z-vehicle{page-break-inside:avoid;}.z-top,.z-party-h,.z-table thead th,.z-srow.z-total,.z-refund-h,.z-vehicle-h{-webkit-print-color-adjust:exact;print-color-adjust:exact;}.z-top{margin-bottom:8px;padding-bottom:8px;}.z-meta{margin-bottom:8px;}.z-parties{margin-bottom:8px;gap:10px;}.z-vehicle{margin-bottom:8px;}.z-vehicle-grid{padding:9px;gap:7px;}.z-table{margin-bottom:8px;}.z-table thead th{padding:6px 4px;}.z-table tbody td{padding:7px 4px;}.z-summary-wrap{margin-bottom:8px;}.z-prow{padding:5px 12px;}.z-vcell{padding:8px 10px;}.z-foot{padding-top:8px;margin-bottom:0;}.z-legal{margin-bottom:0;}.inv-page{margin:0;padding:0;}.inv-page>*:last-child{margin-bottom:0 !important;}html,body{height:auto !important;overflow:visible !important;}@page{size:A4 portrait;margin:7mm;}}
.print-bar{position:sticky;top:0;background:#1f2430;padding:10px;text-align:center;z-index:100;}
.print-bar button{background:#5C2E96;color:#fff;border:none;padding:9px 18px;border-radius:8px;font-size:13px;font-weight:700;cursor:pointer;margin:0 4px;font-family:'Cairo',sans-serif;}
@media print{.print-bar{display:none;}}



.page{max-width:1100px;margin:0 auto;padding:14px;}
.print-bar{position:sticky;top:0;background:#1a1a1a;padding:10px;display:flex;gap:8px;justify-content:center;margin:-12mm -10mm 14px;z-index:10;}
.print-bar button{padding:9px 20px;background:linear-gradient(135deg,#dc2626,#991b1b);color:#fff;border:none;border-radius:8px;font-weight:800;cursor:pointer;font-family:inherit;}
.brand-bar{display:flex;align-items:center;gap:14px;margin-bottom:14px;padding:12px 18px;background:linear-gradient(135deg,#fdf8eb,#faf3e0);border:1.5px solid #C9A84C;border-radius:12px;}
.brand-bar-logo{width:46px;height:46px;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#fef3c7,#C9A84C);border-radius:10px;overflow:hidden;}
.brand-bar-logo img{width:80%;height:80%;object-fit:contain;}
.brand-bar-title{font-size:15px;font-weight:900;color:#5A4520;}
.brand-bar-sub{font-size:10.5px;color:#7A6420;font-weight:700;}
.center-hdr{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;margin-bottom:14px;background:linear-gradient(135deg,#7f1d1d,#dc2626);color:#fff;border-radius:13px;}
.cls-logo{width:50px;height:50px;background:#fff;border-radius:11px;display:flex;align-items:center;justify-content:center;overflow:hidden;}
.cls-logo img{width:100%;height:100%;object-fit:contain;}
.cls-name{font-size:15px;font-weight:900;color:#fff;}
.cls-sub{font-size:10.5px;color:#fecaca;margin-top:2px;}
.hdr-title{font-size:14px;font-weight:900;color:#fff;text-align:left;}
.hdr-date{font-size:11px;color:#fecaca;margin-top:3px;}
.hero{background:linear-gradient(135deg,#dc2626,#991b1b);color:#fff;padding:18px 22px;border-radius:14px;margin-bottom:14px;display:flex;justify-content:space-between;align-items:center;box-shadow:0 12px 28px rgba(220,38,38,.3);}
.hero-l{font-size:14px;font-weight:800;margin-bottom:5px;}
.hero-sub{font-size:11px;opacity:.85;}
.hero-v{font-size:32px;font-weight:900;letter-spacing:-1px;}
.kpi-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:14px;}
.kpi{padding:13px;background:#fafafa;border:1px solid #e5e5e5;border-radius:11px;text-align:center;}
.kpi-l{font-size:10.5px;color:#666;font-weight:700;margin-bottom:5px;}
.kpi-v{font-size:17px;font-weight:900;color:#1a1a1a;}
.sec{margin-bottom:14px;page-break-inside:avoid;}
.sec-h{padding:9px 14px;background:linear-gradient(135deg,#7f1d1d,#dc2626);color:#fff;border-radius:10px 10px 0 0;font-size:13px;font-weight:900;}
.sec-b{background:#fff;border:1.5px solid #e5e5e5;border-top:none;border-radius:0 0 12px 12px;padding:0;overflow:hidden;}
table{width:100%;border-collapse:collapse;}
th{background:linear-gradient(135deg,#fafafa,#f5f5f5);color:#555;padding:9px 12px;text-align:right;font-size:11px;font-weight:800;border-bottom:2px solid #e5e5e5;}
td{padding:9px 12px;border-bottom:1px solid #f0f0f0;font-size:11.5px;font-weight:700;color:#333;vertical-align:top;}
tr:nth-child(even) td{background:#fafafa;}
.footer{margin-top:24px;padding:14px;text-align:center;border-top:1.5px solid #ddd;font-size:10px;color:#999;}
.footer .o{font-weight:900;color:#5A4520;}
@media print{.print-bar{display:none;}body{padding:0;}.sec{page-break-inside:avoid;}.hero,th,.center-hdr,.sec-h,.brand-bar{-webkit-print-color-adjust:exact;print-color-adjust:exact;}}

.permit-title{text-align:center;padding:24px;margin-bottom:20px;background:linear-gradient(135deg,#1a1a1a,#7f1d1d);color:#fff;border-radius:14px;}
.permit-title-l{font-size:14px;font-weight:700;opacity:.9;margin-bottom:6px;}
.permit-title-h{font-size:26px;font-weight:900;letter-spacing:-.5px;color:#fde68a;}
.permit-title-num{font-size:13px;color:#fcd34d;font-weight:800;margin-top:6px;}
.center-info{display:flex;justify-content:space-between;align-items:center;padding:14px 18px;margin-bottom:16px;background:#f5f5f5;border-radius:11px;}
.center-info-l{font-size:13px;font-weight:900;color:#1a1a1a;}
.center-info-r{font-size:11.5px;color:#666;text-align:left;}
.field-row{display:flex;align-items:center;padding:10px 0;border-bottom:1px dashed #eee;}
.field-row:last-child{border-bottom:none;}
.field-label{flex:0 0 40%;font-size:12.5px;color:#666;font-weight:800;}
.field-value{flex:1;font-size:13px;font-weight:900;color:#1a1a1a;}
.amount-hero{background:linear-gradient(135deg,#9F7E1C,#C9A84C);color:#fff;padding:24px;border-radius:14px;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center;box-shadow:0 12px 28px rgba(201,168,76,.35);}
.amount-hero-l{font-size:14px;font-weight:800;opacity:.95;margin-bottom:3px;}
.amount-hero-sub{font-size:11px;opacity:.85;}
.amount-hero-v{font-size:34px;font-weight:900;letter-spacing:-1px;}
.signatures{display:grid;grid-template-columns:1fr 1fr 1fr;gap:14px;margin-top:24px;}
.sig-box{padding:18px 14px;border:2px dashed #c4c4c4;border-radius:11px;text-align:center;}
.sig-box-l{font-size:11px;color:#666;font-weight:800;margin-bottom:30px;}
.sig-box-line{border-top:1.5px solid #1a1a1a;padding-top:5px;font-size:11px;color:#888;}
@media print{.print-bar{display:none;}body{padding:0;}.section,.amount-hero,.permit-title,.brand-bar{page-break-inside:avoid;-webkit-print-color-adjust:exact;print-color-adjust:exact;}}



.page{max-width:1100px;margin:0 auto;padding:14px;}
.print-bar{position:sticky;top:0;background:#1a1a1a;padding:10px;display:flex;gap:8px;justify-content:center;margin:-12mm -10mm 14px;z-index:10;}
.print-bar button{padding:9px 20px;background:linear-gradient(135deg,#dc2626,#991b1b);color:#fff;border:none;border-radius:8px;font-weight:800;cursor:pointer;font-family:inherit;}
.brand-bar{display:flex;align-items:center;gap:14px;margin-bottom:14px;padding:12px 18px;background:linear-gradient(135deg,#fdf8eb,#faf3e0);border:1.5px solid #C9A84C;border-radius:12px;}
.brand-bar-logo{width:46px;height:46px;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#fef3c7,#C9A84C);border-radius:10px;overflow:hidden;}
.brand-bar-logo img{width:80%;height:80%;object-fit:contain;}
.brand-bar-title{font-size:15px;font-weight:900;color:#5A4520;}
.brand-bar-sub{font-size:10.5px;color:#7A6420;font-weight:700;}
.center-hdr{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;margin-bottom:14px;background:linear-gradient(135deg,#7f1d1d,#dc2626);color:#fff;border-radius:13px;}
.cls-logo{width:50px;height:50px;background:#fff;border-radius:11px;display:flex;align-items:center;justify-content:center;overflow:hidden;}
.cls-logo img{width:100%;height:100%;object-fit:contain;}
.cls-name{font-size:15px;font-weight:900;color:#fff;}
.cls-sub{font-size:10.5px;color:#fecaca;margin-top:2px;}
.hdr-title{font-size:14px;font-weight:900;color:#fff;text-align:left;}
.hdr-date{font-size:11px;color:#fecaca;margin-top:3px;}
.hero{background:linear-gradient(135deg,#dc2626,#991b1b);color:#fff;padding:18px 22px;border-radius:14px;margin-bottom:14px;display:flex;justify-content:space-between;align-items:center;box-shadow:0 12px 28px rgba(220,38,38,.3);}
.hero-l{font-size:14px;font-weight:800;margin-bottom:5px;}
.hero-sub{font-size:11px;opacity:.85;}
.hero-v{font-size:32px;font-weight:900;letter-spacing:-1px;}
.kpi-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:14px;}
.kpi{padding:13px;background:#fafafa;border:1px solid #e5e5e5;border-radius:11px;text-align:center;}
.kpi-l{font-size:10.5px;color:#666;font-weight:700;margin-bottom:5px;}
.kpi-v{font-size:17px;font-weight:900;color:#1a1a1a;}
.sec{margin-bottom:14px;page-break-inside:avoid;}
.sec-h{padding:9px 14px;background:linear-gradient(135deg,#7f1d1d,#dc2626);color:#fff;border-radius:10px 10px 0 0;font-size:13px;font-weight:900;}
.sec-b{background:#fff;border:1.5px solid #e5e5e5;border-top:none;border-radius:0 0 12px 12px;padding:0;overflow:hidden;}
table{width:100%;border-collapse:collapse;}
th{background:linear-gradient(135deg,#fafafa,#f5f5f5);color:#555;padding:9px 12px;text-align:right;font-size:11px;font-weight:800;border-bottom:2px solid #e5e5e5;}
td{padding:9px 12px;border-bottom:1px solid #f0f0f0;font-size:11.5px;font-weight:700;color:#333;vertical-align:top;}
tr:nth-child(even) td{background:#fafafa;}
.footer{margin-top:24px;padding:14px;text-align:center;border-top:1.5px solid #ddd;font-size:10px;color:#999;}
.footer .o{font-weight:900;color:#5A4520;}
@media print{.print-bar{display:none;}body{padding:0;}.sec{page-break-inside:avoid;}.hero,th,.center-hdr,.sec-h,.brand-bar{-webkit-print-color-adjust:exact;print-color-adjust:exact;}}

.permit-title{text-align:center;padding:24px;margin-bottom:20px;background:linear-gradient(135deg,#1a1a1a,#7f1d1d);color:#fff;border-radius:14px;}
.permit-title-l{font-size:14px;font-weight:700;opacity:.9;margin-bottom:6px;}
.permit-title-h{font-size:26px;font-weight:900;letter-spacing:-.5px;color:#fde68a;}
.permit-title-num{font-size:13px;color:#fcd34d;font-weight:800;margin-top:6px;}
.center-info{display:flex;justify-content:space-between;align-items:center;padding:14px 18px;margin-bottom:16px;background:#f5f5f5;border-radius:11px;}
.center-info-l{font-size:13px;font-weight:900;color:#1a1a1a;}
.center-info-r{font-size:11.5px;color:#666;text-align:left;}
.field-row{display:flex;align-items:center;padding:10px 0;border-bottom:1px dashed #eee;}
.field-row:last-child{border-bottom:none;}
.field-label{flex:0 0 40%;font-size:12.5px;color:#666;font-weight:800;}
.field-value{flex:1;font-size:13px;font-weight:900;color:#1a1a1a;}
.amount-hero{background:linear-gradient(135deg,#9F7E1C,#C9A84C);color:#fff;padding:24px;border-radius:14px;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center;box-shadow:0 12px 28px rgba(201,168,76,.35);}
.amount-hero-l{font-size:14px;font-weight:800;opacity:.95;margin-bottom:3px;}
.amount-hero-sub{font-size:11px;opacity:.85;}
.amount-hero-v{font-size:34px;font-weight:900;letter-spacing:-1px;}
.signatures{display:grid;grid-template-columns:1fr 1fr 1fr;gap:14px;margin-top:24px;}
.sig-box{padding:18px 14px;border:2px dashed #c4c4c4;border-radius:11px;text-align:center;}
.sig-box-l{font-size:11px;color:#666;font-weight:800;margin-bottom:30px;}
.sig-box-line{border-top:1.5px solid #1a1a1a;padding-top:5px;font-size:11px;color:#888;}
@media print{.print-bar{display:none;}body{padding:0;}.section,.amount-hero,.permit-title,.brand-bar{page-break-inside:avoid;-webkit-print-color-adjust:exact;print-color-adjust:exact;}}



*{box-sizing:border-box;margin:0;padding:0;}
@page{size:A4;margin:12mm 10mm;}
body{font-family:'Cairo','Tajawal','Segoe UI',Arial,sans-serif;color:#1a1a1a;background:#fff;line-height:1.6;}
.page{max-width:1100px;margin:0 auto;padding:18px;}

/* 🆕 REPORT BRAND BAR — Elegant system logo display at top */
.report-brand-bar{
  display:flex;align-items:center;gap:14px;
  margin-bottom:18px;
  padding:12px 18px;
  background:linear-gradient(135deg, #fdf8eb 0%, #faf3e0 50%, #fdf8eb 100%);
  border:1.5px solid #C9A84C;
  border-radius:14px;
  position:relative;
  overflow:hidden;
  box-shadow:0 4px 14px rgba(201,168,76,.18), inset 0 1px 0 rgba(255,255,255,.5);
}
.report-brand-bar::before{
  content:'';
  position:absolute;
  top:0;left:0;right:0;
  height:3px;
  background:linear-gradient(90deg, transparent, #C9A84C, #fbbf24, #C9A84C, transparent);
}
.report-brand-bar::after{
  content:'';
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 15% 50%, rgba(251,191,36,.08), transparent 40%),
    radial-gradient(circle at 85% 50%, rgba(201,168,76,.06), transparent 40%);
  pointer-events:none;
}
.rbb-logo{
  width:60px;height:60px;
  display:flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg, #fbbf24 0%, #C9A84C 50%, #9F7E1C 100%);
  border-radius:14px;
  color:#fff;
  flex-shrink:0;
  box-shadow:
    0 6px 16px rgba(201,168,76,.4),
    inset 0 1.5px 0 rgba(255,255,255,.3),
    inset 0 -1.5px 0 rgba(0,0,0,.15);
  position:relative;
  overflow:hidden;
}
.rbb-logo::before{
  content:'';
  position:absolute;
  top:0;left:0;right:0;height:50%;
  background:linear-gradient(180deg, rgba(255,255,255,.25), transparent);
  pointer-events:none;
}
.rbb-logo img{
  width:78%;
  height:78%;
  object-fit:contain;
  display:block;
  position:relative;
  z-index:1;
  filter:drop-shadow(0 2px 4px rgba(0,0,0,.15));
}
.rbb-logo svg{color:#fff;}
.rbb-text{flex:1;}
.rbb-system{
  font-family:'Cairo','Tajawal',sans-serif;
  font-size:18px;
  font-weight:900;
  color:#5A4520;
  letter-spacing:-.3px;
  background:linear-gradient(135deg, #5A4520 0%, #9F7E1C 50%, #5A4520 100%);
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
  margin-bottom:2px;
  line-height:1.2;
}
.rbb-tagline{
  font-size:10.5px;
  color:#9F7E1C;
  font-weight:700;
  letter-spacing:.2px;
  opacity:.85;
}
.rbb-decor{
  display:flex;align-items:center;gap:6px;
  padding:6px 10px;
  background:rgba(201,168,76,.12);
  border:1px solid rgba(201,168,76,.3);
  border-radius:10px;
  position:relative;
}
.rbb-decor::before, .rbb-decor::after{
  content:'';
  width:5px;height:5px;
  border-radius:50%;
  background:linear-gradient(135deg,#fbbf24,#C9A84C);
  box-shadow:0 1px 3px rgba(201,168,76,.4);
}
.rbb-decor::after{margin:0 2px;}
@media print{
  .report-brand-bar{-webkit-print-color-adjust:exact;print-color-adjust:exact;}
  .rbb-logo{-webkit-print-color-adjust:exact;print-color-adjust:exact;}
  .rbb-system{-webkit-print-color-adjust:exact;print-color-adjust:exact;}
}

/* HEADER */
/* 🆕 هيدر موحّد احترافي */
.rpt-header{margin-bottom:24px;border:1.5px solid #E8DCC0;border-radius:18px;overflow:hidden;box-shadow:0 4px 16px rgba(201,168,76,.1);}
.rpt-header-top{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 24px;background:linear-gradient(135deg,#fdfaf2 0%,#faf4e6 100%);}
.rpt-center{display:flex;align-items:center;gap:15px;}
.rpt-center-logo{width:64px;height:64px;border-radius:16px;display:flex;align-items:center;justify-content:center;font-size:32px;background:linear-gradient(135deg,#fbbf24,#C9A84C,#9F7E1C);color:#fff;flex-shrink:0;box-shadow:0 6px 16px rgba(201,168,76,.35),inset 0 1.5px 0 rgba(255,255,255,.3);overflow:hidden;}
.rpt-center-logo img{width:100%;height:100%;object-fit:cover;border-radius:16px;}
.rpt-center-name{font-size:20px;font-weight:900;color:#1a1a1a;letter-spacing:-.3px;}
.rpt-center-sub{font-size:12.5px;color:#7a6f55;font-weight:600;margin-top:3px;}
.rpt-center-vat{font-size:10.5px;color:#a39577;font-weight:600;margin-top:2px;}
.rpt-meta{text-align:left;flex-shrink:0;}
.rpt-title{font-size:16px;font-weight:900;color:#9F7E1C;}
.rpt-date{font-size:12px;color:#7a6f55;font-weight:700;margin-top:4px;}
.rpt-mode-badge{display:inline-block;margin-top:8px;padding:4px 12px;border-radius:20px;font-size:11px;font-weight:800;}
.rpt-mode-badge.is-op{background:rgba(245,158,11,.14);color:#b45309;border:1px solid rgba(245,158,11,.3);}
.rpt-mode-badge.is-full{background:rgba(16,185,129,.14);color:#047857;border:1px solid rgba(16,185,129,.3);}
.rpt-header-brand{padding:9px 24px;background:linear-gradient(90deg,#1a1505,#2a2008);color:#d4b86a;font-size:11px;font-weight:600;text-align:center;letter-spacing:.2px;}
.rpt-header-brand strong{color:#fbbf24;font-weight:800;}
.hdr{display:flex;align-items:center;justify-content:space-between;padding-bottom:18px;border-bottom:3px solid #C9A84C;margin-bottom:24px;}
.hdr-left{display:flex;align-items:center;gap:14px;}
.hdr-logo{width:60px;height:60px;background:linear-gradient(135deg,#C9A84C,#9F7E1C);border-radius:14px;display:flex;align-items:center;justify-content:center;font-size:30px;color:#fff;box-shadow:0 4px 12px rgba(201,168,76,.3);}
.hdr-name{font-size:22px;font-weight:900;color:#0a0800;line-height:1.2;}
.hdr-sub{font-size:11px;color:#666;margin-top:3px;}
.hdr-right{text-align:left;}
.hdr-title{font-size:14px;color:#9F7E1C;font-weight:800;letter-spacing:.5px;}
.hdr-date{font-size:12px;color:#444;margin-top:3px;font-weight:600;}
.hdr-date-tag{font-size:10px;color:#888;margin-top:2px;}

/* KPI cards */
.kpi-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin-bottom:22px;}
.kpi{background:linear-gradient(160deg,#ffffff,#f8f6f0);border:1px solid #ece5d4;border-right:4px solid;border-radius:14px;padding:14px 16px;box-shadow:0 2px 8px rgba(0,0,0,.04);}
.kpi.green{border-right-color:#22C55E;}
.kpi.purple{border-right-color:#a855f7;}
.kpi.gold{border-right-color:#C9A84C;}
.kpi.red{border-right-color:#EF4444;}
.kpi.blue{border-right-color:#3B82F6;}
.kpi-l{font-size:10px;color:#777;font-weight:700;margin-bottom:4px;}
.kpi-v{font-family:'IBM Plex Mono','Roboto Mono',monospace;font-size:22px;font-weight:900;color:#0a0800;line-height:1;letter-spacing:-1px;}
.kpi-u{font-size:10px;color:#888;margin-top:3px;}

/* Net profit hero */
.hero{background:linear-gradient(135deg,#9F7E1C,#C9A84C);color:#fff;border-radius:14px;padding:18px 24px;margin-bottom:20px;display:flex;align-items:center;justify-content:space-between;box-shadow:0 6px 20px rgba(201,168,76,.25);}
.hero-l{font-size:13px;font-weight:700;opacity:.9;letter-spacing:.5px;}
.hero-v{font-family:'IBM Plex Mono','Roboto Mono',monospace;font-size:32px;font-weight:900;letter-spacing:-1px;}
.hero-sub{font-size:11px;opacity:.85;margin-top:3px;}

/* Section headings */
.sec{margin-bottom:22px;break-inside:avoid;page-break-inside:avoid;}
/* 🆕 تقسيم ذكي: الأقسام الكبيرة تبدأ صفحة جديدة */
.sec-page{break-before:page;page-break-before:always;}
/* الجداول الطويلة: السماح بالتقسيم لكن مع تكرار الرأس */
.sec-long{break-inside:auto;page-break-inside:auto;}
.sec-long thead{display:table-header-group;}
.sec-long tr{break-inside:avoid;page-break-inside:avoid;}
/* منع يُتم الصفوف */
table{break-inside:auto;}
thead{display:table-header-group;}
tfoot{display:table-footer-group;}
tr{break-inside:avoid;page-break-inside:avoid;}
/* عناوين الأقسام لا تنفصل عن محتواها */
.sec-h{break-after:avoid;page-break-after:avoid;}
@media print{
  .print-bar{display:none !important;}
  .sec{margin-bottom:18px;}
}
.sec-h{display:flex;align-items:center;gap:8px;margin-bottom:10px;padding-bottom:8px;border-bottom:2px solid #e5e5e5;}
.sec-h-ico{width:28px;height:28px;background:#9F7E1C;color:#fff;border-radius:7px;display:flex;align-items:center;justify-content:center;font-size:14px;}
.sec-h-name{font-size:14px;font-weight:800;color:#0a0800;}

/* Tables */
table{width:100%;border-collapse:collapse;font-size:11px;}
th{background:linear-gradient(135deg,#0a0800,#2d2100);color:#C9A84C;padding:9px 8px;text-align:right;font-weight:700;font-size:11px;border:1px solid #1a1200;}
td{padding:8px;text-align:right;border:1px solid #e5e5e5;color:#222;}
tr:nth-child(even) td{background:#fafafa;}
td.amt{font-family:'IBM Plex Mono','Roboto Mono',monospace;font-weight:800;color:#9F7E1C;text-align:left;direction:ltr;}
.bd-paid{background:#dcfce7;color:#15803d;padding:2px 8px;border-radius:8px;font-size:10px;font-weight:800;}
.bd-unp{background:#fee2e2;color:#991b1b;padding:2px 8px;border-radius:8px;font-size:10px;font-weight:800;}
.bd-ref{background:#f3e8ff;color:#7c3aed;padding:2px 8px;border-radius:8px;font-size:10px;font-weight:800;}
.bd-partial{background:#fef3c7;color:#b45309;padding:2px 8px;border-radius:8px;font-size:10px;font-weight:800;}

/* Two-column tables */
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:14px;}

/* Footer */
.foot{margin-top:30px;padding-top:14px;border-top:2px solid #C9A84C;text-align:center;font-size:10px;color:#888;line-height:1.8;}
.foot strong{color:#9F7E1C;}

/* 🆕 Powered-by strip (admin branding badge) */
/* 🆕✨ LUXURY POWERED-BY STRIP — more prominent with logo showcase */
.powered-by-strip{
  display:flex;align-items:center;justify-content:center;gap:11px;
  padding:11px 18px;
  margin-bottom:14px;
  background:
    radial-gradient(ellipse at center, rgba(201,168,76,.08) 0%, rgba(201,168,76,.02) 70%),
    linear-gradient(135deg, rgba(159,126,28,.06) 0%, rgba(159,126,28,.01) 100%);
  border:1px solid rgba(159,126,28,.28);
  border-radius:12px;
  font-size:11px;
  color:#5A4520;
  font-weight:700;
  letter-spacing:.3px;
  position:relative;
  overflow:hidden;
}
/* Subtle gold shine line at top of strip */
.powered-by-strip::before{
  content:'';
  position:absolute;
  top:0;left:0;right:0;
  height:1.5px;
  background:linear-gradient(90deg, transparent 0%, rgba(201,168,76,.6) 50%, transparent 100%);
}
/* Inner decorative dot */
.powered-by-strip::after{
  content:'';
  position:absolute;
  width:4px;height:4px;
  background:linear-gradient(135deg,#fbbf24,#C9A84C);
  border-radius:50%;
  box-shadow:0 0 8px rgba(201,168,76,.5);
  right:14px;top:50%;transform:translateY(-50%);
}
.pbs-logo{
  display:inline-flex;align-items:center;justify-content:center;
  width:30px;height:30px;
  background:linear-gradient(135deg,#fef3c7,#fde68a 50%,#C9A84C);
  border-radius:8px;
  color:#5A4520;
  flex-shrink:0;
  overflow:hidden;
  box-shadow:
    0 4px 10px rgba(201,168,76,.35),
    inset 0 1px 0 rgba(255,255,255,.6),
    inset 0 -1px 0 rgba(0,0,0,.1);
  border:1px solid rgba(201,168,76,.45);
  position:relative;
}
.pbs-logo img{
  width:80%;height:80%;
  object-fit:contain;
  display:block;
  margin:auto;
  filter:drop-shadow(0 1px 2px rgba(0,0,0,.15));
}
.pbs-text{
  display:inline-flex;align-items:center;gap:7px;
  font-size:11.5px;
  font-weight:800;
  color:#7A6420;
}
.pbs-sep{
  opacity:.5;
  font-weight:900;
}
.pbs-owner{
  color:#5A4520;
  font-weight:900;
  letter-spacing:-.1px;
}

/* 🆕 Expense mode badge in header */
.exp-mode-badge{
  display:inline-flex;align-items:center;justify-content:center;
  margin-top:8px;
  padding:5px 11px;
  border-radius:9px;
  font-size:10.5px;
  font-weight:900;
  letter-spacing:.3px;
  border:1.5px solid;
}
.exp-mode-badge.mode-operational{
  background:linear-gradient(135deg,#FEF3C7,#FDE68A);
  color:#92400E;
  border-color:#F59E0B;
}
.exp-mode-badge.mode-full{
  background:linear-gradient(135deg,#DBEAFE,#BFDBFE);
  color:#1E40AF;
  border-color:#3B82F6;
}

/* 🆕 Expense mode explanation card */
.exp-mode-card{
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:14px;
  align-items:center;
  padding:14px 18px;
  margin-bottom:14px;
  border-radius:14px;
  border:1.5px solid;
  position:relative;
  overflow:hidden;
}
.exp-mode-card.is-op{
  background:linear-gradient(155deg, rgba(245,158,11,.08), rgba(245,158,11,.02));
  border-color:rgba(245,158,11,.35);
}
.exp-mode-card.is-full{
  background:linear-gradient(155deg, rgba(59,130,246,.08), rgba(59,130,246,.02));
  border-color:rgba(59,130,246,.35);
}
.exp-mode-card::before{
  content:'';
  position:absolute;
  top:0;left:0;right:0;
  height:2px;
  background:linear-gradient(90deg,transparent,currentColor,transparent);
  opacity:.4;
}
.exp-mode-card.is-op{color:#92400E;}
.exp-mode-card.is-full{color:#1E40AF;}
.emc-icon{
  font-size:30px;
  flex-shrink:0;
  line-height:1;
}
.emc-content{flex:1;min-width:0;}
.emc-title{
  font-size:13.5px;
  font-weight:800;
  margin-bottom:5px;
  letter-spacing:-.2px;
}
.emc-title strong{
  font-weight:900;
  padding:1px 6px;
  border-radius:5px;
}
.exp-mode-card.is-op .emc-title strong{background:rgba(245,158,11,.18);}
.exp-mode-card.is-full .emc-title strong{background:rgba(59,130,246,.18);}
.emc-desc{
  font-size:11px;
  color:#555;
  font-weight:600;
  line-height:1.65;
  letter-spacing:.1px;
}
.emc-desc strong{font-weight:900;color:#222;}
.emc-formula{
  flex-shrink:0;
  background:rgba(255,255,255,.55);
  border:1px solid currentColor;
  border-radius:10px;
  padding:8px 12px;
  text-align:center;
  min-width:140px;
}
.emc-formula-lbl{
  font-size:9px;
  font-weight:800;
  opacity:.65;
  letter-spacing:.6px;
  margin-bottom:3px;
}
.emc-formula-val{
  font-size:10.5px;
  font-weight:900;
  letter-spacing:-.1px;
}
@media(max-width:700px){
  .exp-mode-card{
    grid-template-columns:auto 1fr;
  }
  .emc-formula{
    grid-column:1/-1;
    margin-top:6px;
  }
}

/* Print button */
.print-bar{position:fixed;top:10px;left:10px;display:flex;gap:8px;z-index:9999;}
.print-bar button{padding:10px 18px;background:#9F7E1C;color:#fff;border:none;border-radius:8px;font-family:inherit;font-size:12px;font-weight:800;cursor:pointer;box-shadow:0 4px 12px rgba(0,0,0,.2);}
.print-bar button.close{background:#666;}

@media print{
  .print-bar{display:none;}
  body{padding:0;}
  .sec{page-break-inside:avoid;}
  .hero{background:linear-gradient(135deg,#9F7E1C,#C9A84C) !important;-webkit-print-color-adjust:exact;print-color-adjust:exact;}
  th{background:linear-gradient(135deg,#0a0800,#2d2100) !important;color:#C9A84C !important;-webkit-print-color-adjust:exact;print-color-adjust:exact;}
  .exp-mode-badge, .exp-mode-card, .powered-by-strip{
    -webkit-print-color-adjust:exact;
    print-color-adjust:exact;
  }
  .exp-mode-card{page-break-inside:avoid;}
}
.rpt-cover-page{width:100%;text-align:center;break-after:page;page-break-after:always;margin:0;padding:0;line-height:0;}
  .rpt-cover-img{max-width:100%;max-height:92vh;width:auto;height:auto;display:block;margin:0 auto;}
  .rpt-cover-frame{width:100%;height:92vh;border:none;display:block;}
  @media print{
    .rpt-cover-page{break-after:page;page-break-after:always;margin:0;padding:0;}
    .rpt-cover-img{max-height:96vh;}
  }
  ${window._pdfFmtCSS ? window._pdfFmtCSS() : ''}



/* qry-hero: منع التمدّد + ارتفاع حسب المحتوى */
.qry-hero{padding:13px 20px !important;margin:0 0 12px !important;flex:0 0 auto !important;align-self:stretch !important;min-height:0 !important;height:auto !important;max-height:108px !important;overflow:hidden !important;}
.qry-hero-content{min-height:0 !important;height:auto !important;}
/* insp-hero (عمليات الفحص): نفس ضبط الارتفاع */
.insp-hero{padding:13px 20px !important;margin:0 0 12px !important;flex:0 0 auto !important;align-self:stretch !important;min-height:0 !important;height:auto !important;max-height:108px !important;overflow:hidden !important;}
.insp-hero-content{min-height:0 !important;height:auto !important;}
.insp-hero-ico{width:48px !important;height:48px !important;}
.qry-hero-ico{width:48px !important;height:48px !important;}
@media(max-width:520px){.qry-hero{padding:11px 14px !important;}.qry-hero-ico{width:42px !important;height:42px !important;}}

/* ════════ 🆕 العملاء: عرض شبكة منظّم + عرض قائمة (مُحصّن) ════════ */
.cust-viewbar{display:flex;justify-content:flex-end;gap:5px;margin:8px 2px 2px;}
.cust-vtb{width:34px;height:32px;border-radius:9px;border:1px solid var(--bdr,rgba(255,255,255,.08));background:rgba(255,255,255,.04);color:var(--t3,#94a3b8);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .18s;}
.cust-vtb:hover{color:var(--t1,#f4f0e6);background:rgba(255,255,255,.08);}
.cust-vtb.on{background:rgba(96,165,250,.18);border-color:rgba(96,165,250,.42);color:#60A5FA;}

/* الحاويات: شبكة فقط لغير القائمة، وعمود مرن للقائمة */
#cust-list .cust-list:not(.as-list){display:grid !important;grid-template-columns:repeat(auto-fill,minmax(290px,1fr)) !important;gap:14px !important;align-items:start;padding:8px 2px 4px;}
#cust-list .cust-list.as-list{display:flex !important;flex-direction:column !important;gap:9px !important;padding:8px 2px 4px;}

/* هيكل البطاقة */
#cust-list .cust-card{display:flex !important;flex-direction:column !important;gap:0 !important;padding:0 !important;overflow:hidden;}
#cust-list .cust-card .cc-top{display:flex;align-items:center;gap:12px;padding:16px 16px 13px;}
#cust-list .cust-card .cust-avatar{width:54px !important;height:54px !important;border-radius:15px !important;font-size:22px;flex-shrink:0;overflow:hidden;display:flex;align-items:center;justify-content:center;}
#cust-list .cust-card .cust-avatar img{width:100%;height:100%;object-fit:cover;}
#cust-list .cust-card .cc-id{min-width:0;flex:1;}
#cust-list .cust-card .cust-name{font-size:15.5px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
#cust-list .cust-card .cust-badges-row{margin-top:6px;display:flex;flex-wrap:wrap;gap:5px;}
#cust-list .cust-card .cc-contact{display:flex;flex-direction:column;gap:7px;padding:12px 16px;border-top:1px solid var(--bdr,rgba(255,255,255,.06));}
#cust-list .cust-card .cc-line{display:flex;align-items:center;gap:7px;font-size:12.5px;font-weight:600;color:var(--t2,#c8bfa8);min-width:0;}
#cust-list .cust-card .cc-chips{display:flex;flex-wrap:wrap;gap:6px;}
#cust-list .cust-card .cc-chip{display:inline-flex;align-items:center;gap:5px;font-size:11.5px;font-weight:700;color:var(--t2,#c8bfa8);background:rgba(255,255,255,.04);border:1px solid var(--bdr,rgba(255,255,255,.06));border-radius:8px;padding:4px 9px;}

/* شريط الإحصاءات (صفّ بطاقات) */
#cust-list .cust-card .cust-ribbon{display:flex !important;flex-direction:row !important;flex-wrap:nowrap !important;width:auto !important;gap:8px !important;padding:12px 16px !important;border-top:1px solid var(--bdr,rgba(255,255,255,.06)) !important;margin:0 !important;}
#cust-list .cust-card .cust-stat{flex:1 1 0 !important;min-width:0 !important;flex-direction:column !important;align-items:center !important;gap:3px !important;padding:9px 6px !important;background:rgba(255,255,255,.03) !important;border:1px solid var(--bdr,rgba(255,255,255,.05)) !important;border-radius:11px !important;}
#cust-list .cust-card .cust-stat-lbl{font-size:9.5px;color:var(--t3,#94a3b8);font-weight:700;}
#cust-list .cust-card .cust-stat-val{font-size:14px;font-weight:800;color:var(--t1,#f4f0e6);}

/* الإجراءات (صفّ أفقي دائمًا) */
#cust-list .cust-card .cust-actions{display:flex !important;flex-direction:row !important;flex-wrap:nowrap !important;align-items:center !important;gap:7px !important;width:auto !important;padding:12px 16px !important;border-top:1px solid var(--bdr,rgba(255,255,255,.06)) !important;margin:0 !important;}
#cust-list .cust-card .cust-act{flex:1 1 0 !important;width:auto !important;height:34px !important;}
#cust-list .cust-card .cust-debt-strip{margin:0 !important;border-top:1px solid var(--bdr,rgba(255,255,255,.06));border-radius:0;}

/* ===== عرض القائمة (صفوف نظيفة مرتّبة) ===== */
#cust-list .cust-list.as-list .cust-card{display:grid !important;grid-template-columns:220px minmax(0,1fr) minmax(0,1.5fr) 196px !important;align-items:center !important;gap:14px !important;padding:10px 16px !important;min-height:66px;}
#cust-list .cust-list.as-list .cust-card .cc-top{padding:0 !important;gap:10px;min-width:0;}
#cust-list .cust-list.as-list .cust-card .cust-avatar{width:42px !important;height:42px !important;border-radius:11px !important;font-size:16px;}
#cust-list .cust-list.as-list .cust-card .cust-name{font-size:13.5px;}
#cust-list .cust-list.as-list .cust-card .cust-badges-row{margin-top:3px;}
#cust-list .cust-list.as-list .cust-card .cc-contact{border:0 !important;padding:0 !important;flex-direction:column !important;gap:4px !important;align-items:flex-start;min-width:0;}
#cust-list .cust-list.as-list .cust-card .cc-line{font-size:12px;}
#cust-list .cust-list.as-list .cust-card .cc-chip{padding:3px 8px;font-size:10.5px;}
#cust-list .cust-list.as-list .cust-card .cust-ribbon{border:0 !important;padding:0 !important;gap:7px !important;flex-wrap:nowrap !important;overflow:hidden;justify-content:flex-start;}
#cust-list .cust-list.as-list .cust-card .cust-stat{flex:0 0 auto !important;flex-direction:row !important;align-items:center !important;gap:5px !important;padding:5px 10px !important;background:rgba(255,255,255,.04) !important;border:1px solid var(--bdr,rgba(255,255,255,.06)) !important;border-radius:9px !important;}
#cust-list .cust-list.as-list .cust-card .cust-stat-lbl{display:inline !important;font-size:9.5px;color:var(--t3,#94a3b8);font-weight:700;}
#cust-list .cust-list.as-list .cust-card .cust-stat-val{font-size:12.5px;}
#cust-list .cust-list.as-list .cust-card .cust-actions{border:0 !important;padding:0 !important;gap:7px !important;width:auto !important;justify-content:flex-start;}
#cust-list .cust-list.as-list .cust-card .cust-act{flex:0 0 auto !important;width:32px !important;height:32px !important;}
#cust-list .cust-list.as-list .cust-card .cust-debt-strip{grid-column:1 / -1;border:0 !important;margin-top:6px !important;}
@media(max-width:860px){
  #cust-list .cust-list.as-list .cust-card{grid-template-columns:auto 1fr !important;gap:9px 12px !important;}
  #cust-list .cust-list.as-list .cust-card .cc-contact{grid-column:1 / -1;flex-direction:row !important;flex-wrap:wrap;}
  #cust-list .cust-list.as-list .cust-card .cust-ribbon{grid-column:1 / -1;}
  #cust-list .cust-list.as-list .cust-card .cust-actions{grid-column:1 / -1;justify-content:flex-start;}
}


/* ════════ 🆕 قائمة العملاء — جدول احترافي متحاذٍ ════════ */
#cust-list .cl-table{display:flex;flex-direction:column;border:1px solid var(--bdr,rgba(255,255,255,.08));border-radius:14px;overflow:hidden;background:rgba(255,255,255,.015);margin-top:6px;}
#cust-list .cl-head,
#cust-list .cl-row{display:grid;grid-template-columns:minmax(180px,1.5fr) minmax(140px,1fr) minmax(120px,1fr) 78px 120px 196px;align-items:center;gap:12px;padding:11px 16px;}
#cust-list .cl-head{background:rgba(255,255,255,.045);border-bottom:1px solid var(--bdr,rgba(255,255,255,.08));font-size:11px;font-weight:800;color:var(--t3,#94a3b8);}
#cust-list .cl-row{border-bottom:1px solid rgba(255,255,255,.05);transition:background .16s;animation:bkCardIn .25s ease both;}
#cust-list .cl-row:hover{background:rgba(255,255,255,.045);}
#cust-list .cl-row:last-child{border-bottom:0;}
#cust-list .cl-c{min-width:0;}
#cust-list .cl-cust{display:flex;align-items:center;gap:11px;}
#cust-list .cl-cust .cust-avatar{width:40px !important;height:40px !important;border-radius:11px !important;font-size:15px;flex-shrink:0;overflow:hidden;display:flex;align-items:center;justify-content:center;}
#cust-list .cl-cust .cust-avatar img{width:100%;height:100%;object-fit:cover;}
#cust-list .cl-id{min-width:0;}
#cust-list .cl-name{font-size:13.5px;font-weight:800;color:var(--t1,#f4f0e6);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
#cust-list .cl-badges{display:flex;gap:5px;margin-top:3px;flex-wrap:wrap;}
#cust-list .cl-contact .cl-phone{font-family:'IBM Plex Mono',monospace;font-size:12px;color:var(--t2,#c8bfa8);}
#cust-list .cl-vehicle{font-size:12px;color:var(--t2,#c8bfa8);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
#cust-list .cl-muted{color:var(--t4,#64748b);}
#cust-list .cl-num{display:flex;flex-direction:column;gap:1px;align-items:flex-start;}
#cust-list .cl-num-v{font-size:14px;font-weight:800;color:var(--t1,#f4f0e6);}
#cust-list .cl-num-v.cl-money{color:var(--gold,#c9a84c);}
#cust-list .cl-num-l{font-size:9.5px;color:var(--t3,#94a3b8);font-weight:700;}
#cust-list .cl-acts{display:flex;gap:6px;justify-content:flex-start;}
#cust-list .cl-acts .cust-act{width:32px !important;height:32px !important;flex:0 0 auto !important;}
#cust-list .cl-debt{grid-column:1 / -1;margin-top:8px;}
@media(max-width:900px){
  #cust-list .cl-head{display:none;}
  #cust-list .cl-row{grid-template-columns:1fr 1fr;gap:9px 12px;padding:13px 14px;}
  #cust-list .cl-cust{grid-column:1 / -1;}
  #cust-list .cl-acts{grid-column:1 / -1;justify-content:flex-start;}
}
@media(max-width:480px){
  #cust-list .cl-row{grid-template-columns:1fr;}
}

