/* V086 responsive shell, visual-consistency and accessibility corrections. */
@font-face{font-family:'TakamulUploaded';src:url('/api/portal/font/400') format('woff2');font-style:normal;font-weight:400;font-display:swap}
@font-face{font-family:'TakamulUploaded';src:url('/api/portal/font/700') format('woff2');font-style:normal;font-weight:700;font-display:swap}
html[data-font-source="custom"] :is(body,button,input,select,textarea,table,th,td,pre,code,header,nav,.card,.panel,#portalPrintLayout),
html[data-font-source="custom"] body *{font-family:'TakamulUploaded',Tahoma,Arial,sans-serif!important}
html[data-font-source="almarai"] body,html[data-font-source="almarai"] :is(button,input,select,textarea,table,th,td){font-family:'Almarai',Tahoma,Arial,sans-serif!important}
/* Guard against full-viewport sidebar expansion on standalone management pages. */
@media (min-width:921px){
  #shell.shell:not([hidden]),#portalSubpageShell.portal-subpage-shell:not([hidden]){display:grid!important;grid-template-columns:clamp(240px,19vw,305px) minmax(0,1fr)!important;align-items:start!important;max-width:100vw!important;}
  #shell.shell>.sidebar,#portalSubpageShell.portal-subpage-shell>.sidebar{width:100%!important;min-width:0!important;max-width:305px!important;grid-column:1!important;grid-row:1!important;position:sticky!important;top:0!important;height:100vh!important;overflow:auto!important;}
  #shell.shell>.content,#portalSubpageShell.portal-subpage-shell>.content{min-width:0!important;width:auto!important;max-width:100%!important;grid-column:2!important;grid-row:1!important;overflow:clip!important;}
}
@media (max-width:920px){#portalSubpageShell.portal-subpage-shell:not([hidden]){display:block!important} #portalSubpageShell>.sidebar{z-index:200!important;max-width:340px!important}}
/* Shared sizing: heading is singular in content, no oversized nested page title. */
.portal-subpage-body :is(main>h1,main .headline>h1){font-size:clamp(22px,2vw,31px)!important;line-height:1.45!important;max-width:100%;}
.portal-subpage-body :is(.card,.panel,section){min-width:0;}
.portal-subpage-body .workflow-journey{width:100%;max-width:100%;margin:12px 0 20px;}
.portal-subpage-body .workflow-journey .journey-steps{width:100%;}
.portal-subpage-body .workflow-journey .journey-detail:empty{display:none!important;}
.portal-subpage-body .workflow-journey .journey-detail{padding:10px 14px;}
.portal-subpage-body :is(table,.table){width:100%;}
.portal-subpage-body table :is(td,th){white-space:nowrap;}
.portal-subpage-body :is(.scroll,.portal-table-scroll){overflow-x:auto;}
/* Official logo appears once in the shared masthead; sidebar reserves space for the Takamul brand. */
body:has(#portalSubpageShell) #portalSubpageShell .sidebar .official-brand-logo{display:none!important}
body:has(#portalSubpageShell) #portalSubpageShell .sidebar .brand{min-height:76px!important;justify-content:center;}
.portal-subpage-header .portal-subpage-title{font-size:clamp(17px,1.6vw,23px)!important;line-height:1.5;}
.institution-masthead .institution-caption:empty,.portal-login-brand:empty{display:none!important}
img:not([src]),img[src=""],img[src="about:blank"]{display:none!important}
/* Native empty collections must carry a readable status message. */
.portal-empty-state{border:1px dashed var(--portal-border);background:var(--portal-surface);padding:20px 14px;margin:14px 0;border-radius:9px;color:var(--portal-primary);text-align:center;}
.portal-status-owner{font-size:12px;line-height:1.6;color:var(--portal-primary);font-weight:600;}
.workflow-journey .journey-step.flow-reference{opacity:1;border-style:dashed;}
.workflow-journey .journey-step.flow-reference small{color:#516a63}
.workflow-journey .journey-step.flow-current{box-shadow:0 0 0 3px color-mix(in srgb,var(--portal-gold) 23%,transparent)}
/* Accessible high-contrast navigation links */
body a:not(.button),.portal-subpage-body a:not(.button){text-decoration-thickness:1px;text-underline-offset:3px;}
.sidebar .nav-items a,.sidebar .nav-items button{font-weight:600!important;}
@media print{html[data-font-source="custom"] body *{font-family:'TakamulUploaded',Tahoma,Arial,sans-serif!important} .portal-subpage-header,.sidebar,.nav-mobile-toggle,.institution-masthead{display:none!important}}

.portal-review-dialog{width:min(94vw,940px);max-height:88dvh;overflow:auto;background:var(--portal-surface);color:var(--portal-primary);border:2px solid var(--portal-gold);border-radius:12px;z-index:1000;padding:20px}
.portal-review-dialog::backdrop{background:#071d19bb}
.portal-review-dialog pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:64vh;overflow:auto;direction:ltr;text-align:start;background:color-mix(in srgb,var(--portal-background) 87%,transparent);padding:14px;border-radius:9px;font-size:12px}

/* Remove blurred pseudo-indicators that obscure sidebar navigation. */
html[data-ambient] .department-group>summary::after{display:none!important}
.sidebar .department-group>summary::before{content:'›';display:inline-block;color:var(--portal-gold);font-weight:900;font-size:18px;vertical-align:middle;line-height:1;margin-inline-end:7px}
.content a:not([class]),.portal-subpage-body main a:not([class]){color:var(--portal-primary);text-decoration:underline}
html[data-theme="dark"] .portal-subpage-body main a{color:#b7d9c8}
.sidebar :is(a,button){text-decoration:none!important}
@media(max-width:768px){.portal-subpage-header{flex-direction:column;align-items:flex-start}.portal-subpage-header .header-actions{width:100%}.portal-subpage-body .workflow-journey .journey-step{flex-basis:76vw;max-width:270px}}
