/* System-wide text typography. Local Sakkal Majalla is preferred in both languages.
   Keep icon fonts and code fonts intact; retain each page's font sizes and weights. */
@font-face {
    font-family: "NW Arabic Fallback";
    src: url("/fonts/DroidNaskh-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "NW Arabic Fallback";
    src: url("/fonts/DroidNaskh-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}


/* NW platform reading standard: 12pt = 16 CSS px. Screen only; A4 is unchanged. */
@media screen {
 :root {--nw-system-font:Tahoma,Arial,"NW Arabic Fallback",sans-serif;--nw-text-body:16px;--nw-text-secondary:14px;}
 html:root body,
 html body :not(i):not(.fa):not(.glyphicon):not([class^="icon-"]):not([class*=" icon-"]):not([class^="m-icon-"]):not([class*=" m-icon-"]):not(.inv-code):not(.material-icons):not(.material-symbols-outlined):not(pre):not(code):not(kbd):not(samp):not(pre *):not(code *):not(kbd *):not(samp *) {font-family:var(--nw-system-font)!important;}
 html:root body {font-size:var(--nw-text-body)!important;line-height:1.45;color:#24344b;}
 html body :is(p,label,.table,.table>thead>tr>th,.table>tbody>tr>td,.form-control,.btn,.dropdown-menu,.dropdown-menu>li>a,.page-sidebar-menu>li>a,.page-sidebar-menu .sub-menu>li>a,.chosen-container,.select2-container,.select2-results,.dataTables_info,.dataTables_paginate) {font-size:var(--nw-text-body)!important;}
 html body :is(.form-control,input[type=text],input[type=number],input[type=date],input[type=datetime-local],input[type=password],input[type=email],input[type=search],select,textarea) {font-size:var(--nw-text-body)!important;line-height:1.4;}
 html body .form-control:not(textarea) {min-height:38px;}
 html body :is(small,.small,.help-block,.help-inline,.text-muted,.font-xs,.font-sm,.badge,.label,.nw-replacement-state,.yard-crew-reference,.yard-crew-source) {font-size:var(--nw-text-secondary)!important;}
 html body :is(.help-block,.help-inline,.text-muted) {color:#526176;}
 html body .portlet-title .caption {font-size:18px!important;}
 html body .page-header .username {font-size:14px!important;}
 /* Operational information stays readable without expanding or renumbering the four slots. */
 html body .op-page :is(.op-crew-member strong,.op-crew-current,.op-date,.op-date>span,.op-quick-record,.op-quick-allocate,.op-record-action,.op-status,.op-stage-detail,.op-heading p) {font-size:16px!important;}
 html body .op-page :is(.op-crew-caption,.op-crew-member small,.op-vehicle-caption,.op-mini-metric,.op-trip-alert,.op-progress-caption,.op-step-state,.op-place,.op-awaiting,.op-recorded,.op-equipment-status,.op-quick-extra,.op-step-toggle>b,.op-step>b,.op-clock-stack,.op-start-clock,.op-start-clock bdi) {font-size:14px!important;}
 html body .op-page .op-clock-stack {padding:2px 3px;}
 html body .op-page .op-clock-row {gap:3px;line-height:1.35;}
 html body .op-page .op-clock-row bdi {font-size:14px!important;min-width:0;}
 html body .op-page .op-eyebrow {font-size:12px!important;letter-spacing:1px;}
 html body .op-page .op-dot {font-size:14px!important;}
 html body .op-page .op-milestones {grid-template-columns:repeat(4,minmax(0,1fr))!important;}
 html body .nw-yard-page :is(.yard-state-summary .yard-summary-label,.yard-inspection-brief,.yard-section-meta,.yard-state,.yard-metric-ratio,.yard-scope,.yard-role,.yard-flow-caption,.yard-flow-stages>li,.yard-report-result,.yard-driver-indicator) {font-size:14px!important;}
 html body .nw-yard-page .yard-table .yard-action-strip>a.btn {font-size:16px!important;}
 html body :is(.incident-status,.incident-meta,.incident-note,.incident-timeline small,.inspection-question-ar,.inspection-question-en) {font-size:16px!important;}
 @media(max-width:450px){
  html body .op-page .op-clock-stack {width:100%;box-sizing:border-box;}
  html body .op-page .op-clock-row {flex-wrap:wrap;gap:0 2px;}
  html body .op-page .op-clock-row>span {font-size:14px!important;}
  html body .op-page .op-step {padding-inline-end:4px;}
 }
}

@media screen {html body :is([style*="font-size:8px" i],[style*="font-size: 8px" i],[style*="font-size:8pt" i],[style*="font-size: 8pt" i],[style*="font-size:9px" i],[style*="font-size: 9px" i],[style*="font-size:9pt" i],[style*="font-size: 9pt" i],[style*="font-size:10px" i],[style*="font-size: 10px" i],[style*="font-size:10pt" i],[style*="font-size: 10pt" i],[style*="font-size:11px" i],[style*="font-size: 11px" i],[style*="font-size:11pt" i],[style*="font-size: 11pt" i],[style*="font-size:12px" i],[style*="font-size: 12px" i],[style*="font-size:13px" i],[style*="font-size: 13px" i],[style*="font-size:xx-small" i],[style*="font-size:x-small" i],[style*="font-size: xx-small" i],[style*="font-size: x-small" i]):not(i):not(.fa):not(.glyphicon):not(svg *):not(pre *):not(code *) {font-size:16px!important;}}

/* Preserve the prior exact font, weight and sizing contract for printing. */
@media print {
:root { --nw-system-font: "Sakkal Majalla", "NW Arabic Fallback", Tahoma, Arial, sans-serif; }
html:root body,
html body :not(i):not(.fa):not(.glyphicon):not([class^="icon-"]):not([class*=" icon-"]):not([class^="m-icon-"]):not([class*=" m-icon-"]):not(.inv-code):not(.material-icons):not(.material-symbols-outlined):not(pre):not(code):not(kbd):not(samp):not(pre *):not(code *):not(kbd *):not(samp *) {
    font-family: var(--nw-system-font) !important;
    font-weight: 700 !important;
}

/* Slightly larger default text; individual page headings keep their hierarchy. */
html:root body { font-size: 17px !important; }
body .table, body .form-control, body .btn, body .dropdown-menu,
body .page-sidebar-menu > li > a { font-size: 17px; }

}

@media screen {
 /* Keep the readable type scale; remove repeated vertical whitespace. */
 html body .op-page .op-trip-line {padding:3px 9px!important;row-gap:1px!important;column-gap:8px!important;}
 html body .op-page .op-options-toggle {padding-inline:8px!important;max-width:100%;}
 html body .op-page .op-timeline {display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:2px 6px;}
 html body .op-page .op-timeline>.op-trip-alert {grid-column:1;grid-row:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
 html body .op-page .op-timeline>.op-progress-caption {grid-column:2;grid-row:1;align-self:center;}
 html body .op-page .op-progress-caption>span {position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;}
 html body .op-page .op-timeline>.op-progress {grid-column:1/-1;grid-row:2;align-self:center;}
 html body .op-page .op-timeline>.op-milestones {grid-column:1/-1;grid-row:3;}
 html body .op-page .op-timeline>.op-expanded-stages,html body .op-page .op-timeline>.op-trip-details {grid-column:1/-1;}
 html body .op-page .op-expanded-stages:not(:has(.op-stage-detail:not([hidden]))) {display:none!important;}
 html body .op-page .op-bus-empty {font-size:16px!important;white-space:nowrap;}
 html body .op-page .op-milestones {margin-top:6px!important;}
 html body .op-page .op-milestones>.op-step>.op-step-toggle {gap:2px!important;padding-top:30px!important;padding-bottom:0!important;}
 html body .op-page .op-step-toggle>b {line-height:1.15!important;min-height:0;}
 html body .op-page .op-step-toggle .op-place {line-height:1.2!important;max-height:17px!important;}
 html body .op-page .op-clock-stack {line-height:1.15!important;gap:0!important;padding:1px 3px!important;}
 html body .op-page .op-clock-row {line-height:1.2!important;flex-wrap:nowrap!important;}
 html body .op-page .op-progress-caption {line-height:1.2!important;margin:0 0 2px!important;}
 html body .op-page .op-crew-current {gap:3px 8px!important;}
 html body .op-page .op-crew-member:only-child {grid-column:1/-1;}
 html body .op-page .op-crew-caption,html body .op-page .op-vehicle-caption {font-size:14px!important;line-height:1.2!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
 html body .op-page .op-crew-member strong {line-height:1.2!important;}
 html body .op-page .op-crew-member small {line-height:1.2!important;margin-top:0!important;}
 html body .op-page .op-trip-alert {line-height:1.2!important;padding:3px 6px!important;margin-bottom:2px!important;}
 html body .op-page .op-date {line-height:1.2!important;}
 html body .op-page .op-start-clock {margin-top:0!important;line-height:1.2!important;}
 html body .nw-yard-page .yard-table td {padding-top:0!important;padding-bottom:0!important;line-height:1.2!important;}
 html body .nw-yard-page .yard-table td[data-yard-col=time],html body .nw-yard-page .yard-table td[data-yard-col=time] span {font-size:16px!important;line-height:1.2!important;}
 html body .nw-yard-page .yard-table td:is([data-yard-col=pretrip],[data-yard-col=posttrip],[data-yard-col=recheck],[data-yard-col=approval]):has(.btn) {line-height:0!important;}
 html body .nw-yard-page .yard-table td .btn {vertical-align:top!important;}
 html body .nw-yard-page .yard-table .yard-state {font-size:14px!important;line-height:1.2!important;white-space:nowrap;min-height:24px;padding:2px 6px!important;}
 html body .nw-yard-page .yard-table .yard-action-strip>a.btn {line-height:1.2!important;padding-top:5px!important;padding-bottom:5px!important;}
 html body .nw-yard-page .yard-table .yard-action-strip>a.btn:not(.yard-primary-action):not(.yard-wash-action) {font-size:14px!important;}
 html body .nw-yard-page .yard-table .yard-action-strip {gap:4px!important;margin-top:4px!important;}
 html body .nw-yard-page .yard-inspection-brief {line-height:1.2!important;margin:2px 0!important;}
 @media(min-width:851px){
  html body .nw-yard-page .yard-table .btn {white-space:nowrap!important;padding-inline:8px!important;line-height:1.2!important;}
  html body .nw-yard-page .yard-report-tools {white-space:nowrap!important;}
  html body .nw-yard-page .yard-report-tools>.btn-group,html body .nw-yard-page .yard-current-report {float:none!important;display:inline-flex!important;vertical-align:middle;width:auto!important;}
 }
 @media(max-width:850px){
  html body .op-page .op-stage-label-full {position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;}
  html body .op-page .op-stage-label-short[hidden] {display:inline!important;}

  html body .nw-yard-page .yard-table tr:has(>td) {padding:3px 8px!important;row-gap:4px!important;}
  html body .nw-yard-page .yard-table td[data-yard-col=bus] {gap:2px 3px!important;}
  html body .nw-yard-page .yard-bus-number {font-size:28px!important;line-height:1.2!important;}
  html body .nw-yard-page .yard-table td {padding-top:0!important;padding-bottom:0!important;}
  html body .nw-yard-page .yard-table td[data-yard-col=bus] {gap:2px 3px!important;}
  html body .nw-yard-page .yard-table [id*="_Label4_"],html body .nw-yard-page .yard-table [id*="_Label9_"] {font-size:26px!important;}
  html body .op-page .op-trip-line {grid-template-columns:24px minmax(0,1fr) minmax(0,1fr) 40px!important;grid-template-areas:"select identity bus actions" "crew crew crew crew" "date date status status" "timeline timeline timeline timeline"!important;}
  html body .op-page .op-crew-member small {display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  html body .op-page .op-date {display:flex!important;align-items:center;gap:7px;}
  html body .op-page .op-date .op-start-clock {display:inline-flex!important;}
  html body .op-page .op-status {text-align:end!important;}
  html body .op-page .op-clock-row>span {position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important;}
  html body .op-page .op-clock-row::before {display:inline-block;font:14px/1.2 Arial,sans-serif;color:inherit;}
  html body .op-page .op-clock-plan::before {content:"◷";}
  html body .op-page .op-clock-actual::before {content:"✓";}
  html body .op-page .op-clock-row {justify-content:center!important;gap:3px!important;}
 }
 @media(max-width:450px){
  html body .nw-yard-page .yard-action-strip>a.btn {padding-inline:4px!important;}
  html body .nw-yard-page .yard-action-strip>a.btn:has(>span)>.fa {display:none!important;}
  html body .nw-yard-page .yard-state-full {position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;}
  html body .nw-yard-page .yard-state-short[hidden] {display:inline!important;}
 }
 @media(max-width:360px){html body .op-page .op-trip-line {padding-block:2px!important;}}
}
