/* Extracted from invalid post-HTML patches during core rebuild 2026-08-13 */
.field-label-overlay{position:fixed;inset:0;background:rgba(15,23,42,.62);z-index:1000000;display:flex;align-items:center;justify-content:center;padding:18px}.field-label-dialog{width:min(950px,98vw);max-height:92vh;overflow:auto;background:#fff;border-radius:20px;box-shadow:0 28px 80px rgba(0,0,0,.3);padding:18px;direction:rtl}.field-label-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;border-bottom:1px solid #e2e8f0;padding-bottom:12px;margin-bottom:14px}.field-label-head h2{margin:0 0 5px;color:#173a5d}.field-label-head small{color:#64748b}.field-label-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.field-label-grid label{display:grid;grid-template-columns:minmax(130px,.8fr) minmax(180px,1.2fr);align-items:center;gap:10px;background:#f8fafc;border:1px solid #dce5ee;border-radius:12px;padding:9px;font-weight:800}.field-label-grid label span{font-size:12px;color:#64748b}.field-label-grid input{margin:0;background:#fff}.field-label-actions{position:sticky;bottom:-18px;background:#fff;border-top:1px solid #e2e8f0;padding:13px 0 2px;margin-top:14px;display:flex;gap:8px;justify-content:flex-end}@media(max-width:700px){.field-label-grid{grid-template-columns:1fr}.field-label-grid label{grid-template-columns:1fr}.field-label-actions{flex-direction:column}.field-label-actions button{width:100%}}


.quotation-item-card.contract-item-card{grid-template-columns:repeat(7,minmax(105px,1fr))}.contract-multi-table th,.contract-multi-table td{font-size:11px!important;padding:6px!important}@media(max-width:1100px){.quotation-item-card.contract-item-card{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:520px){.quotation-item-card.contract-item-card{grid-template-columns:1fr}}


/* شريط تنقل سفلي حديث ومضغوط للجوال */
@media (max-width:900px){
  body{padding-bottom:calc(82px + env(safe-area-inset-bottom))!important}
  body > .mobile-bottom-nav{
    display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    position:fixed!important;
    left:0!important;
    right:0!important;
    bottom:0!important;
    width:100vw!important;
    max-width:100vw!important;
    height:calc(70px + env(safe-area-inset-bottom))!important;
    padding:6px 8px calc(6px + env(safe-area-inset-bottom))!important;
    box-sizing:border-box!important;
    background:rgba(255,255,255,.96)!important;
    border:0!important;
    border-top:1px solid rgba(207,219,233,.86)!important;
    border-radius:22px 22px 0 0!important;
    box-shadow:0 -10px 30px rgba(18,50,82,.10)!important;
    backdrop-filter:blur(18px) saturate(150%)!important;
    -webkit-backdrop-filter:blur(18px) saturate(150%)!important;
    overflow:visible!important;
    z-index:2147482000!important;
  }
  body > .mobile-bottom-nav button{
    position:relative!important;
    display:flex!important;
    min-width:0!important;
    width:100%!important;
    height:58px!important;
    min-height:58px!important;
    margin:0!important;
    padding:5px 2px 4px!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    gap:3px!important;
    border:0!important;
    border-radius:16px!important;
    background:transparent!important;
    box-shadow:none!important;
    color:#6d7d91!important;
    font-size:10.5px!important;
    font-weight:750!important;
    line-height:1.05!important;
    white-space:nowrap!important;
    transition:background-color .16s ease,color .16s ease,box-shadow .16s ease!important;
    -webkit-tap-highlight-color:transparent!important;
    touch-action:manipulation!important;
  }
  body > .mobile-bottom-nav button > span:first-child{
    width:31px!important;
    height:31px!important;
    display:grid!important;
    place-items:center!important;
    margin:0!important;
    border-radius:11px!important;
    background:#f4f7fa!important;
    font-size:20px!important;
    line-height:1!important;
    transition:background-color .16s ease,transform .16s ease!important;
  }
  body > .mobile-bottom-nav button.active{
    color:#0f63cf!important;
    font-weight:900!important;
    background:#eef5ff!important;
    box-shadow:inset 0 0 0 1px #dceafe!important;
  }
  body > .mobile-bottom-nav button.active > span:first-child{
    background:#dcecff!important;
    transform:translateY(-1px)!important;
  }
  body > .mobile-bottom-nav button:active{
    background:#edf3f9!important;
  }
  body > .mobile-bottom-nav button.hidden{display:none!important}
  body > .mobile-bottom-nav .mobile-nav-notification-badge{
    position:absolute!important;
    top:1px!important;
    right:calc(50% - 24px)!important;
    min-width:18px!important;
    height:18px!important;
    padding:0 5px!important;
    margin:0!important;
    display:none!important;
    align-items:center!important;
    justify-content:center!important;
    border:2px solid #fff!important;
    border-radius:999px!important;
    background:#ef3f4b!important;
    color:#fff!important;
    font-size:9px!important;
    font-weight:900!important;
    line-height:1!important;
    box-shadow:0 2px 6px rgba(207,38,55,.22)!important;
    z-index:3!important;
  }
  body > .mobile-bottom-nav .mobile-nav-notification-badge.show{display:inline-flex!important}
  body:not(.maintenance-role) > .mobile-bottom-nav .maintenance-mobile-nav{display:none!important}
  body.maintenance-role > .mobile-bottom-nav .general-nav{display:none!important}
  body.maintenance-role > .mobile-bottom-nav .maintenance-mobile-nav{display:flex!important}
  main{padding-bottom:20px!important}
}
@media (max-width:390px){
  body > .mobile-bottom-nav{padding-inline:4px!important}
  body > .mobile-bottom-nav button{font-size:9.5px!important;border-radius:14px!important}
  body > .mobile-bottom-nav button > span:first-child{width:29px!important;height:29px!important;font-size:18px!important}
}



/* تصغير شريط المهام السفلي وإزالة الفراغ الأبيض الزائد */
@media (max-width:900px){
  html,body{margin-bottom:0!important}
  body{padding-bottom:64px!important}
  body > .mobile-bottom-nav{
    bottom:0!important;
    height:60px!important;
    min-height:60px!important;
    padding:3px 7px 2px!important;
    border-radius:17px 17px 0 0!important;
    box-shadow:0 -5px 18px rgba(18,50,82,.09)!important;
    align-items:center!important;
  }
  body > .mobile-bottom-nav button{
    height:52px!important;
    min-height:52px!important;
    padding:3px 2px 2px!important;
    gap:2px!important;
    border-radius:12px!important;
    font-size:10px!important;
    line-height:1!important;
  }
  body > .mobile-bottom-nav button > span:first-child{
    width:27px!important;
    height:27px!important;
    border-radius:9px!important;
    font-size:18px!important;
  }
  body > .mobile-bottom-nav button.active{
    border-radius:13px!important;
  }
  body > .mobile-bottom-nav .mobile-nav-notification-badge{
    top:0!important;
    right:calc(50% - 22px)!important;
    min-width:17px!important;
    height:17px!important;
    padding:0 4px!important;
    font-size:8.5px!important;
  }
  main{padding-bottom:68px!important}
  .quick-action-fab{bottom:70px!important}
  #scrollTopFab{bottom:70px!important}
  .quick-action-button,.floating-quick-action{bottom:70px!important}
}
@media (display-mode:standalone) and (max-width:900px){
  body{padding-bottom:calc(64px + env(safe-area-inset-bottom))!important}
  body > .mobile-bottom-nav{
    height:calc(60px + env(safe-area-inset-bottom))!important;
    min-height:calc(60px + env(safe-area-inset-bottom))!important;
    padding-bottom:calc(2px + env(safe-area-inset-bottom))!important;
  }
  main{padding-bottom:calc(68px + env(safe-area-inset-bottom))!important}
  .quick-action-fab,#scrollTopFab,.quick-action-button,.floating-quick-action{bottom:calc(70px + env(safe-area-inset-bottom))!important}
}
@media (max-width:390px){
  body > .mobile-bottom-nav{height:58px!important;min-height:58px!important;padding-inline:4px!important}
  body > .mobile-bottom-nav button{height:50px!important;min-height:50px!important;font-size:9.3px!important}
  body > .mobile-bottom-nav button > span:first-child{width:25px!important;height:25px!important;font-size:17px!important}
}

/* تجميع عهدة الفني حسب اسم القطعة - عرض مختصر مع تفاصيل قابلة للفتح */
#currentCustodyCard .custody-group-row td{vertical-align:middle}
#currentCustodyCard .custody-group-count{display:block;margin-top:4px;color:#718096;font-weight:700;font-size:11px}
#currentCustodyCard .custody-group-total{font-size:17px;color:#17365d}
#currentCustodyCard .custody-multi-badge,#currentCustodyCard .custody-variants-badge{display:inline-flex;align-items:center;justify-content:center;padding:5px 9px;border-radius:999px;background:#f3f6fa;border:1px solid #d8e1ec;color:#41566f;font-size:11px;font-weight:800;white-space:nowrap}
#currentCustodyCard .custody-variants-badge{background:#eef6ff;border-color:#cfe3f8;color:#245c8c}
#currentCustodyCard .custody-details-toggle{display:inline-flex!important;align-items:center;justify-content:center;gap:7px;min-height:36px;padding:7px 11px;border:1px solid #cbd8e6;border-radius:11px;background:#fff;color:#244868;font-weight:800;cursor:pointer;box-shadow:0 2px 7px rgba(28,60,92,.06)}
#currentCustodyCard .custody-details-toggle:hover{background:#f5f9fd}
#currentCustodyCard .custody-toggle-arrow{font-size:18px;line-height:1;transition:transform .18s ease}
#currentCustodyCard .custody-details-toggle.active .custody-toggle-arrow{transform:rotate(180deg)}
#currentCustodyCard .custody-toggle-count{display:inline-flex;min-width:22px;height:22px;padding:0 6px;align-items:center;justify-content:center;border-radius:999px;background:#eaf0f6;font-size:11px}
#currentCustodyCard .custody-details-row{display:none}
#currentCustodyCard .custody-details-row.custody-details-open{display:table-row}
#currentCustodyCard .custody-details-row>td{padding:0 10px 14px!important;background:#f8fbfe!important;border-top:0!important}
#currentCustodyCard .custody-details-panel{display:grid;grid-template-columns:repeat(auto-fit,minmax(270px,1fr));gap:9px;padding:11px;border:1px solid #dbe5ef;border-radius:13px;background:#f8fbfe}
#currentCustodyCard .custody-detail-card{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;align-items:center;padding:10px 11px;border:1px solid #dce6ef;border-radius:12px;background:#fff;box-shadow:0 3px 10px rgba(20,50,80,.04)}
#currentCustodyCard .custody-detail-card>div{min-width:0}
#currentCustodyCard .custody-detail-card span{display:block;margin-bottom:3px;color:#75869a;font-size:10px;font-weight:800}
#currentCustodyCard .custody-detail-card b{font-size:12px;color:#20364d;overflow-wrap:anywhere}
#currentCustodyCard .custody-detail-card small{display:block;margin-top:3px;color:#68788b;font-size:10px}
#currentCustodyCard .custody-detail-actions{display:flex;gap:6px;grid-column:1/-1;padding-top:7px;border-top:1px dashed #e2e8f0}
#currentCustodyCard .custody-detail-actions button{width:auto!important;min-height:34px!important;padding:6px 10px!important;margin:0!important}
@media(max-width:760px){
  #currentCustodyCard .custody-details-row.custody-details-open{display:block!important}
  #currentCustodyCard .custody-details-row>td{display:block!important;padding:0 2px 10px!important;border:0!important}
  #currentCustodyCard .custody-details-row>td::before{display:none!important}
  #currentCustodyCard .custody-details-panel{display:grid!important;grid-template-columns:1fr!important;padding:8px!important;gap:8px!important}
  #currentCustodyCard .custody-detail-card{grid-template-columns:1fr 1fr!important;padding:10px!important;gap:9px!important}
  #currentCustodyCard .custody-detail-actions{grid-column:1/-1!important;display:grid!important;grid-template-columns:1fr 1fr!important}
  #currentCustodyCard .custody-detail-actions button{width:100%!important}
  #currentCustodyCard .custody-details-toggle{width:100%!important}
}

/* Tajawal full-site override 2026-08-31 */
html,body,body *,button,input,select,textarea,label,table,th,td{font-family:'Tajawal',Tahoma,Arial,sans-serif !important;}
