/* DIAR-6B.3-R3 — Evidence browser integration and RTL structural closure. */
body[data-native-sidebar-page^="diar-"]{overflow-x:hidden!important}
body[data-native-sidebar-page^="diar-"] .elite-shell,
body[data-native-sidebar-page^="diar-"] .elite-main,
body[data-native-sidebar-page^="diar-"] .elite-topbar,
body[data-native-sidebar-page^="diar-"] .diar-context-nav,
body[data-native-sidebar-page^="diar-"] .diar-premium-page,
body[data-native-sidebar-page^="diar-"] .diar-cases-page,
body[data-native-sidebar-page^="diar-"] .frozen-evidence-page{box-sizing:border-box;min-width:0;max-width:none}
body[data-native-sidebar-page^="diar-"] .elite-main{overflow-x:clip!important;width:auto!important;margin:0!important}

/* Platform home is a breadcrumb; module pages remain the only tabs. */
.diar-context-nav{display:flex!important;align-items:center!important;gap:14px!important;width:100%!important;padding:10px 16px!important;overflow:hidden!important}
.diar-context-breadcrumb{display:flex;align-items:center;gap:9px;flex:0 0 auto;border-inline-end:1px solid #dfe7ef;padding-inline-end:14px}
.diar-context-breadcrumb span{color:#8a9aa7;font-weight:900}
.diar-context-home{padding:0!important;background:transparent!important;box-shadow:none!important;color:#087d70!important;font-weight:900!important;white-space:nowrap}
.diar-context-tabs{display:flex;align-items:center;gap:7px;min-width:0;overflow-x:auto;scrollbar-width:thin;padding:2px}
.diar-context-tabs>a{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:9px 16px;border-radius:12px;white-space:nowrap;color:#294d5b;font-weight:850;text-decoration:none}
.diar-context-tabs>a.active{background:linear-gradient(135deg,#7750e8,#8c55e9);color:#fff;box-shadow:0 8px 18px rgba(119,80,232,.22)}

/* Exact physical placement removes logical-property ambiguity in Arabic. */
@media (min-width:761px){
 html[dir="ltr"] body[data-native-sidebar-page^="diar-"] .elite-shell[data-native-shell-contract="R4"]{display:grid!important;grid-template-columns:296px minmax(0,1fr)!important;grid-template-areas:"sidebar main"!important;width:100%!important;max-width:none!important;margin:0!important}
 html[dir="rtl"] body[data-native-sidebar-page^="diar-"] .elite-shell[data-native-shell-contract="R4"]{display:grid!important;grid-template-columns:minmax(0,1fr) 296px!important;grid-template-areas:"main sidebar"!important;width:100%!important;max-width:none!important;margin:0!important}
 body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"]{grid-area:sidebar!important;position:fixed!important;top:0!important;bottom:0!important;width:296px!important;height:100dvh!important;margin:0!important;transform:none!important;translate:none!important;z-index:90!important}
 html[dir="ltr"] body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"]{left:0!important;right:auto!important}
 html[dir="rtl"] body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"]{right:0!important;left:auto!important}
 body[data-native-sidebar-page^="diar-"] .elite-main[data-native-main-contract="R4"]{grid-area:main!important;width:100%!important;min-width:0!important;max-width:none!important;margin:0!important;padding-inline:32px!important}
 body[data-native-sidebar-page^="diar-"] .elite-topbar--diar-premium{left:auto!important;right:auto!important;width:100%!important;max-width:none!important;margin-inline:0!important;box-sizing:border-box!important}
 html[dir="rtl"] body[data-native-sidebar-page^="diar-"] .elite-topbar--diar-premium{direction:rtl!important}
 html[dir="rtl"] body[data-native-sidebar-page^="diar-"] .elite-topbar--diar-premium .elite-branch-select{order:1}
 html[dir="rtl"] body[data-native-sidebar-page^="diar-"] .elite-topbar--diar-premium .elite-search{order:2}
 html[dir="rtl"] body[data-native-sidebar-page^="diar-"] .elite-topbar--diar-premium .elite-meta{order:3}
 html[dir="rtl"] body[data-native-sidebar-page^="diar-"] .elite-topbar--diar-premium .elite-lang{order:4}
 html[dir="rtl"] body[data-native-sidebar-page^="diar-"] .elite-topbar--diar-premium .elite-user{order:5}
}

/* Arabic alignment and text flow. */
html[dir="rtl"] body[data-native-sidebar-page^="diar-"]{direction:rtl;text-align:right}
html[dir="rtl"] body[data-native-sidebar-page^="diar-"] .elite-sidebar,
html[dir="rtl"] body[data-native-sidebar-page^="diar-"] .elite-sidebar *{text-align:right}
html[dir="rtl"] body[data-native-sidebar-page^="diar-"] .elite-brand,
html[dir="rtl"] body[data-native-sidebar-page^="diar-"] .native-nav-group-toggle,
html[dir="rtl"] body[data-native-sidebar-page^="diar-"] .native-nav-item{direction:rtl}
html[dir="rtl"] .diar-context-nav{direction:rtl}
html[dir="rtl"] .diar-context-breadcrumb{border-inline-end:0;border-inline-start:1px solid #dfe7ef;padding-inline-end:0;padding-inline-start:14px}
html[dir="rtl"] .diar-context-breadcrumb span{transform:scaleX(-1)}
html[dir="rtl"] .cases-table th,html[dir="rtl"] .cases-table td,
html[dir="rtl"] .evidence-table-wrap th,html[dir="rtl"] .evidence-table-wrap td{text-align:right}

/* Case browser: full identity, visible action, internal scrolling only. */
.page-diar-cases .cases-table-card{overflow:hidden!important;min-width:0!important}
.page-diar-cases .cases-table-wrap{width:100%!important;max-width:100%!important;overflow:auto!important;overscroll-behavior-inline:contain;scrollbar-gutter:stable}
.page-diar-cases .cases-table{width:max-content!important;min-width:1450px!important;table-layout:auto!important}
.page-diar-cases .cases-table th,.page-diar-cases .cases-table td{min-width:125px;vertical-align:top}
.page-diar-cases .cases-table th:nth-child(1),.page-diar-cases .cases-table td:nth-child(1){min-width:120px}
.page-diar-cases .cases-table th:nth-child(2),.page-diar-cases .cases-table td:nth-child(2){min-width:130px}
.page-diar-cases .cases-table th:nth-child(9),.page-diar-cases .cases-table td:nth-child(9){min-width:155px;max-width:190px}
.page-diar-cases .cases-table th:nth-child(10),.page-diar-cases .cases-table td:nth-child(10){min-width:155px}
.cases-reference-link{display:inline-flex;color:#0b746b;font-weight:900;text-decoration:underline;text-underline-offset:3px;white-space:nowrap}
.cases-actions-cell{background:#fbfdfd}
.cases-evidence-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:40px;padding:8px 12px;border:1px solid #bcded9;border-radius:11px;background:#eaf7f5;color:#086d63;font-weight:900;text-decoration:none;white-space:nowrap}
.cases-evidence-button:hover,.cases-evidence-button:focus-visible{background:#d9f0ed;outline:2px solid rgba(8,109,99,.18);outline-offset:2px}
.cases-technical-contract{border:1px solid #dce7ec;border-radius:18px;background:#fff;padding:14px 18px}
.cases-technical-contract>summary{cursor:pointer;font-weight:900;color:#315966}

/* Frozen evidence workspace. */
.frozen-evidence-page{width:100%!important;display:grid;gap:18px}
.evidence-heading-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.primary-button,.secondary-button{display:inline-flex;align-items:center;justify-content:center;min-height:43px;padding:9px 15px;border-radius:11px;font-weight:900;text-decoration:none}
.primary-button{background:#7750e8;color:#fff}.secondary-button{border:1px solid #cbdde2;background:#f6fafb;color:#214d59}
.related-grid>a{display:grid;gap:8px;padding:16px;border:1px solid #dce8eb;border-radius:15px;background:#fff;color:inherit;text-decoration:none;min-width:0}
.related-grid>a:hover{border-color:#75bdb3;box-shadow:0 8px 22px rgba(36,91,98,.09)}
.related-grid>a div,.related-grid>a footer{display:flex;justify-content:space-between;gap:10px}
.evidence-error-card{padding:28px;border:1px solid #edc0c4;border-radius:20px;background:#fff7f7}
.evidence-inline-warning{margin-bottom:14px;padding:12px 14px;border-radius:12px;background:#fff6dd;color:#775400;font-weight:800}
.evidence-risk-card{min-width:220px}

/* Investigation queue actions. */
.investigation-case-link{color:#0b746b;text-decoration:underline;text-underline-offset:3px;font-weight:900}
.investigation-row-actions{display:flex;flex-wrap:wrap;gap:7px;align-items:center}
.investigation-evidence-link,.investigation-open-link{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:7px 10px;border-radius:10px;font-size:12px;font-weight:900;text-decoration:none;white-space:nowrap}
.investigation-evidence-link{background:#e8f6f3;color:#087166;border:1px solid #bfe0da}.investigation-open-link{background:#f1eafe;color:#7142cf;border:1px solid #d8c8f5}

/* Keep every DIAR page inside the available main column. */
body[data-native-sidebar-page^="diar-"] :is(.cases-hero,.cases-filter-card,.cases-kpi-grid,.cases-table-card,.executive-dashboard-header,.executive-grid-top,.executive-grid-analytics,.readiness-card,.evidence-hero,.evidence-card)>*{min-width:0}
body[data-native-sidebar-page^="diar-"] :is(.cases-hero,.cases-filter-card,.cases-kpi-grid,.cases-table-card,.executive-dashboard-header,.executive-grid-top,.executive-grid-analytics,.readiness-card,.frozen-evidence-page){width:100%!important;max-width:none!important}

@media (max-width:1280px){
 body[data-native-sidebar-page^="diar-"] .elite-main[data-native-main-contract="R4"]{padding-inline:20px!important}
 .page-diar-cases .cases-table{min-width:1380px!important}
}
@media (max-width:1000px){
 .evidence-heading-actions{justify-content:flex-start}
 .diar-context-nav{align-items:flex-start!important}.diar-context-tabs{width:100%}
}
@media (max-width:760px){
 body[data-native-sidebar-page^="diar-"] .elite-main[data-native-main-contract="R4"]{padding-inline:12px!important;width:100%!important}
 html[dir="ltr"] body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"]{left:0!important;right:auto!important;transform:translateX(-105%)!important}
 html[dir="rtl"] body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"]{right:0!important;left:auto!important;transform:translateX(105%)!important}
 html[dir="ltr"] body.sidebar-open[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"],
 html[dir="rtl"] body.sidebar-open[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"]{transform:none!important}
 .diar-context-nav{display:grid!important;gap:7px!important;padding:9px!important}
 .diar-context-breadcrumb{border:0!important;padding:0!important}.diar-context-tabs{width:100%}
 .evidence-hero{align-items:stretch}.evidence-risk-card{min-width:0!important}
 .evidence-heading-actions{width:100%}.evidence-heading-actions a{flex:1 1 100%}
 .page-diar-cases .cases-table-wrap{overflow:visible!important;border:0!important}
 .page-diar-cases .cases-table{display:block!important;min-width:0!important;width:100%!important}
 .page-diar-cases .cases-table thead{display:none!important}
 .page-diar-cases .cases-table tbody{display:grid;gap:14px}
 .page-diar-cases .cases-table tr{display:grid!important;grid-template-columns:1fr 1fr;gap:10px;padding:14px;border:1px solid #dce8eb;border-radius:16px;background:#fff}
 .page-diar-cases .cases-table td{display:grid!important;gap:4px;min-width:0!important;padding:6px!important;border:0!important;position:static!important;background:transparent!important}
 .page-diar-cases .cases-table td::before{content:attr(data-label);color:#6e838b;font-size:11px;font-weight:800}
 .page-diar-cases .cases-table td.cases-actions-cell{grid-column:1/-1}
 .cases-evidence-button{width:100%}
}
@media (max-width:480px){.page-diar-cases .cases-table tr{grid-template-columns:1fr}.page-diar-cases .cases-table td.cases-actions-cell{grid-column:auto}}
