/* =====================================================================
   ANSAB CMMS — نظام التصميم v2
   الهوية: كحلي أنساب + أزرق الشعار · خط Tajawal · RTL/LTR بخصائص منطقية
   ===================================================================== */
:root{
  --brand:#1F4E79; --brand-600:#173D60; --brand-50:#EAF1F8; --accent:#2E8BC9;
  --side-bg:#0F2A44; --side-bg-2:#12375A; --side-text:rgba(255,255,255,.72); --side-muted:rgba(255,255,255,.42);
  --bg:#F3F5F9; --surface:#FFFFFF; --line:#E4E9F0; --ink:#172433; --muted:#667085;
  --radius:12px; --radius-sm:8px; --shadow:0 1px 2px rgba(16,24,40,.05),0 1px 3px rgba(16,24,40,.06);
  --shadow-lg:0 8px 24px rgba(16,24,40,.10);
  --sb-w:264px; --sb-min:76px; --tb-h:62px;
  --bs-body-font-family:"Tajawal",Tahoma,"Segoe UI",Arial,sans-serif;
  --bs-primary:#1F4E79; --bs-primary-rgb:31,78,121; --bs-link-color:#1F4E79; --bs-link-hover-color:#173D60; --bs-link-color-rgb:31,78,121;
  --bs-border-radius:.55rem; --bs-body-color:#172433;
}
body{font-family:var(--bs-body-font-family);color:var(--ink);background:var(--bg);font-size:.95rem}
a{text-decoration:none}
.skip-link{position:absolute;inset-inline-start:-999px;top:8px;z-index:2000;background:#fff;padding:.5rem 1rem;border-radius:8px}
.skip-link:focus{inset-inline-start:8px}
:focus-visible{outline:3px solid rgba(46,139,201,.45);outline-offset:2px}

/* ---------- هيكل التطبيق ---------- */
.app-sidebar{position:fixed;inset-block:0;inset-inline-start:0;width:var(--sb-w);z-index:1040;display:flex;flex-direction:column;
  background:linear-gradient(180deg,var(--side-bg) 0%,var(--side-bg-2) 100%);color:var(--side-text);transition:width .2s ease,transform .25s ease}
.app-main{margin-inline-start:var(--sb-w);min-height:100vh;display:flex;flex-direction:column;transition:margin .2s ease}
.app-content{padding:1.5rem;flex:1;max-width:1480px;width:100%;margin-inline:auto}
.app-content:focus{outline:none}

/* العلامة */
.sb-brand{display:flex;align-items:center;gap:.75rem;padding:1rem 1rem .9rem;border-bottom:1px solid rgba(255,255,255,.08)}
.sb-logo{flex:none;background:#fff;border-radius:10px;padding:4px 6px;display:flex}
.sb-logo img{height:30px}
.sb-title{display:flex;flex-direction:column;line-height:1.25;min-width:0}
.sb-title span{color:#fff;font-weight:700;font-size:1rem;white-space:nowrap}
.sb-title small{color:var(--side-muted);font-size:.72rem;white-space:nowrap}

/* القائمة */
.sb-nav{flex:1;overflow-y:auto;padding:.5rem .65rem 1rem;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.18) transparent}
.sb-group{font-size:.7rem;font-weight:700;letter-spacing:.02em;color:var(--side-muted);padding:1rem .75rem .35rem;white-space:nowrap}
.sb-list{list-style:none;margin:0;padding:0}
.sb-link{position:relative;display:flex;align-items:center;gap:.75rem;padding:.55rem .75rem;margin-block:1px;border-radius:9px;color:var(--side-text);font-weight:500;white-space:nowrap;transition:background .15s,color .15s}
.sb-link i{font-size:1.1rem;width:1.35rem;text-align:center;flex:none;opacity:.9}
.sb-link:hover{background:rgba(255,255,255,.07);color:#fff}
.sb-link.active{background:rgba(46,139,201,.22);color:#fff}
.sb-link.active::before{content:"";position:absolute;inset-inline-start:-.65rem;top:20%;bottom:20%;width:4px;border-radius:0 4px 4px 0;background:var(--accent)}
[dir=rtl] .sb-link.active::before{border-radius:4px 0 0 4px}
.sb-text{overflow:hidden;text-overflow:ellipsis}
.sb-badge{margin-inline-start:auto;font-size:.7rem;font-weight:700;min-width:1.4rem;padding:.12rem .4rem;border-radius:20px;text-align:center;color:#fff}
.sb-badge.bg-warning{color:#1b1b1b}
.sb-foot{padding:.75rem 1rem;font-size:.7rem;color:var(--side-muted);border-top:1px solid rgba(255,255,255,.08);white-space:nowrap}

/* الشريط المصغّر (أيقونات فقط) — سطح المكتب */
@media (min-width:992px){
  .sb-min .app-sidebar{width:var(--sb-min)}
  .sb-min .app-main{margin-inline-start:var(--sb-min)}
  .sb-min .sb-title,.sb-min .sb-text,.sb-min .sb-group,.sb-min .sb-foot{display:none}
  .sb-min .sb-brand{justify-content:center;padding-inline:.5rem}
  .sb-min .sb-link{justify-content:center;padding:.65rem}
  .sb-min .sb-badge{position:absolute;top:2px;inset-inline-end:4px;min-width:1.1rem;font-size:.6rem;padding:.05rem .3rem}
  .sb-min .sb-nav{padding-top:1rem}
}
/* الجوال: قائمة منزلقة */
.sb-backdrop{display:none}
@media (max-width:991.98px){
  .app-sidebar{transform:translateX(-105%);box-shadow:var(--shadow-lg)}
  [dir=rtl] .app-sidebar{transform:translateX(105%)}
  .sb-open .app-sidebar{transform:none}
  .sb-open .sb-backdrop{display:block;position:fixed;inset:0;background:rgba(15,42,68,.45);z-index:1035}
  .app-main{margin-inline-start:0}
  .app-content{padding:1rem .75rem}
}

/* ---------- الشريط العلوي ---------- */
.app-topbar{position:sticky;top:0;z-index:1030;height:var(--tb-h);display:flex;align-items:center;gap:.75rem;padding:0 1.25rem;
  background:rgba(255,255,255,.92);backdrop-filter:saturate(180%) blur(8px);border-bottom:1px solid var(--line)}
.tb-title{font-weight:700;font-size:1.05rem;color:var(--ink);min-width:0}
.tb-search{position:relative;margin-inline-start:auto;width:min(320px,32vw)}
.tb-search i{position:absolute;inset-inline-start:.8rem;top:50%;transform:translateY(-50%);color:var(--muted)}
.tb-search .form-control{padding-inline-start:2.2rem;border-radius:20px;background:#F5F7FA;border-color:transparent;height:38px}
.tb-search .form-control:focus{background:#fff;border-color:var(--accent)}
.tb-actions{display:flex;align-items:center;gap:.35rem;margin-inline-start:auto}
.tb-search + .tb-actions{margin-inline-start:.5rem}
.btn-icon{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:10px;color:var(--ink);border:0;background:transparent;font-size:1.2rem}
.btn-icon:hover{background:#EEF2F7}
.tb-dot{position:absolute;top:3px;inset-inline-end:2px;background:#E5484D;color:#fff;font-size:.62rem;font-weight:700;border-radius:10px;padding:.05rem .32rem;border:2px solid #fff}
.tb-notif{width:320px;max-width:90vw;border-radius:12px;overflow:hidden;border:1px solid var(--line);box-shadow:var(--shadow-lg)}
.tb-user{display:flex;align-items:center;gap:.55rem;border:0;padding:.25rem .5rem;border-radius:10px}
.tb-user:hover{background:#EEF2F7}
.avatar{width:36px;height:36px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:linear-gradient(135deg,var(--brand),var(--accent));color:#fff;font-weight:700;flex:none}
.tb-user small{font-size:.72rem}
.dropdown-menu{border-radius:12px;border-color:var(--line);box-shadow:var(--shadow-lg);padding:.35rem}
.dropdown-item{border-radius:8px;padding:.45rem .75rem}

/* ---------- المكوّنات ---------- */
.card{border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
.card-header{background:transparent;border-bottom:1px solid var(--line);font-weight:700;padding:.85rem 1.1rem}
.card-footer{background:#FAFBFD;border-top:1px solid var(--line)}
.card > .table-responsive:first-child .table,.card > .table-responsive:last-child .table{margin-bottom:0}
h1.h4,h1.h5{font-weight:800;color:var(--ink)}

.btn{font-weight:500;border-radius:.55rem}
.btn-brand{background:var(--brand);border-color:var(--brand);color:#fff}
.btn-brand:hover,.btn-brand:focus{background:var(--brand-600);border-color:var(--brand-600);color:#fff}
.btn-outline-brand{border-color:var(--brand);color:var(--brand)}
.btn-outline-brand:hover{background:var(--brand);color:#fff}
.btn-lg{border-radius:.7rem}
.bg-brand{background:var(--brand)!important}
.text-brand{color:var(--brand)!important}
.border-brand{border-color:var(--brand)!important;border-width:2px!important}

.form-control,.form-select{border-color:#D5DCE5;border-radius:.55rem}
.form-control:focus,.form-select:focus{border-color:var(--accent);box-shadow:0 0 0 .2rem rgba(46,139,201,.15)}
.form-label{font-weight:500;color:#344054;margin-bottom:.3rem}
.form-label.req::after{content:" *";color:#D92D20}
.form-check-input:checked{background-color:var(--brand);border-color:var(--brand)}

/* الجداول */
.table{--bs-table-hover-bg:#F6F9FC;margin-bottom:0}
.table > thead th{background:#F8FAFC;color:#475467;font-weight:700;font-size:.8rem;border-bottom:1px solid var(--line);white-space:nowrap;padding-block:.7rem}
.table > tbody td{border-color:#EEF1F5;padding-block:.65rem}
.table-sm > tbody td{padding-block:.45rem}
.clickable{cursor:pointer}

/* الشارات */
.badge{font-weight:600;border-radius:6px;padding:.35em .6em}
.prio{display:inline-block;font-size:.72rem;padding:.2rem .5rem;border-radius:6px;font-weight:700}
.prio-emergency{background:#FEE4E2;color:#B42318}
.prio-urgent{background:#FEF0C7;color:#93370D}
.prio-normal{background:#F2F4F7;color:#475467}

/* بطاقات المؤشرات */
.stat{display:block;color:inherit;border:1px solid var(--line);position:relative;overflow:hidden;transition:box-shadow .15s,transform .15s}
a.stat:hover{box-shadow:var(--shadow-lg);transform:translateY(-1px);color:inherit}
.stat .card-body{display:flex;flex-direction:column;gap:.15rem}
.stat-num{font-size:1.9rem;font-weight:800;line-height:1.1}
.stat-label{color:var(--muted);font-size:.85rem}
.stat-ico{position:absolute;inset-inline-end:1rem;top:1rem;width:42px;height:42px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:1.25rem}
.ico-blue{background:#EAF1F8;color:var(--brand)} .ico-red{background:#FEE4E2;color:#B42318}
.ico-amber{background:#FEF0C7;color:#B54708} .ico-green{background:#DCFAE6;color:#067647}

/* نماذج المستندات */
.form-sheet .sec-h{display:flex;align-items:center;gap:.5rem;color:var(--brand);font-weight:800;font-size:.95rem;margin:1.6rem 0 .9rem;padding-bottom:.5rem;border-bottom:1px solid var(--line)}
.form-sheet .sec-h::before{content:"";width:4px;height:1.1rem;border-radius:4px;background:var(--accent);flex:none}
.form-sheet .sec-h:first-child{margin-top:0}
.form-sheet .sec-h .btn-light{margin-inline-start:auto}
.kv dt{font-weight:500;color:var(--muted)}
.kv dd{margin-bottom:.55rem}
.pre-wrap{white-space:pre-wrap}

/* التنبيهات */
.alert{border-radius:10px;border-width:1px}
.alert-success{background:#ECFDF3;border-color:#ABEFC6;color:#085D3A}
.alert-danger{background:#FEF3F2;border-color:#FECDCA;color:#912018}
.alert-warning{background:#FFFAEB;border-color:#FEDF89;color:#93370D}
.alert-info{background:#EFF8FF;border-color:#B2DDFF;color:#194185}

/* التبويبات */
.nav-tabs{border-bottom-color:var(--line)}
.nav-tabs .nav-link{color:var(--muted);font-weight:600;border:0;border-bottom:2px solid transparent;padding:.65rem 1rem}
.nav-tabs .nav-link.active{color:var(--brand);border-bottom-color:var(--brand);background:transparent}
.tab-content.card{border-top-left-radius:0;border-top-right-radius:0}

/* ---------- الدخول ---------- */
.bg-login{min-height:100vh;background:radial-gradient(1200px 600px at 110% -10%,rgba(46,139,201,.35),transparent 60%),linear-gradient(160deg,#0F2A44 0%,#1F4E79 100%)}
.login-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:1rem}
.login-card{width:100%;max-width:410px;border:0;border-radius:18px;box-shadow:0 20px 50px rgba(0,0,0,.25)}
.login-logo{height:62px}

/* صفحات الخطأ */
.err-page{min-height:100vh;display:flex;align-items:center;justify-content:center;background:var(--bg);padding:1rem}
.err-card{text-align:center;background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);padding:2.5rem 2rem;max-width:460px;width:100%}
.err-icon{width:64px;height:64px;margin:0 auto 1rem;border-radius:18px;background:var(--brand-50);color:var(--brand);display:flex;align-items:center;justify-content:center;font-size:1.8rem}
.err-code{font-size:2.6rem;font-weight:800;color:var(--ink);line-height:1}
.err-msg{color:var(--muted);margin:.75rem 0 1.5rem}

/* ---------- الفحص اليومي (جوال) ---------- */
.pick-card{transition:box-shadow .15s}
.pick-card:hover{box-shadow:var(--shadow-lg)}
.check-form .check-item{border-width:2px}
.check-form .btn-group .btn{font-weight:600}

/* ---------- الطباعة (مطابقة للنموذج الورقي) ---------- */
.print-body{background:#fff}
.print-sheet{max-width:800px;margin:0 auto;padding:10px 20px;font-size:13px}
.print-head{display:grid;grid-template-columns:140px 1fr 200px;align-items:center;border-bottom:3px solid var(--brand);padding-bottom:8px}
.print-head img{width:130px}
.print-title{font-size:22px;font-weight:700;color:var(--brand)}
.print-sub{font-size:15px;color:#444;direction:ltr}
.print-meta{font-size:12px;text-align:end}
.print-sec{background:var(--brand-50);border-inline-start:4px solid var(--brand);padding:3px 8px;font-weight:700;margin:12px 0 6px;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.ptable{width:100%;border-collapse:collapse}
.ptable th,.ptable td{border:1px solid #999;padding:4px 6px;text-align:center}
.ptable th{background:#f2f2f2;font-size:12px}
.pchecks{display:flex;flex-wrap:wrap;gap:6px 18px}
.pchecks-col{flex-direction:column;gap:3px}
.pbox{display:inline-block;width:14px;height:14px;border:1px solid #333;text-align:center;line-height:12px;font-size:12px;vertical-align:middle}
.plines{min-height:70px;border-bottom:1px dotted #777;padding:4px 0}
.psigns{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:16px;margin-top:24px;text-align:center}
.psign-line{border-bottom:1px dotted #333;min-height:34px;margin-top:6px;font-size:12px;padding-top:14px}
@media print{ .no-print{display:none!important} .print-sheet{padding:6mm 4mm} @page{size:A4;margin:14mm 12mm} }

@media (prefers-reduced-motion:reduce){ *{transition:none!important} }
.tb-crumb{color:var(--muted);font-weight:500}
.tb-sep{font-size:.7rem;color:#98A2B3;margin-inline:.45rem}
.tb-lang{width:auto;padding:0 .6rem;gap:.3rem;font-size:1rem}
.tb-lang span{font-size:.75rem;font-weight:700}
.table td b,.table td a b{white-space:nowrap}
@media (max-width:575.98px){ .tb-crumb,.tb-sep{display:none} .app-topbar{padding:0 .6rem;gap:.35rem} }

/* =================== دورة البلاغ =================== */
.rs{display:inline-flex;align-items:center;gap:.3rem;font-size:.75rem;font-weight:700;padding:.25rem .6rem;border-radius:20px;white-space:nowrap}
.rs::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor}
.rs-new{background:#FEE4E2;color:#B42318}.rs-assigned{background:#E0EAFF;color:#3538CD}.rs-accepted{background:#E0F2FE;color:#026AA2}
.rs-progress{background:#EAF1F8;color:var(--brand)}.rs-parts{background:#FEF0C7;color:#B54708}.rs-escalated{background:#F4EBFF;color:#6941C6}
.rs-resolved{background:#D1FADF;color:#067647}.rs-closed{background:#F2F4F7;color:#344054}.rs-cancelled{background:#F2F4F7;color:#98A2B3}
.loc{display:inline-flex;align-items:center;gap:.3rem;font-size:.75rem;font-weight:600;padding:.2rem .55rem;border-radius:6px;white-space:nowrap}
.loc-field{background:#ECFDF3;color:#067647}.loc-central{background:#F4EBFF;color:#6941C6}
.row-emergency > td:first-child{box-shadow:inset -4px 0 0 #D92D20}
[dir=ltr] .row-emergency > td:first-child{box-shadow:inset 4px 0 0 #D92D20}
.stage-chips{display:flex;flex-wrap:wrap;gap:.4rem}
.stage-chip{display:inline-flex;align-items:center;gap:.4rem;padding:.35rem .8rem;border-radius:20px;background:#fff;border:1px solid var(--line);color:var(--ink);font-size:.85rem;font-weight:500}
.stage-chip b{background:#F2F4F7;border-radius:10px;padding:0 .45rem;font-size:.78rem}
.stage-chip.on{background:var(--brand);border-color:var(--brand);color:#fff}.stage-chip.on b{background:rgba(255,255,255,.2)}
.stage-chip:hover:not(.on){border-color:var(--accent)}
.chip-new b{background:#FEE4E2;color:#B42318}.chip-escalated b{background:#F4EBFF;color:#6941C6}.chip-waiting_parts b{background:#FEF0C7;color:#B54708}

/* بطاقات الاختيار (مكان الإصلاح) */
.choice-card{display:flex;gap:.9rem;align-items:flex-start;padding:1rem;border:2px solid var(--line);border-radius:12px;cursor:pointer;background:#fff;height:100%;transition:border-color .15s,background .15s}
.choice-card i{font-size:1.6rem;color:var(--brand)}
.choice-card span{display:flex;flex-direction:column;gap:.2rem}.choice-card small{color:var(--muted)}
.btn-check:checked + .choice-card{border-color:var(--brand);background:var(--brand-50)}
.btn-check:focus-visible + .choice-card{outline:3px solid rgba(46,139,201,.45)}

/* مراحل البلاغ */
.stepper{display:flex;list-style:none;margin:0;padding:0;counter-reset:s}
.stepper li{flex:1;position:relative;text-align:center;display:flex;flex-direction:column;align-items:center;gap:.25rem;min-width:0}
.stepper li::before{content:"";position:absolute;top:15px;inset-inline-start:-50%;width:100%;height:3px;background:#E4E9F0;z-index:0}
.stepper li:first-child::before{display:none}
.stepper li.done::before,.stepper li.current::before{background:var(--accent)}
.stepper .dot{position:relative;z-index:1;width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#fff;border:2px solid #D0D5DD;color:#98A2B3;font-weight:700;font-size:.85rem}
.stepper .done .dot{background:var(--accent);border-color:var(--accent);color:#fff}
.stepper .current .dot{border-color:var(--brand);color:var(--brand);box-shadow:0 0 0 5px rgba(31,78,121,.12)}
.stepper .lbl{font-size:.8rem;font-weight:700;color:#475467}.stepper .current .lbl{color:var(--brand)}
.stepper .tm{font-size:.7rem;color:var(--muted);direction:ltr}
@media (max-width:575.98px){ .stepper .lbl{font-size:.68rem} .stepper .tm{display:none} }

.info-block{display:flex;gap:.75rem}
.info-block > i{font-size:1.2rem;color:var(--accent);width:36px;height:36px;border-radius:10px;background:var(--brand-50);display:flex;align-items:center;justify-content:center;flex:none}
.info-block .lbl{font-size:.75rem;color:var(--muted)}.info-block .val{font-weight:600}
.quote-block{background:#F8FAFC;border-inline-start:4px solid #98A2B3;border-radius:8px;padding:.75rem 1rem}
.quote-block.tech{border-inline-start-color:var(--accent);background:var(--brand-50)}
.quote-block .lbl{font-size:.78rem;font-weight:700;color:#475467;margin-bottom:.3rem}
.kpi-row{display:flex;justify-content:space-between;padding:.4rem 0;border-bottom:1px dashed var(--line)}.kpi-row:last-child{border-bottom:0}
.ps{font-size:.72rem;font-weight:700;padding:.2rem .55rem;border-radius:6px}
.ps-not_assessed{background:#F2F4F7;color:#667085}.ps-none{background:#ECFDF3;color:#067647}.ps-available{background:#E0EAFF;color:#3538CD}
.ps-unavailable{background:#FEE4E2;color:#B42318}.ps-issued{background:#D1FADF;color:#067647}
.thumb{display:flex;align-items:center;justify-content:center;aspect-ratio:1;border-radius:10px;overflow:hidden;background:#F2F4F7;font-size:2rem;color:#B42318}
.thumb img{width:100%;height:100%;object-fit:cover}
.action-card{border-color:var(--brand);border-width:2px}
.action-card .card-header{background:var(--brand-50);color:var(--brand)}

/* السجل الزمني */
.timeline{list-style:none;margin:0;padding:0;position:relative}
.timeline::before{content:"";position:absolute;top:6px;bottom:6px;inset-inline-start:15px;width:2px;background:var(--line)}
.timeline li{position:relative;display:flex;gap:.8rem;padding-bottom:1rem}
.tl-ico{position:relative;z-index:1;width:32px;height:32px;flex:none;border-radius:50%;background:#fff;border:2px solid var(--line);display:flex;align-items:center;justify-content:center;color:var(--brand)}
.tl-body{flex:1;min-width:0;padding-top:.2rem}
.tl-time{font-size:.78rem;color:var(--muted);direction:ltr}
.tl-created .tl-ico{border-color:#FDA29B;color:#B42318}.tl-escalated .tl-ico{border-color:#D6BBFB;color:#6941C6}
.tl-resolved .tl-ico,.tl-closed .tl-ico{border-color:#75E0A7;color:#067647}.tl-waiting_parts .tl-ico{border-color:#FEC84B;color:#B54708}
.tl-cancelled .tl-ico{color:#98A2B3}

/* =================== شاشة المتابعة (عرض الإدارة) =================== */
body.board{background:#0B1E33;color:#E6EDF5;min-height:100vh;display:flex;flex-direction:column;overflow-x:hidden}
.bd-head{display:flex;align-items:center;gap:1.25rem;padding:1rem 1.5rem;background:linear-gradient(90deg,#0F2A44,#14395E);border-bottom:1px solid rgba(255,255,255,.08);flex-wrap:wrap}
.bd-brand{display:flex;align-items:center;gap:.9rem}
.bd-brand img{height:44px;background:#fff;border-radius:10px;padding:4px 6px}
.bd-title{font-size:1.5rem;font-weight:800;color:#fff}
.bd-sub{font-size:.85rem;color:rgba(255,255,255,.6)}
.bd-kpis{display:flex;gap:.6rem;flex-wrap:wrap;margin-inline-start:auto}
.bd-kpi{background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.08);border-radius:12px;padding:.45rem .9rem;text-align:center;min-width:92px}
.bd-kpi b{display:block;font-size:1.6rem;line-height:1.1;color:#fff}.bd-kpi b small{font-size:.8rem;margin-inline-start:2px;opacity:.7}
.bd-kpi span{font-size:.72rem;color:rgba(255,255,255,.6)}
.bd-kpi.red{background:rgba(217,45,32,.18);border-color:rgba(217,45,32,.5)}.bd-kpi.green{background:rgba(23,178,106,.15);border-color:rgba(23,178,106,.45)}
.bd-tools{display:flex;gap:.5rem;align-items:center}
.bd-tools .form-select{background-color:rgba(255,255,255,.08);color:#fff;border-color:rgba(255,255,255,.2)}
.bd-tools .form-select option{color:#000}
.bd-cols{flex:1;display:grid;grid-template-columns:repeat(5,minmax(230px,1fr));gap:1rem;padding:1rem 1.5rem;overflow-x:auto}
.bd-col{background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.07);border-radius:14px;display:flex;flex-direction:column;min-height:0}
.bd-col h2{font-size:1rem;font-weight:800;margin:0;padding:.8rem 1rem;display:flex;align-items:center;gap:.5rem;border-bottom:1px solid rgba(255,255,255,.07);color:#fff}
.bd-col h2 span{margin-inline-start:auto;background:rgba(255,255,255,.12);border-radius:20px;padding:0 .6rem;font-size:.9rem}
.bd-dispatch h2{border-top:4px solid #F04438;border-radius:14px 14px 0 0}.bd-field h2{border-top:4px solid #17B26A;border-radius:14px 14px 0 0}
.bd-central h2{border-top:4px solid #9E77ED;border-radius:14px 14px 0 0}.bd-parts h2{border-top:4px solid #F79009;border-radius:14px 14px 0 0}
.bd-done h2{border-top:4px solid #2E90FA;border-radius:14px 14px 0 0}
.bd-list{padding:.7rem;display:flex;flex-direction:column;gap:.6rem;overflow-y:auto}
.bd-card{display:block;background:#12304F;border:1px solid rgba(255,255,255,.08);border-radius:12px;padding:.7rem .8rem;color:#E6EDF5;border-inline-start:5px solid #475467}
.bd-card:hover{background:#163A60;color:#fff}
.bd-card.prio-emergency{border-inline-start-color:#F04438;animation:pulse 2s infinite}.bd-card.prio-urgent{border-inline-start-color:#F79009}
@keyframes pulse{0%,100%{box-shadow:0 0 0 0 rgba(240,68,56,.0)}50%{box-shadow:0 0 0 4px rgba(240,68,56,.25)}}
.bd-row{display:flex;justify-content:space-between;align-items:center;gap:.5rem}
.bd-code{font-size:1.15rem;color:#fff}
.bd-age{font-size:.85rem;font-weight:700;background:rgba(255,255,255,.1);padding:.1rem .5rem;border-radius:8px;white-space:nowrap}
.bd-type{font-size:.8rem;color:rgba(255,255,255,.6);margin:.15rem 0 .35rem}
.bd-desc{font-size:.88rem;line-height:1.45;margin-bottom:.45rem}
.bd-meta{font-size:.76rem;color:rgba(255,255,255,.7)}.bd-st{background:rgba(46,139,201,.25);padding:.05rem .45rem;border-radius:6px}
.bd-flags{display:flex;gap:.3rem;flex-wrap:wrap;margin-top:.45rem}
.bd-flags span{font-size:.7rem;font-weight:700;padding:.05rem .45rem;border-radius:6px}
.f-emergency{background:#F04438;color:#fff}.f-urgent{background:#F79009;color:#1b1b1b}.f-stop{background:rgba(240,68,56,.2);color:#FDA29B}.f-tow{background:rgba(158,119,237,.25);color:#D6BBFB}
.bd-empty{text-align:center;padding:2rem 0;font-size:2rem;color:rgba(255,255,255,.15)}
.bd-foot{text-align:center;font-size:.75rem;color:rgba(255,255,255,.4);padding:.4rem}
@media (max-width:1200px){ .bd-cols{grid-template-columns:repeat(5,260px)} }

/* خطوات الفرقة وسلسلة القطع */
.step-box{border:1px solid var(--line);border-radius:10px;padding:.65rem .75rem;margin-bottom:.6rem;background:#fff}
.step-box .step-title{font-weight:700;font-size:.85rem;margin-bottom:.5rem;display:flex;align-items:center;gap:.45rem}
.step-box .step-title span{width:22px;height:22px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:#F2F4F7;color:#475467;font-size:.75rem}
.step-box.todo{border-color:var(--accent);box-shadow:0 0 0 3px rgba(46,139,201,.1)}.step-box.todo .step-title span{background:var(--accent);color:#fff}
.step-box.done .step-title span{background:#17B26A;color:#fff}.step-box.done .step-title span::after{content:""}
.step-box.locked{opacity:.6;background:#FAFBFC}
.quote-block.team{border-inline-start-color:#17B26A;background:#F0FDF4}
.chain{border:1px solid var(--line);border-radius:10px;padding:.35rem .6rem;margin-bottom:.5rem}
.chain-row{display:flex;align-items:center;gap:.45rem;padding:.3rem 0;border-bottom:1px dashed var(--line)}.chain-row:last-child{border-bottom:0}
.chain-row i{color:var(--accent)}.chain-row.sub{padding-inline-start:1.1rem}.chain-row.sub2{padding-inline-start:2.2rem}
.pq,.av{font-size:.72rem;font-weight:700;padding:.2rem .55rem;border-radius:6px;white-space:nowrap}
.pq-submitted{background:#FEE4E2;color:#B42318}.pq-store_received{background:#E0EAFF;color:#3538CD}.pq-checked{background:#E0F2FE;color:#026AA2}
.pq-purchasing{background:#FEF0C7;color:#B54708}.pq-issued{background:#D1FADF;color:#067647}.pq-completed{background:#F2F4F7;color:#344054}.pq-cancelled{background:#F2F4F7;color:#98A2B3}
.av-pending{background:#F2F4F7;color:#667085}.av-available{background:#D1FADF;color:#067647}.av-partial{background:#FEF0C7;color:#B54708}.av-unavailable{background:#FEE4E2;color:#B42318}
.ps-requested{background:#FEE4E2;color:#B42318}.ps-purchasing{background:#FEF0C7;color:#B54708}.ps-received{background:#D1FADF;color:#067647}

/* الأهداف الزمنية */
.sla{font-size:.7rem;font-weight:700;padding:.15rem .45rem;border-radius:6px;margin-inline-start:.35rem}
.sla-met{background:#D1FADF;color:#067647}.sla-breached{background:#FEE4E2;color:#B42318}.sla-running{background:#E0F2FE;color:#026AA2}
.sla-late{background:#D92D20;color:#fff}.sla-na{background:#F2F4F7;color:#98A2B3}
.sla-flag{color:#D92D20;font-weight:700;font-size:.75rem;margin-top:.2rem}
.chip-late{border-color:#FDA29B;color:#B42318}.chip-late.on{background:#D92D20;border-color:#D92D20;color:#fff}
.bd-card.is-late{outline:2px solid #F04438;outline-offset:-2px}
.bd-late{margin-top:.4rem;font-size:.75rem;font-weight:700;color:#FDA29B}
.tb-user > span.d-md-inline{max-width:190px;min-width:0}
.tb-user > span.d-md-inline span,.tb-user > span.d-md-inline small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* إعدادات الاعتماد */
.aps-card.off{opacity:.8}.aps-card.off .card-header{background:#F8FAFC}
.aps-steps{margin:0;padding-inline-start:1.2rem}.aps-steps li{padding:.2rem 0}
.aps-num{display:inline-flex;width:26px;height:26px;border-radius:50%;align-items:center;justify-content:center;background:var(--brand);color:#fff;font-weight:700;font-size:.8rem}
.aps-sim{background:#F8FAFC;border:1px dashed var(--line);border-radius:10px;padding:.6rem .8rem}

/* ===== الإطارات ===== */
.tyre-map{display:flex;flex-direction:column;align-items:center;gap:.55rem;padding:.5rem 0}
.tm-front{font-size:.75rem;color:var(--muted);font-weight:700}
.tm-axle{display:flex;align-items:center;gap:.4rem;direction:ltr}  /* منظر علوي: يسار المعدة يسار الشاشة */
.tm-side{display:flex;gap:3px}
.tm-bar{min-width:110px;text-align:center;border-top:4px solid #98A2B3;padding-top:.2rem;display:flex;flex-direction:column;line-height:1.2}
.tm-bar{direction:rtl}.tm-bar span{font-size:.72rem;font-weight:700;color:#475467}.tm-bar small{font-size:.66rem;color:var(--muted);direction:ltr}
.tm-spare{display:flex;align-items:center;gap:.4rem;direction:ltr;margin-top:.3rem;border-top:1px dashed var(--line);padding-top:.5rem}
.tyre{width:52px;height:78px;border-radius:10px;border:2px solid #475467;background:#344054;color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:space-between;padding:3px 2px;font-size:.62rem;line-height:1.1;text-align:center;user-select:none}
.tyre.inner{width:46px;opacity:.92}
.tyre[role=button]{cursor:pointer;transition:transform .1s}.tyre[role=button]:hover{transform:scale(1.06)}
.ty-code{font-weight:700;direction:ltr}.ty-tread{font-size:.85rem;font-weight:800}.ty-sn{direction:ltr;opacity:.8}
.ty-good{background:#067647;border-color:#054F31}.ty-monitor{background:#DC6803;border-color:#93370D}.ty-replace{background:#D92D20;border-color:#912018}
.ty-unknown{background:#475467}.ty-empty{background:#fff;color:#98A2B3;border-style:dashed;border-color:#D0D5DD}
.tm-legend{display:flex;flex-wrap:wrap;gap:.35rem .9rem;justify-content:center;align-items:center;color:var(--muted)}.tm-legend > span{white-space:nowrap;display:inline-flex;align-items:center;gap:.25rem}
.ty-dot{display:inline-block;width:12px;height:12px;border-radius:3px;margin-inline-end:.2rem;vertical-align:middle;border:1px solid transparent}
.ty-dot.ty-empty{border:1px dashed #98A2B3}
.tst{display:inline-block;font-size:.72rem;font-weight:700;padding:.15rem .5rem;border-radius:6px;white-space:nowrap}
.tst-good{background:#D1FADF;color:#067647}.tst-monitor{background:#FEF0C7;color:#B54708}.tst-replace{background:#FEE4E2;color:#B42318}.tst-na{background:#F2F4F7;color:#98A2B3}
.mini-ty{display:inline-flex;width:24px;height:24px;border-radius:5px;font-size:.62rem;font-weight:700;align-items:center;justify-content:center;color:#fff}
.mini-ty.ty-empty{color:transparent}
.clickable-pos{cursor:pointer}

/* ===== الحركة والتشغيل / ورش الاستقبال — واجهة مبسّطة بأزرار كبيرة ===== */
.ops-table td{padding-top:.7rem;padding-bottom:.7rem}
.eqs{font-size:.75rem;font-weight:700;padding:.2rem .55rem;border-radius:6px;white-space:nowrap}
.eqs-operating{background:#D1FADF;color:#067647}.eqs-broken_down{background:#FEE4E2;color:#B42318}.eqs-in_maintenance{background:#FEF0C7;color:#B54708}.eqs-out_of_service{background:#F2F4F7;color:#475467}
.ops-eq-code{font-size:1.8rem;font-weight:800;color:var(--brand)}
.ops-step{font-weight:800;font-size:1.05rem;margin-bottom:.6rem;display:flex;align-items:center;gap:.5rem}
.ops-step span{width:30px;height:30px;border-radius:50%;background:var(--brand);color:#fff;display:inline-flex;align-items:center;justify-content:center;font-size:.95rem}
.ops-tiles{display:grid;grid-template-columns:repeat(4,1fr);gap:.6rem}.ops-tiles.two{grid-template-columns:repeat(2,1fr)}
@media (max-width:768px){.ops-tiles{grid-template-columns:repeat(2,1fr)}}
.ops-tile{border:2px solid var(--line);border-radius:14px;padding:1rem .6rem;text-align:center;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:.25rem;background:#fff;transition:all .12s;min-height:120px;justify-content:center}
.ops-tile i{font-size:2rem}.ops-tile b{font-size:1.1rem}.ops-tile small{color:var(--muted);font-size:.72rem;line-height:1.2}
.btn-check:checked + .ops-tile{border-color:var(--brand);background:#EEF4FF;box-shadow:0 0 0 4px rgba(46,139,201,.18)}
.ft-mechanical i{color:#1F4E79}.ft-electrical i{color:#DC6803}.ft-tyres i{color:#344054}.ft-other i{color:#7A5AF8}
.cond-stop i{color:#D92D20}.cond-run i{color:#DC6803}
.btn-check:checked + .cond-stop{border-color:#D92D20;background:#FEF3F2;box-shadow:0 0 0 4px rgba(217,45,32,.15)}
.ws-tile{display:block;text-decoration:none;color:#fff;background:var(--ws);border-radius:16px;padding:1.3rem;min-height:150px;position:relative;box-shadow:0 6px 18px rgba(16,24,40,.12)}
.ws-tile > i{font-size:2.4rem;opacity:.9}.ws-tile .ws-name{font-size:1.25rem;font-weight:800;margin:.3rem 0 .7rem}
.ws-counts{display:flex;gap:.9rem;flex-wrap:wrap;font-size:.85rem}.ws-counts b{font-size:1.3rem}.ws-counts .hot{background:rgba(255,255,255,.22);border-radius:8px;padding:0 .4rem}
.ws-head{display:flex;justify-content:space-between;align-items:center;background:var(--ws);color:#fff;border-radius:14px;padding:.8rem 1rem;margin-bottom:.8rem;font-size:1.3rem;font-weight:800}
.ws-head i{margin-inline-end:.3rem}
.ws-tabs{display:flex;gap:.4rem;flex-wrap:wrap;list-style:none;padding:0}
.ws-tabs a{display:inline-flex;align-items:center;gap:.35rem;padding:.55rem .9rem;border-radius:12px;background:#fff;border:1px solid var(--line);text-decoration:none;color:#344054;font-weight:700}
.ws-tabs a.active{background:#101828;color:#fff;border-color:#101828}.ws-tabs b{background:#F2F4F7;color:#344054;border-radius:8px;padding:0 .45rem}.ws-tabs b.hot{background:#D92D20;color:#fff}
.ws-card{background:#fff;border:1px solid var(--line);border-inline-start:6px solid #98A2B3;border-radius:14px;padding:.9rem;height:100%;display:flex;flex-direction:column}
.ws-card.prio-emergency{border-inline-start-color:#D92D20}.ws-card.prio-urgent{border-inline-start-color:#DC6803}.ws-card.is-late{box-shadow:0 0 0 2px #F04438}
.ws-eq{font-size:1.4rem;font-weight:800;color:var(--brand);line-height:1}
.ws-fault{margin-top:.6rem;font-size:1rem}.ws-desc{background:#F9FAFB;border-radius:8px;padding:.45rem .6rem;margin-top:.35rem;font-size:.9rem}
.ws-actions{margin-top:auto;padding-top:.8rem}
.ws-empty{text-align:center;color:var(--muted);padding:3rem 0}.ws-empty i{font-size:2.5rem}

/* ===== البنشر ===== */
.ts-steps{display:flex;gap:.4rem;flex-wrap:wrap}
.ts-step{flex:1;min-width:120px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:.55rem .7rem;font-weight:700;display:flex;align-items:center;gap:.45rem;color:#667085}
.ts-step span{width:26px;height:26px;border-radius:50%;background:#F2F4F7;display:inline-flex;align-items:center;justify-content:center;font-size:.8rem}
.ts-step.done{color:#067647;border-color:#A6F4C5;background:#F6FEF9}.ts-step.done span{background:#17B26A;color:#fff}
.ts-assess td{vertical-align:middle}.ts-assess input[type=number]{max-width:90px;font-weight:800}
.ts-item{border-inline-start:5px solid #D0D5DD}.ts-item.ts-replace{border-inline-start-color:#D92D20}.ts-item.ts-repair{border-inline-start-color:#DC6803}.ts-item.ts-ok{border-inline-start-color:#17B26A}
.ops-ws{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:.45rem}
.ops-ws-opt{border:2px solid var(--line);border-radius:12px;padding:.6rem .7rem;cursor:pointer;font-weight:700;display:flex;align-items:center;gap:.45rem;background:#fff;position:relative}
.ops-ws-opt i{color:var(--ws);font-size:1.2rem}
.btn-check:checked + .ops-ws-opt{border-color:var(--ws);box-shadow:0 0 0 3px color-mix(in srgb, var(--ws) 25%, transparent);background:color-mix(in srgb, var(--ws) 8%, #fff)}
.ops-ws-opt .sugg{position:absolute;top:-9px;inset-inline-end:8px;background:#101828;color:#fff;font-size:.62rem;border-radius:6px;padding:0 .35rem}
.ws-link-card{border-inline-start:6px solid var(--ws)}
.ws-card-static{height:auto}.ws-card-static .ws-actions{margin-top:.6rem}

/* ===== نوع المعدة للصيانة ===== */
.scls{display:inline-flex;align-items:center;gap:.25rem;font-size:.72rem;font-weight:700;padding:.15rem .5rem;border-radius:20px;white-space:nowrap}
.scls-equipment{background:#FEF0C7;color:#93370D}.scls-cars{background:#E0F2FE;color:#026AA2}.scls-transport{background:#EBE9FE;color:#5925DC}
.scls b{margin-inline-start:.2rem}
.scls-opt{border:2px solid var(--line);border-radius:14px;padding:.7rem 1rem;cursor:pointer;display:flex;flex-direction:column;align-items:center;min-width:150px;background:#fff}
.scls-opt i{font-size:1.6rem}.scls-opt small{color:var(--muted);font-size:.7rem}
.scls-opt.scls-equipment i{color:#DC6803}.scls-opt.scls-cars i{color:#0086C9}.scls-opt.scls-transport i{color:#7A5AF8}
.btn-check:checked + .scls-opt{border-color:var(--brand);background:#EEF4FF;box-shadow:0 0 0 3px rgba(46,139,201,.18)}
.ops-dest{background:#101828;color:#fff;border-radius:12px;padding:.6rem .9rem;font-size:1rem}
.ops-dest b{color:#FEC84B}.ops-dest .btn-link{color:#98A2B3}

/* ===== مركز التقارير ===== */
.rpt-tile{display:flex;flex-direction:column;gap:.25rem;height:100%;background:#fff;border:1px solid var(--line);border-radius:14px;padding:1rem;text-decoration:none;color:#101828;transition:all .12s}
.rpt-tile:hover{border-color:var(--brand);box-shadow:0 6px 16px rgba(16,24,40,.08)}.rpt-tile i{font-size:1.6rem;color:var(--brand)}.rpt-tile small{color:var(--muted)}
.kpi{background:#fff;border:1px solid var(--line);border-radius:12px;padding:.8rem 1rem;height:100%}.kpi-v{font-size:1.6rem;font-weight:800;line-height:1.1}.kpi-l{font-size:.8rem;color:var(--muted)}
.kpi-warn .kpi-v{color:#D92D20}.kpi-big .kpi-v{font-size:2.2rem;color:#067647}
.rpt-dot{display:inline-block;width:10px;height:10px;border-radius:50%;vertical-align:middle}
.rpt-stack{display:flex;height:22px;border-radius:6px;overflow:hidden;background:#F2F4F7}.rpt-stack span{display:flex;align-items:center;justify-content:center;color:#fff;font-size:.72rem;font-weight:700;min-width:18px}
.rpt-bar{display:grid;grid-template-columns:minmax(90px,38%) 1fr 36px;align-items:center;gap:.5rem;margin-bottom:.4rem;font-size:.85rem}
.rpt-bar .track{background:#F2F4F7;border-radius:6px;height:12px;overflow:hidden}.rpt-bar .track i{display:block;height:100%;background:var(--brand);border-radius:6px}.rpt-bar b{text-align:end}
.rpt-bar .lbl{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.print-only{display:none}
@media print{.print-only{display:block}.rpt-filters,.sidebar,.topbar,.app-sidebar,header.topbar{display:none!important}.kpi,.card{break-inside:avoid}body{-webkit-print-color-adjust:exact;print-color-adjust:exact}}

/* ===== مركز التقارير — تصميم احترافي ===== */
.rh-hero{background:linear-gradient(135deg,#0B2A4A 0%,#1F4E79 55%,#2E8BC9 100%);color:#fff;border-radius:20px;padding:1.4rem 1.5rem 1.2rem;margin-bottom:1rem;box-shadow:0 12px 30px rgba(15,42,74,.25);position:relative;overflow:hidden}
.rh-hero:after{content:"";position:absolute;inset-inline-end:-80px;top:-80px;width:260px;height:260px;border-radius:50%;background:rgba(255,255,255,.06)}
.rh-hero-top{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;position:relative;z-index:1}
.rh-kicker{font-size:.75rem;opacity:.75;letter-spacing:.02em}.rh-hero h1{font-size:1.6rem;font-weight:800;margin:.1rem 0 .2rem}.rh-sub{font-size:.85rem;opacity:.8}
.rh-date{background:rgba(255,255,255,.12);border-radius:12px;padding:.45rem .8rem;text-align:center;font-weight:700;white-space:nowrap}
.rh-kpis{display:grid;grid-template-columns:repeat(5,1fr);gap:.7rem;margin-top:1.1rem;position:relative;z-index:1}
@media (max-width:992px){.rh-kpis{grid-template-columns:repeat(2,1fr)}}
.rh-kpi{background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.15);border-radius:14px;padding:.75rem .9rem;color:#fff;text-decoration:none;transition:background .15s}
.rh-kpi:hover{background:rgba(255,255,255,.18);color:#fff}.rh-kpi .v{font-size:1.75rem;font-weight:800;line-height:1.1}.rh-kpi .l{font-size:.78rem;opacity:.85}
.rh-kpi .s{font-size:.72rem;opacity:.7;margin-top:.25rem}.rh-kpi .late{background:#F04438;color:#fff;border-radius:6px;padding:0 .35rem;opacity:1}.rh-kpi.warn .v{color:#FEC84B}
.rh-meter{height:6px;border-radius:4px;background:rgba(255,255,255,.2);margin-top:.35rem;overflow:hidden}.rh-meter i{display:block;height:100%;background:#32D583;border-radius:4px}
.rh-toolbar{display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-wrap:wrap;margin:1.1rem 0 .4rem}
.rh-search{position:relative;min-width:320px}.rh-search i{position:absolute;inset-inline-start:.8rem;top:50%;transform:translateY(-50%);color:#98A2B3}
.rh-search input{width:100%;border:1px solid var(--line);border-radius:12px;padding:.6rem 2.3rem;background:#fff;outline:none}.rh-search input:focus{border-color:var(--brand);box-shadow:0 0 0 3px rgba(46,139,201,.15)}
.rh-search.sm{min-width:220px}.rh-search.sm input{padding:.35rem 2.2rem;border-radius:9px;font-size:.85rem}
.rh-section{margin-top:1.2rem}.rh-section h2{font-size:1.15rem;font-weight:800;display:flex;align-items:center;gap:.55rem;margin-bottom:.8rem;flex-wrap:wrap}
.rh-section h2 > span{width:34px;height:34px;border-radius:10px;background:#101828;color:#fff;display:inline-flex;align-items:center;justify-content:center}
.rh-section h2 small{font-size:.8rem;font-weight:400;color:var(--muted);flex-basis:100%;padding-inline-start:2.6rem;margin-top:-.3rem}
.rh-group{margin-bottom:1rem}.rh-group-h{font-weight:800;color:#475467;font-size:.85rem;margin:.2rem 0 .55rem;display:flex;align-items:center;gap:.4rem}
.rh-group-h:after{content:"";flex:1;height:1px;background:var(--line)}
.rh-card{--t:#2E8BC9;background:#fff;border:1px solid var(--line);border-radius:16px;padding:1rem;height:100%;display:flex;flex-direction:column;gap:.8rem;transition:all .15s;border-top:4px solid var(--t)}
.rh-card:hover{box-shadow:0 10px 24px rgba(16,24,40,.08);transform:translateY(-2px)}
.tone-danger{--t:#D92D20}.tone-warning{--t:#DC6803}.tone-success{--t:#17B26A}.tone-primary{--t:#2E8BC9}
.rh-card-top{display:flex;gap:.75rem;align-items:flex-start}
.rh-ico{width:44px;height:44px;flex:0 0 44px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;font-size:1.3rem;background:color-mix(in srgb,var(--t,var(--c)) 12%,#fff);color:var(--t,var(--c))}
.rh-title{font-weight:800;font-size:1rem;color:#101828}.rh-desc{font-size:.8rem;color:var(--muted);line-height:1.45}
.rh-count{min-width:44px;text-align:center;font-weight:800;font-size:1.2rem;color:var(--t);background:color-mix(in srgb,var(--t) 10%,#fff);border-radius:10px;padding:.2rem .5rem}
.rh-count.zero{color:#98A2B3;background:#F2F4F7}
.rh-actions{display:flex;gap:.35rem;flex-wrap:wrap;align-items:center;margin-top:auto}.rh-tag{font-size:.7rem;color:#667085;margin-inline-start:auto}
.rh-an{--c:#2E8BC9;display:flex;align-items:center;gap:.8rem;background:#fff;border:1px solid var(--line);border-radius:14px;padding:.85rem 1rem;text-decoration:none;height:100%;transition:all .15s}
.rh-an:hover{border-color:var(--c);box-shadow:0 8px 20px rgba(16,24,40,.07)}.rh-an .rh-go{margin-inline-start:auto;color:#98A2B3}.rh-an .rh-ico{--t:var(--c)}
.rd-head{--t:#2E8BC9;display:flex;align-items:center;gap:1rem;flex-wrap:wrap;background:#fff;border:1px solid var(--line);border-inline-start:6px solid var(--t);border-radius:16px;padding:1rem 1.2rem;margin-bottom:.8rem}
.rd-head h1{font-size:1.35rem;font-weight:800;margin:.1rem 0}.rd-head .rh-ico{width:52px;height:52px;flex-basis:52px;font-size:1.55rem}
.rd-filters{display:flex;flex-wrap:wrap;gap:.6rem;background:#fff;border:1px solid var(--line);border-radius:14px;padding:.75rem 1rem;margin-bottom:.7rem}
.rd-filters label{display:block;font-size:.72rem;color:var(--muted);margin-bottom:.15rem}
.rd-summary{display:flex;flex-wrap:wrap;gap:.45rem;margin-bottom:.6rem}.rd-summary span{background:#fff;border:1px solid var(--line);border-radius:20px;padding:.2rem .75rem;font-size:.8rem}
.rd-summary span.lbl{background:#EEF4FF;border-color:#D1E0FF;color:#1F4E79}
.rd-card{border-radius:14px;overflow:hidden}.rd-scroll{max-height:68vh}
.rd-table thead th{position:sticky;top:0;background:#101828;color:#fff;font-weight:700;font-size:.78rem;white-space:nowrap;cursor:pointer;user-select:none;z-index:1;padding:.55rem .5rem}
.rd-table thead th i{opacity:.35;font-size:.65rem}.rd-table thead th.sorted i{opacity:1}
.rd-table td{font-size:.83rem}.rd-table tfoot td{background:#F2F4F7;position:sticky;bottom:0}

/* ===== الحركة والتشغيل — تخطيط احترافي ===== */
.ops-head{display:flex;justify-content:space-between;align-items:flex-end;gap:1rem;flex-wrap:wrap;margin-bottom:.9rem}
.ops-head h1{font-size:1.45rem;font-weight:800;margin:0}.ops-head .sub{font-size:.82rem;color:var(--muted)}
.ops-quick{display:flex;gap:.5rem;flex-wrap:wrap}
.oq{display:inline-flex;align-items:center;gap:.4rem;padding:.45rem .85rem;border-radius:12px;border:1.5px solid var(--line);background:#fff;text-decoration:none;font-weight:700;font-size:.88rem;color:#344054;white-space:nowrap}
.oq b{background:#F2F4F7;border-radius:8px;padding:0 .45rem;min-width:24px;text-align:center}
.oq-open{border-color:#FEDF89;color:#B54708}.oq-open.on{background:#FDB022;border-color:#FDB022;color:#101828}.oq-open.on b{background:rgba(255,255,255,.55)}
.oq-confirm{border-color:#A6F4C5;color:#067647}.oq-confirm.on{background:#17B26A;border-color:#17B26A;color:#fff}.oq-confirm.on b{background:rgba(255,255,255,.25);color:#fff}
.oq-confirm.pulse:not(.on) b{background:#17B26A;color:#fff}
.ops-toolbar{background:#fff;border:1px solid var(--line);border-radius:16px;padding:.8rem;margin-bottom:.9rem;display:flex;flex-direction:column;gap:.7rem}
.ops-search{display:flex;gap:.5rem;flex-wrap:wrap}
.ops-q{position:relative;flex:1 1 320px}.ops-q > i{position:absolute;inset-inline-start:.85rem;top:50%;transform:translateY(-50%);color:#98A2B3}
.ops-q input{width:100%;height:44px;border:1px solid var(--line);border-radius:12px;padding:0 2.4rem;outline:none;font-size:.95rem}
.ops-q input:focus{border-color:var(--brand);box-shadow:0 0 0 3px rgba(46,139,201,.15)}
.ops-q .clr{position:absolute;inset-inline-end:.8rem;top:50%;transform:translateY(-50%);color:#98A2B3}
.ops-site{flex:0 1 260px;height:44px;border-radius:12px}.ops-search .btn{height:44px;border-radius:12px}
.ops-tabs{display:flex;gap:.4rem;flex-wrap:wrap}
.ops-tabs a{display:inline-flex;align-items:center;gap:.4rem;padding:.4rem .9rem;border-radius:999px;border:1px solid var(--line);background:#F9FAFB;text-decoration:none;color:#344054;font-weight:700;font-size:.87rem;white-space:nowrap}
.ops-tabs a b{font-weight:700;color:#667085;font-size:.8rem}.ops-tabs a.on{background:#101828;border-color:#101828;color:#fff}.ops-tabs a.on b{color:#D0D5DD}
.ops-tabs a.t-equipment i{color:#DC6803}.ops-tabs a.t-cars i{color:#0086C9}.ops-tabs a.t-transport i{color:#7A5AF8}.ops-tabs a.on i{color:#fff}
.ops-card{border-radius:16px;overflow:hidden}
.ops-table thead th{background:#F9FAFB;color:#475467;font-size:.78rem;font-weight:700;white-space:nowrap;border-bottom:1px solid var(--line)}
.ops-table td{padding-top:.6rem;padding-bottom:.6rem;border-color:#EAECF0}
.ops-table tr.is-ready td{background:#F6FEF9}.ops-table tr.is-ready td:first-child{box-shadow:inset -4px 0 0 #17B26A}
[dir=ltr] .ops-table tr.is-ready td:first-child{box-shadow:inset 4px 0 0 #17B26A}
.ops-table tr.has-req td:first-child{box-shadow:inset -4px 0 0 #FDB022}[dir=ltr] .ops-table tr.has-req td:first-child{box-shadow:inset 4px 0 0 #FDB022}
.ops-code{font-weight:800;font-size:1.02rem;color:var(--brand);text-decoration:none}.ops-plate{font-size:.78rem;color:#475467;white-space:nowrap}
.ops-site-cell{max-width:230px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.85rem}.ops-site-cell i{color:#98A2B3}
.ops-req{min-width:220px}.ops-req .doc{font-weight:700;font-size:.82rem;text-decoration:none}.ops-req .line{font-size:.78rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:260px}
.ops-req .stage{font-weight:700}.ops-req .st-resolved{color:#067647}.ops-req .st-waiting_parts{color:#B54708}.ops-req .st-new{color:#B42318}
.ops-act{width:170px;min-width:150px}.ops-act .btn{white-space:nowrap;border-radius:10px}
.ops-report:hover{background:#D92D20;color:#fff}
.ops-foot{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:.5rem;padding:.6rem .9rem;border-top:1px solid var(--line);font-size:.82rem;color:var(--muted);background:#fff}
/* الجوال: كل معدة بطاقة */
@media (max-width:767.98px){
  .ops-table thead{display:none}.ops-table,.ops-table tbody,.ops-table tr,.ops-table td{display:block;width:100%}
  .ops-table tr{border-bottom:8px solid #F2F4F7;padding:.4rem .2rem}.ops-table td{border:0;padding:.25rem .75rem}
  .ops-table td[data-l]:not(:first-child){display:grid;grid-template-columns:88px 1fr;column-gap:.6rem;align-items:start}
  .ops-table td[data-l]:not(:first-child)::before{content:attr(data-l);grid-column:1;grid-row:1 / span 4;font-size:.72rem;color:#98A2B3;padding-top:.15rem}
  .ops-table td[data-l]:not(:first-child) > *{grid-column:2;justify-self:start}
  .ops-table .text-truncate{max-width:none!important;white-space:normal}
  .ops-search .btn{flex:1 1 100%}
  .ops-table td:first-child{display:flex;justify-content:space-between;align-items:center;box-shadow:none!important}
  .ops-act{width:100%}.ops-req .line,.ops-site-cell{max-width:none;white-space:normal}.ops-site{flex-basis:100%}
}

/* ===== شاشة استلام المعدة ===== */
.ho-head{display:flex;align-items:center;gap:1rem;margin-bottom:1rem}.ho-head h1{font-size:1.4rem;font-weight:800;margin:0}
.ho-card{border-radius:16px}.ho-timeline{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:.5rem;margin:1rem 0}
.ho-timeline > div{background:#F9FAFB;border:1px solid var(--line);border-radius:12px;padding:.5rem .7rem}.ho-timeline span{display:block;font-size:.72rem;color:var(--muted)}.ho-timeline b{font-size:.92rem}
.ho-block{border:1px solid var(--line);border-radius:12px;padding:.7rem .9rem;margin-top:.6rem;background:#fff}.ho-block .lbl{font-weight:800;font-size:.85rem;margin-bottom:.25rem;color:#344054}
.ho-block.ok{border-color:#A6F4C5;background:#F6FEF9}.ho-block.ok .lbl{color:#067647}
.ho-decide{border:2px solid #A6F4C5;border-radius:16px}
.ho-check{display:flex;align-items:center;gap:.6rem;border:1.5px solid var(--line);border-radius:12px;padding:.7rem .9rem;margin-bottom:.45rem;cursor:pointer;font-weight:700;background:#fff}
.ho-check .bi-check-square-fill{display:none;color:#17B26A;font-size:1.25rem}.ho-check .bi-square{font-size:1.25rem;color:#98A2B3}
.btn-check:checked + .ho-check{border-color:#17B26A;background:#ECFDF3}.btn-check:checked + .ho-check .bi-square{display:none}.btn-check:checked + .ho-check .bi-check-square-fill{display:inline}
#hoOk:disabled{opacity:.45}
.ho-done{display:flex;gap:.8rem;align-items:center;background:#ECFDF3;border:1px solid #A6F4C5;color:#067647;border-radius:14px;padding:.8rem 1rem;margin-bottom:1rem}.ho-done > i{font-size:2rem}
.ho-timeline .hl{background:#ECFDF3;border-color:#A6F4C5}
.ho-seg{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:.4rem}.ho-seg.three{grid-template-columns:repeat(3,1fr)}
.ho-seg label{border:1.5px solid var(--line);border-radius:12px;padding:.5rem .6rem;cursor:pointer;text-align:center;background:#fff;display:flex;flex-direction:column;justify-content:center}
.ho-seg label small{font-size:.72rem;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.btn-check:checked + label{border-color:var(--brand);background:#EEF4FF}
.ho-seg label.c-excellent{--c:#17B26A}.ho-seg label.c-good{--c:#2E8BC9}.ho-seg label.c-acceptable{--c:#DC6803}
.ho-seg .btn-check:checked + label[class*=c-]{border-color:var(--c);background:color-mix(in srgb,var(--c) 10%,#fff);color:var(--c)}
.ho-fuel{display:flex;border:1.5px solid var(--line);border-radius:12px;overflow:hidden}.ho-fuel label{flex:1;text-align:center;padding:.45rem 0;cursor:pointer;font-weight:800;border-inline-start:1px solid var(--line);background:#fff}
.ho-fuel label:first-of-type{border-inline-start:0}.ho-fuel .btn-check:checked + label{background:#1F4E79;color:#fff}
.ho-receipt{border:2px solid #A6F4C5;border-radius:16px}.ho-receipt .card-header{background:#ECFDF3;color:#067647;font-weight:800}
.ho-cond{font-weight:800}.ho-cond.c-excellent{color:#067647}.ho-cond.c-good{color:#1F4E79}.ho-cond.c-acceptable{color:#B54708}
.ts-presets{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:.45rem}
.ts-presets label{border:1.5px solid var(--line);border-radius:12px;padding:.55rem .7rem;cursor:pointer;background:#fff;display:flex;flex-direction:column}
.ts-presets label small{color:var(--muted);font-size:.72rem}.ts-quick{border:2px dashed #FDB022;border-radius:16px}
.ts-finish{border:2px solid var(--line);border-radius:16px}.ts-finish.ready{border-color:#17B26A;box-shadow:0 0 0 4px rgba(23,178,106,.1)}
.ts-step-n{display:inline-flex;width:24px;height:24px;border-radius:50%;background:#101828;color:#fff;align-items:center;justify-content:center;font-size:.8rem;margin-inline-end:.3rem}
.ts-finish.ready .ts-step-n{background:#17B26A}
.ts-block li{padding:.5rem .7rem;border:1px solid #FEDF89;background:#FFFAEB;border-radius:10px;margin-bottom:.4rem;font-size:.88rem}.ts-block li > i{color:#B54708;margin-inline-end:.3rem}
.ws-team-auto{display:flex;align-items:center;gap:.7rem;background:#F0F9FF;border:1px solid #B9E6FE;border-radius:12px;padding:.6rem .8rem}.ws-team-auto > i{font-size:1.5rem;color:#0086C9}

/* ===== سلسلة الصيانة (Oracle Fusion) ===== */
.mc-chain{display:flex;align-items:center;gap:.25rem;flex-wrap:wrap;background:#fff;border:1px solid var(--line);border-radius:14px;padding:.45rem .6rem;margin-bottom:1rem;font-size:.8rem}
.mc-chain a{display:inline-flex;align-items:center;gap:.3rem;padding:.25rem .6rem;border-radius:999px;text-decoration:none;color:#475467;font-weight:700}
.mc-chain a.on{background:#1F4E79;color:#fff}.mc-chain .sep{color:#D0D5DD;font-size:.7rem}
.mc-num{display:inline-flex;width:22px;height:22px;border-radius:50%;background:#1F4E79;color:#fff;align-items:center;justify-content:center;font-size:.75rem;margin-inline-end:.3rem}
.mc-st{display:inline-block;font-size:.72rem;font-weight:700;padding:.12rem .5rem;border-radius:20px;white-space:nowrap;text-decoration:none}
.st-overdue{background:#FEE4E2;color:#B42318}.st-due{background:#FEF0C7;color:#B54708}.st-generated{background:#D1E9FF;color:#175CD3}.st-ok{background:#ECFDF3;color:#067647}
.mc-card .table td{vertical-align:top}.mc-pva td,.mc-pva th{font-size:.82rem}
/* هرمية الأصول */
.ah-tree{display:flex;flex-direction:column;gap:.35rem}
.ah-node{display:flex;align-items:center;gap:.45rem;border:1px solid var(--line);border-radius:10px;padding:.45rem .7rem;text-decoration:none;color:#101828;background:#fff;font-size:.88rem}
.ah-node.self{background:#EEF4FF;border-color:#B2CCFF}.ah-node.child{margin-inline-start:1.6rem}.ah-node.up{color:#475467}
/* تخطيط الطاقة */
.cap-row{display:grid;grid-template-columns:120px 1fr 70px;gap:.6rem;align-items:center;margin-bottom:.55rem}
.cap-row .lbl small,.cap-row .val small{display:block;color:var(--muted);font-size:.7rem}.cap-row .val{text-align:end}
.cap-row .track{position:relative;height:18px;background:#F2F4F7;border-radius:6px;display:flex;overflow:visible}
.cap-row .track i.wo{background:#2E8BC9;border-radius:6px 0 0 6px}.cap-row .track i.fc{background:#84CAFF}
.cap-row .track .cap{position:absolute;top:-4px;bottom:-4px;width:2px;background:#D92D20}
.cap-key{display:inline-block;width:12px;height:12px;border-radius:3px;vertical-align:middle}.cap-key.wo{background:#2E8BC9}.cap-key.fc{background:#84CAFF}.cap-key.cap{background:#D92D20;width:3px}
.fc-set{background:#FCFCFD;border:1px dashed var(--line);border-radius:12px;padding:.4rem .2rem;margin-inline:0}
/* لوحة الجدولة */
.sc-grid th,.sc-grid td{min-width:118px;vertical-align:top;font-size:.8rem}.sc-grid thead th{background:#F9FAFB;text-align:center}.sc-grid thead th small{display:block;color:var(--muted);font-weight:400}
.sc-team,.sc-team-h{min-width:150px!important;background:#fff;position:sticky;inset-inline-start:0;z-index:1}.sc-team small{display:block;color:var(--muted);font-weight:400;font-size:.7rem}
.sc-off{background:#F9FAFB}.sc-today{background:#EEF4FF!important}.sc-over{background:#FEF3F2}.sc-drop.hover{outline:2px dashed #2E8BC9;outline-offset:-3px;background:#F0F9FF}
.sc-backlog{display:flex;flex-wrap:wrap;gap:.35rem;min-height:44px;padding:.3rem;border:1px dashed var(--line);border-radius:10px}.sc-backlog .sc-card{width:150px}
.sc-card{position:relative;background:#fff;border:1px solid var(--line);border-inline-start:4px solid #2E8BC9;border-radius:8px;padding:.3rem .45rem;margin-bottom:.3rem;cursor:grab;font-size:.75rem}
.sc-card.mt-corrective{border-inline-start-color:#D92D20}.sc-card.mt-periodic{border-inline-start-color:#7A5AF8}.sc-card.dragging{opacity:.4}
.sc-card .h{float:inline-end;color:var(--muted)}.sc-card .d{color:#475467;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sc-card .lnk{position:absolute;bottom:2px;inset-inline-end:4px;font-size:.7rem}
.sc-load{font-size:.68rem;color:var(--muted);text-align:end;margin-bottom:.2rem}.sc-over .sc-load{color:#B42318;font-weight:700}
.wr-banner{border-inline-start:4px solid #0086C9}
.hv-check td{vertical-align:middle}.hv-check .btn{font-size:.78rem}
/* خزانات الوقود */
.ft-card{border:1px solid var(--line);border-radius:14px}.ft-card.low{border-color:#FDB022;box-shadow:0 0 0 3px rgba(253,176,34,.12)}
.ft-card.neg{border-color:#F04438;box-shadow:0 0 0 3px rgba(240,68,56,.12)}
.ft-gauge{height:12px;background:#F2F4F7;border-radius:8px;overflow:hidden}.ft-gauge i{display:block;height:100%;background:linear-gradient(90deg,#2E8BC9,#17B26A)}
.ft-card.low .ft-gauge i{background:#FDB022}.ft-card.neg .ft-gauge i{background:#F04438}
.ft-bal{font-size:1.5rem;font-weight:800;color:#101828}
/* تقييم المشغلين */
.hr-scale .btn{font-weight:700}.hr-scale .btn-check:checked+.s1{background:#F04438;border-color:#F04438;color:#fff}
.hr-scale .btn-check:checked+.s2{background:#FDB022;border-color:#FDB022;color:#101828}.hr-scale .btn-check:checked+.s3{background:#2E8BC9;border-color:#2E8BC9;color:#fff}
.hr-scale .btn-check:checked+.s4{background:#17B26A;border-color:#17B26A;color:#fff}
.hr-dots{display:flex;gap:3px}.hr-dots i{width:22px;height:9px;border-radius:3px;background:#EAECF0}
.hr-dots i.on{background:#2E8BC9}.hr-dots i.on.s1{background:#F04438}.hr-dots i.on.s2{background:#FDB022}.hr-dots i.on.s4{background:#17B26A}
.hr-crit td{vertical-align:middle}
/* مركز التقارير: تبويب المجموعات */
.rh-tabs{flex-wrap:wrap;gap:.35rem}.rh-tabs .nav-link{border:1px solid var(--line);background:#fff;color:#344054;font-weight:700;font-size:.85rem;padding:.4rem .8rem}
.rh-tabs .nav-link.active{background:#1F4E79;color:#fff;border-color:#1F4E79}.rh-tabs .nav-link.active .badge{background:#fff!important}
.rh-tabs.dim{opacity:.5;pointer-events:none}
.tab-content.searching .tab-pane{display:block!important;opacity:1}.tab-content.searching .tab-pane.empty-search{display:none!important}
.rh-actions .btn{padding:.2rem .5rem}
/* توحيد مسار الإجراء: بطاقة الانتقال لصفحة العمل */
.work-cta{padding:8px 4px}.work-cta .btn-lg{padding:.9rem}
/* لوحة مهامي */
.my-tasks .card-header{background:linear-gradient(90deg,#1F4E79,#2E8BC9);color:#fff}
.my-tasks .card-header .badge{background:#fff!important;color:#1F4E79}
.task-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:10px;padding:14px;justify-content:start}
.task-grid .task{display:flex;flex-direction:column;align-items:center;gap:2px;padding:14px 10px;border:1px solid var(--line);border-radius:14px;text-decoration:none;color:#101828;background:#fff;transition:.15s;position:relative}
.task-grid .task:hover{border-color:#2E8BC9;box-shadow:0 4px 14px rgba(46,139,201,.15);transform:translateY(-2px)}
.task-grid .task.urgent{border-color:#F04438;background:#FEF3F2}
.task-grid .ti{font-size:1.4rem;color:#2E8BC9}.task-grid .task.urgent .ti{color:#F04438}
.task-grid .tc{font-size:1.8rem;font-weight:800;line-height:1;color:#1F4E79}.task-grid .task.urgent .tc{color:#B42318}
.task-grid .tl{font-size:.82rem;color:#475467;text-align:center}
.my-tasks.empty .card-body{background:#F6FEF9}
/* شارة الحالة المبسّطة: سطر فرعي للتفصيل */
.rs .rs-sub{display:block;font-size:.68rem;opacity:.85;font-weight:600;margin-top:1px}
/* رقائق المجموعات الأربع */
.stage-chip.grp-reported.on{background:#EFF8FF;border-color:#2E8BC9;color:#1849A9}
.stage-chip.grp-repairing.on{background:#FFFAEB;border-color:#FDB022;color:#B54708}
.stage-chip.grp-to_confirm.on{background:#ECFDF3;border-color:#17B26A;color:#067647}

/* ===== قوائم فرعية قابلة للطي في القائمة الجانبية ===== */
.sb-toggle{width:100%;border:0;background:transparent!important;text-align:inherit;cursor:pointer;font:inherit;color:var(--side-text)!important;appearance:none;-webkit-appearance:none}
.sb-toggle:hover{background:rgba(255,255,255,.07)!important;color:#fff!important}
.sb-toggle.active-parent{background:rgba(255,255,255,.06)!important}
.sb-toggle .sb-caret{margin-inline-start:auto;font-size:.7rem;transition:transform .2s ease;opacity:.7}
.sb-parent.open > .sb-toggle .sb-caret,.sb-toggle[aria-expanded="true"] .sb-caret{transform:rotate(180deg)}
.sb-toggle.active-parent .sb-text{color:#fff;font-weight:600}
.sb-sublist{list-style:none;margin:2px 0 4px;padding:0}
.sb-sublist .sb-sublink{padding-inline-start:2.4rem;font-size:.9rem;position:relative}
.sb-sublist .sb-sublink::before{content:"";position:absolute;inset-inline-start:1.35rem;top:50%;width:5px;height:5px;border-radius:50%;background:currentColor;opacity:.35;transform:translateY(-50%)}
.sb-sublist .sb-sublink.active::before{opacity:1}
.sb-sublist .sb-sublink.active{background:rgba(255,255,255,.08)}

/* مدة العمل المحسوبة تلقائياً في شاشة الإنهاء */
.dur-auto .dur-main{display:flex;align-items:center;gap:.6rem;padding:.6rem .8rem;background:#EFF6FF;border:1px solid #BFDBFE;border-radius:12px}
.dur-auto .dur-main > .bi{font-size:1.5rem;color:#2563EB}
.dur-auto .dur-val{font-size:1.25rem;font-weight:800;color:#1E40AF;line-height:1.1}
.dur-auto .dur-hint{font-size:.78rem;color:#64748B}
.dur-auto .dur-editor{margin-top:.5rem;padding:.6rem .8rem;background:#F8FAFC;border:1px solid var(--line);border-radius:10px}
.dur-auto .dur-edit-btn{white-space:nowrap}

/* قوائم منسدلة قابلة للتوسيع (العطل/الحل) */
.lk-picker{display:flex;gap:.4rem}
.lk-picker .lk-select{flex:1}
.lk-newbox{margin-top:.25rem}

/* قواعd التبويبات (مفقودة من نسخة Bootstrap RTL المقصوصة) — تمنع تراكم التبويبات وظهور فراغ أبيض */
/* ملاحظة: التبويبات داخل .card-body لا كأبناء مباشرين، لذا لا نستخdم > */
.tab-content .tab-pane{display:none}
.tab-content .tab-pane.active{display:block}
.tab-content .fade:not(.show){opacity:0}
.tab-content .fade{transition:opacity .15s linear}

/* ===== لوحة التحليلات ===== */
.an-kpi .an-kpi-icon{font-size:1.8rem;line-height:1}
.an-kpi .an-kpi-val{font-size:1.9rem;font-weight:800;color:#101828;line-height:1.1;margin-top:4px}
.an-kpi .an-kpi-val small{font-size:.9rem;font-weight:600;color:#98A2B3;margin-inline-start:2px}
.an-kpi .an-kpi-lbl{font-size:.8rem;color:#667085;margin-top:2px}
.an-bar{display:flex;align-items:center;gap:.6rem;margin-bottom:.5rem}
.an-bar-lbl{flex:0 0 38%;font-size:.85rem;color:#344054;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.an-bar-track{flex:1;height:14px;background:#F2F4F7;border-radius:7px;overflow:hidden}
.an-bar-track i{display:block;height:100%;background:linear-gradient(90deg,#2E8BC9,#1F6FA5);border-radius:7px;transition:width .4s}
.an-bar-track i.pri-emergency{background:#F04438}.an-bar-track i.pri-urgent{background:#F79009}.an-bar-track i.pri-high{background:#F79009}
.an-bar-track i.pri-normal{background:#2E8BC9}.an-bar-track i.pri-low{background:#98A2B3}
.an-bar-val{flex:0 0 auto;font-weight:700;font-size:.85rem;color:#101828;min-width:28px;text-align:end}

/* صور البلاغ في الطباعة — حجم مناسب يبقى في نفس الصفحة (للتوثيق) */
.pphotos{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 4px;justify-content:flex-start}
.pphoto{flex:0 0 calc(33.33% - 6px);max-width:calc(33.33% - 6px);border:1px solid #D0D5DD;border-radius:6px;overflow:hidden;background:#fafbfc;display:flex;align-items:center;justify-content:center;height:120px}
.pphoto img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;display:block}
/* صورة واحدة: أكبر قليلاً وموسّطة */
.pphotos.one .pphoto{flex:0 0 40%;max-width:40%;height:150px}
@media print{ .pphoto{height:34mm;page-break-inside:avoid} .pphotos.one .pphoto{height:44mm} }
