#v2summary-inventory,#v2summary-maintenance{display:none!important}
#tab-inventory .ext-shortcuts,#tab-maintenance .ext-shortcuts{display:none!important}
.nj47-record{padding:0;border:1px solid #cbd5e1;border-radius:18px;background:#ffffff;color:#1e293b;width:min(960px,calc(100vw - 32px));max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);font:15px/1.8 Cairo,Arial,sans-serif;direction:rtl;box-shadow:0 20px 70px #0f172a55}
.nj47-record[open]{display:flex;flex-direction:column}
.nj47-record::backdrop{background:rgb(30 22 12 / 60%)}
.nj47-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 24px;border-bottom:1px solid #e2e8f0;background:#ffffff}
.nj47-heading h2{font-size:20px;font-weight:700;margin:2px 0;overflow-wrap:anywhere}.nj47-heading small{color:#64748b}
.nj47-record button{min-height:44px;border:1px solid #cbd5e1;border-radius:9px;padding:8px 16px;font:inherit;background:#f8fafc;color:#1a73e8;cursor:pointer}
.nj47-record button:focus-visible{outline:3px solid #1a73e8;outline-offset:3px}
.nj47-record button:disabled{opacity:.5;cursor:default}
.nj47-scroll{overflow:auto;overscroll-behavior:contain;padding:20px 24px;min-height:0}
.nj47-status{color:#99482f;white-space:pre-wrap}.nj47-status:empty{display:none}
.nj47-section{margin-bottom:20px;border:1px solid #e8f0fe;border-radius:12px;padding:16px;background:#fff}
.nj47-section h3{font-size:16px;font-weight:700;margin:0 0 12px}
.nj47-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:0}
.nj47-facts dt{font-size:12px;color:#64748b}.nj47-facts dd{margin:3px 0 0;white-space:pre-wrap;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.nj47-table{width:100%;border-collapse:collapse;table-layout:fixed}.nj47-table th,.nj47-table td{border-bottom:1px solid #e2e8f0;padding:10px;text-align:right;vertical-align:top;overflow-wrap:anywhere;white-space:pre-wrap}.nj47-table th{background:#f5f7fa;font-size:12px}
.nj47-footer{border-top:1px solid #e2e8f0;padding:14px 24px;background:#ffffff;display:flex;flex-wrap:wrap;gap:14px;justify-content:space-between;align-items:center}
.nj47-pager,.nj47-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.nj47-actions{margin-inline-start:auto}.nj47-pager span{font-size:12px;color:#64748b}
.nj47-record .nj20-add{background:#1a73e8;color:white;border-color:#1a73e8}
.nj48-transition{display:grid;gap:14px}
.nj48-transition label{display:grid;gap:5px}
.nj48-transition label[hidden],.nj48-transition[hidden]{display:none}
.nj47-pager[hidden],.nj48-card-action[hidden]{display:none!important}
.nj48-transition select,.nj48-transition textarea{width:100%;padding:8px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:inherit;font:inherit}
.nj48-transition button{justify-self:start}
.nj48-sale label{display:grid;gap:5px;margin:8px 0}
.nj48-sale select{width:100%;min-height:44px;padding:8px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:inherit;font:inherit}
.nj50-preview:not(:empty){padding:12px;margin:10px 0;background:#f5f7fa;border-radius:8px}
.nj48-sale input,.nj48-sale textarea{width:100%;padding:8px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:inherit;font:inherit}
.nj48-sale-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr));gap:12px}
.nj48-results{display:grid;gap:5px;max-height:200px;overflow:auto;margin-bottom:12px}
.nj48-results button{text-align:right;overflow-wrap:anywhere}
.nj48-sale-line{margin-block:12px;overflow-wrap:anywhere}
.nj48-sale-line button{margin:4px}
.nj48-sale-total{padding:12px;background:#f5f7fa;border-radius:8px;margin:10px 0}
@media(max-width:650px){
 .nj47-record{width:calc(100vw - 12px);max-width:calc(100vw - 12px);max-height:calc(100dvh - 12px);border-radius:14px}
 .nj47-heading,.nj47-footer{padding:12px}.nj47-heading{gap:8px}.nj47-heading h2{font-size:17px}
 .nj47-scroll{padding:12px}.nj47-section{padding:12px}.nj47-facts{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 .nj47-table thead{display:none}.nj47-table,.nj47-table tbody,.nj47-table tr{display:block}.nj47-table tbody tr{margin-bottom:12px;border:1px solid #e8f0fe;border-radius:9px;padding:6px}
 .nj47-table td{display:grid;grid-template-columns:minmax(72px,32%) minmax(0,1fr);gap:8px;border:0;padding:6px}.nj47-table td:before{content:attr(data-label);color:#64748b;font-size:12px}
 .nj47-actions,.nj47-actions button,.nj47-pager{width:100%}.nj47-pager{justify-content:center}.nj47-footer{gap:8px}.nj47-footer>.nj47-refresh{min-height:40px;padding:5px 12px}
}

.nj51-lines{display:grid;gap:12px}
.nj51-line{min-inline-size:0;margin:0;padding:10px 12px;border:1px solid #e2e8f0;border-radius:10px;background:#ffffff}
.nj51-line legend{font-weight:700;padding-inline:5px;overflow-wrap:anywhere;max-width:100%}
.nj51-line-details{display:flex;flex-wrap:wrap;gap:8px 16px;color:#334155}
.nj51-line label:has(input[type=checkbox]){display:flex;align-items:center;gap:8px;margin-block:8px}
.nj51-line label input[type=checkbox]{width:20px;min-height:20px;margin:0;accent-color:#1a73e8}
.nj51-line-error{color:#982d2b;background:#fff0ee;padding:8px;border-radius:6px}
@media(min-width:850px){
 .nj51-line{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1.5fr) minmax(0,1fr);align-items:center;gap:10px}
 .nj51-line textarea,.nj51-line .nj48-results,.nj51-line-error{grid-column:1/-1}
 .nj51-line label:has(textarea){grid-column:1/-1}
}

.nj52-returns{margin-block:12px;min-width:0}
.nj52-returns h4{margin:0 0 8px;font-weight:800}
.nj52-summary{color:#1a73e8;overflow-wrap:anywhere}
.nj52-returns details{margin-block:10px}
.nj52-returns summary{cursor:pointer;font-weight:700;padding:8px 0;color:#1a73e8}
.nj52-returns .nj47-table,.nj52-voucher .nj47-table{table-layout:fixed;overflow-wrap:anywhere}
.nj52-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-block:8px}
.nj52-actions button{background:#ffffff;color:#1a73e8;border:1px solid #cbd5e1;border-radius:9px;padding:5px 10px;min-height:40px}
.nj52-actions button.nj23-primary{background:#1a73e8;color:#fff}
.nj52-returns [hidden]{display:none!important}
.nj52-returns td.nj52-actions{display:table-cell}
.nj52-returns td.nj52-actions button{margin:2px;font-size:12px}
@media(max-width:650px){
 .nj52-returns td.nj52-actions{display:block}
 .nj52-returns .nj47-table td::before,.nj52-voucher .nj47-table td::before{white-space:normal}
}

.nj53-credit[hidden]{display:none!important}
.nj53-credit summary{cursor:pointer;font-weight:700;color:#1a73e8;padding-block:8px}
.nj53-credit label{display:grid;gap:5px;margin:8px 0}
.nj53-credit :is(input,textarea,select){width:100%;min-height:42px;padding:8px;border:1px solid #cbd5e1;border-radius:8px;background:#fff}
.nj53-credit-row{border-top:1px solid #e2e8f0;padding-block:10px;overflow-wrap:anywhere}

/* ==========================================================================
   Al-Najah v3 Modern Operational Dialogs (#nj47Record, #nj48Sale, #nj50Return)
   ========================================================================== */
.nj47-record{border-radius:24px;border:1px solid #cbd5e1;background:#ffffff;box-shadow:0 28px 80px rgba(15, 23, 42, .32);overflow:hidden}
.nj47-heading{padding:20px 26px;background:linear-gradient(180deg,#ffffff 0%,#f5f7fa 100%);border-bottom:1px solid #e2e8f0}
.nj47-heading h2{font-size:21px;font-weight:800;color:#1e293b}
.nj47-record button{border-radius:12px;font-weight:700;transition:background .15s,border-color .15s}
.nj47-record button:hover:not(:disabled):not(.nj20-add){background:#e8f0fe;border-color:#3b82f6}
.nj47-section{border-radius:18px;border:1px solid #e2e8f0;padding:20px;background:#fff;box-shadow:0 4px 16px rgba(15, 23, 42, .03)}
.nj47-section h3{font-size:16.5px;font-weight:800;color:#1557b0;padding-bottom:10px;border-bottom:1px solid #e8f0fe;margin-bottom:14px}
.nj47-facts>div{padding:10px 14px;background:#f5f7fa;border:1px solid #e8f0fe;border-radius:12px}
.nj47-facts dt{font-size:12px;color:#64748b;font-weight:600}
.nj47-facts dd{font-weight:700;color:#1e293b;margin-top:4px}
.nj47-table{border:1px solid #e2e8f0;border-radius:14px;overflow:hidden}
.nj47-table th{background:#eef2f6;color:#334155;font-weight:800;padding:12px 14px}
.nj47-table td{padding:12px 14px;border-bottom:1px solid #e8f0fe}
.nj47-footer{padding:16px 26px;background:#f5f7fa;border-top:1px solid #e2e8f0}
.nj48-sale input,.nj48-sale select,.nj48-sale textarea,.nj48-transition select,.nj48-transition textarea{border-radius:12px;border:1px solid #cbd5e1;padding:10px 14px}
.nj48-results button{border-radius:12px;background:#ffffff;border:1px solid #e2e8f0;padding:10px 14px}
.nj48-results button:hover{background:#e8f0fe;border-color:#3b82f6}
.nj48-sale-line{padding:16px;border:1px solid #e2e8f0;border-radius:16px;background:#ffffff;box-shadow:0 4px 12px rgba(15, 23, 42, .03)}
.nj48-sale-total,.nj50-preview:not(:empty){padding:16px 20px;background:linear-gradient(135deg,#e8f0fe,#e2e8f0);border:1px solid #cbd5e1;border-radius:16px;font-weight:700;color:#1e293b}
.nj51-line{border-radius:14px;border:1px solid #e2e8f0;padding:14px 16px;background:#ffffff}
@media(max-width:650px){
 .nj47-record{border-radius:20px;max-height:94dvh}
 .nj47-heading,.nj47-footer{padding:14px 16px}
 .nj47-section{padding:14px;border-radius:14px}
 .nj47-footer{position:sticky;bottom:0;z-index:4;box-shadow:0 -8px 24px rgba(15, 23, 42, .08)}
 .nj47-footer>div{width:100%;display:flex;flex-wrap:wrap;gap:8px}
 .nj47-footer>div button{flex:1 1 auto}
}
/* v3 Maintenance Detail Vertical Timeline Stepper */
.nj47-timeline-sec{background:linear-gradient(135deg,#ffffff 0%,#f5f7fa 100%)}
.nj47-timeline{list-style:none;margin:0;padding:4px 0 0;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;position:relative}
.nj47-tl-step{position:relative;display:grid;justify-items:center;text-align:center;gap:6px;padding:8px 4px;border-radius:12px;transition:background .15s}
.nj47-tl-dot{width:30px;height:30px;border-radius:999px;display:inline-grid;place-items:center;font-size:12px;font-weight:800;border:2px solid #cbd5e1;background:#fff;color:#64748b;position:relative;z-index:1}
.nj47-tl-title{font-size:11.5px;font-weight:700;color:#334155;line-height:1.3}
.nj47-tl-step[data-step="done"] .nj47-tl-dot{background:#15803d;border-color:#15803d;color:#fff}
.nj47-tl-step[data-step="done"] .nj47-tl-title{color:#15803d}
.nj47-tl-step[data-step="current"]{background:#f5f7fa;border:1px solid #cbd5e1}
.nj47-tl-step[data-step="current"] .nj47-tl-dot{background:linear-gradient(135deg,#1a73e8,#1a73e8);border-color:#1a73e8;color:#fff;box-shadow:0 0 0 4px rgba(15, 23, 42, .18)}
.nj47-tl-step[data-step="current"] .nj47-tl-title{color:#334155;font-weight:800}
.nj47-timeline-cancelled{margin:0;padding:10px 14px;border-radius:12px;background:#fef2f2;border:1px solid #fecaca;color:#b91c1c;font-weight:700}
@media(max-width:650px){
 .nj47-timeline{grid-template-columns:1fr;gap:4px;padding-inline-start:12px;border-inline-start:2px solid #e2e8f0}
 .nj47-tl-step{display:flex;align-items:center;justify-items:start;text-align:start;gap:12px;padding:8px 12px}
 .nj47-tl-step::before{display:none}
}
