/* DIAR-UI-1 R3 — Module Navigation Continuity Closure */
.diar-command-page{
    --diar-ink:#143d49;
    --diar-muted:#687f87;
    --diar-line:#dbe7ea;
    --diar-soft:#f4f9fa;
    --diar-teal:#17766f;
    --diar-teal-dark:#0d4551;
    --diar-success:#197b62;
    --diar-warning:#b77712;
    --diar-danger:#a93344;
    display:grid;
    gap:20px;
    min-width:0;
    color:var(--diar-ink);
    font-size:16px;
    line-height:1.55;
}
[dir=rtl] .diar-command-page{font-size:17px}
.diar-command-page *{box-sizing:border-box}
.diar-command-page a:focus-visible,.diar-command-page button:focus-visible,.diar-command-page input:focus-visible,.diar-command-page select:focus-visible{outline:3px solid rgba(23,118,111,.3);outline-offset:2px}

.diar-module-tabs{
    display:flex;
    gap:8px;
    min-width:0;
    overflow-x:auto;
    padding:8px;
    border:1px solid var(--diar-line);
    border-radius:17px;
    background:#fff;
    box-shadow:0 7px 24px rgba(33,73,89,.05);
    scrollbar-width:thin;
    scroll-snap-type:x proximity;
}
.diar-module-tabs a{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    min-height:46px;
    padding:8px 14px;
    border-radius:12px;
    color:#45636c;
    font-weight:800;
    text-decoration:none;
    white-space:nowrap;
    scroll-snap-align:start;
}
.diar-module-tabs a:hover{background:#eef7f7;color:var(--diar-teal)}
.diar-module-tabs a.active{background:var(--diar-teal);color:#fff}
.tab-meta{display:inline-flex;padding:3px 7px;border-radius:999px;font-size:10px;line-height:1.2;font-weight:900;letter-spacing:.03em;background:#edf3f4;color:#5e747c}
.diar-module-tabs a.active .tab-meta{background:rgba(255,255,255,.18);color:#fff}
.tab-meta-review{background:#fff1cc;color:#725813}
.tab-meta-governance{background:#eee8fb;color:#5c3e88}

.diar-scope-strip{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    padding:13px 16px;
    border:1px solid #d8e6e8;
    border-radius:16px;
    background:linear-gradient(90deg,#f7fbfb,#eef7f6);
}
.diar-scope-identity{display:grid;gap:1px;min-width:0}
.scope-kicker{font-size:11px;font-weight:900;letter-spacing:.12em;color:var(--diar-teal)}
.diar-scope-identity strong{font-size:16px;color:var(--diar-ink)}
.diar-scope-badges{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:7px}
.scope-badge{display:inline-flex;align-items:center;min-height:30px;padding:4px 9px;border-radius:999px;font-size:11px;font-weight:900;white-space:nowrap}
.scope-hospital{background:#dff1ef;color:#155f5a}
.scope-readonly{background:#e8eef7;color:#334f77}
.scope-pending{background:#fff0d2;color:#76560d}

.diar-command-hero,.diar-subpage-hero{
    display:flex;
    justify-content:space-between;
    gap:26px;
    align-items:center;
    min-width:0;
    padding:27px 30px;
    border-radius:25px;
    background:linear-gradient(135deg,#0b3744,#17646d);
    color:#fff;
    box-shadow:0 17px 42px rgba(19,58,75,.14);
}
.hero-copy{min-width:0}
.diar-command-hero h1,.diar-subpage-hero h1{margin:7px 0 7px;font-size:clamp(31px,2.7vw,41px);line-height:1.1;color:#fff;overflow-wrap:anywhere}
.diar-command-hero p,.diar-subpage-hero p{margin:0;max-width:930px;font-size:16px;line-height:1.68;color:#dceff1}
.eyebrow{font-weight:900;letter-spacing:.11em;font-size:12px;color:#9ee9df}
.hero-boundary{flex:0 0 330px;display:grid;gap:7px;padding:18px;border:1px solid rgba(255,255,255,.22);border-radius:18px;background:rgba(255,255,255,.08)}
.boundary-label{font-size:11px;font-weight:900;letter-spacing:.1em;text-transform:uppercase;color:#9ee9df}
.hero-boundary strong{font-size:20px;line-height:1.25}
.hero-boundary span:not(.boundary-label){font-size:14px;color:#dceff1;line-height:1.55}
.hero-action{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:10px 18px;border:1px solid rgba(255,255,255,.28);border-radius:13px;color:#fff;background:rgba(255,255,255,.08);text-decoration:none;font-weight:900;white-space:nowrap}
.hero-action:hover{background:rgba(255,255,255,.16)}

.diar-command-alert{display:grid;gap:3px;padding:14px 17px;border-radius:15px;font-weight:700}
.diar-command-alert span{font-weight:500}
.diar-command-alert.warning{background:#fff5da;color:#705812;border:1px solid #ecd998}
.diar-command-alert.error{background:#fde8eb;color:#8e2635;border:1px solid #efbec6}
.diar-command-alert.success{background:#eaf7f1;color:#175e4e;border:1px solid #bfe1d4}
.diar-command-alert.info{background:#eef6f8;color:#345d68;border:1px solid #cee0e4}
.semantic-boundary{grid-template-columns:auto 1fr;align-items:start;column-gap:12px}

.diar-command-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;min-width:0}
.diar-command-kpis article{display:grid;gap:7px;min-width:0;padding:20px;border:1px solid var(--diar-line);border-radius:20px;background:#fff;box-shadow:0 9px 27px rgba(33,73,89,.055)}
.diar-command-kpis>article>span{font-size:14px;color:#657b83}
.diar-command-kpis>article>strong{font-size:clamp(29px,2.4vw,38px);line-height:1.08;color:#123e4b;overflow-wrap:anywhere}
.diar-command-kpis>article>small{font-size:13px;color:#758990}
.diar-command-kpis .kpi-running{border-top:4px solid #1f8a80}
.diar-command-kpis .kpi-attention{border-top:4px solid #bd4b57}
.movement-kpi strong{display:flex;align-items:baseline;gap:7px}
.movement-kpi strong em{font-size:13px;font-style:normal;font-weight:800;color:#617981}
.run-health-kpi{align-content:start}
.kpi-triplet{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.kpi-triplet>span{display:grid;gap:2px;min-width:0;padding:9px 7px;border-radius:11px;background:#f3f8f8;text-align:center}
.kpi-triplet strong{font-size:24px;line-height:1;color:#123e4b}
.kpi-triplet small{font-size:11px;color:#6a8088;overflow-wrap:anywhere}

.diar-command-section{min-width:0;padding:22px;border:1px solid var(--diar-line);border-radius:23px;background:#fff;box-shadow:0 11px 32px rgba(33,73,89,.065)}
.section-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:17px}
.section-heading h2{margin:0 0 5px;font-size:25px;line-height:1.2;color:#123e4b}
.section-heading p{margin:0;color:#6d838b}
.section-heading>strong{font-size:27px}
.command-link{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 14px;border-radius:11px;background:#e8f6f4;color:#176f67;text-decoration:none;font-weight:900;white-space:nowrap}

.hospital-readiness-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px;min-width:0}
.hospital-readiness-card{display:grid;gap:17px;min-width:0;padding:21px;border:1px solid var(--diar-line);border-radius:21px;background:#fbfdfd;position:relative;overflow:hidden}
.hospital-readiness-card:before{content:"";position:absolute;inset:0 auto 0 0;width:5px;background:#91a6ac}
.hospital-readiness-card.readiness-ready:before{background:#208d82}
.hospital-readiness-card.readiness-final_validation:before{background:#247ea0}
.hospital-readiness-card.readiness-in_progress:before,.hospital-readiness-card.readiness-partial:before{background:#d89927}
.hospital-readiness-card.readiness-attention:before,.hospital-readiness-card.readiness-unavailable:before{background:#b83c4a}
.hospital-card-head{display:flex;justify-content:space-between;gap:17px;align-items:flex-start;min-width:0}
.hospital-card-head>div{min-width:0}
.hospital-card-head h3{margin:4px 0 2px;font-size:22px;color:#123e4b;overflow-wrap:anywhere}
.hospital-card-head small{color:#71868d}
.hospital-code{display:inline-flex;width:max-content;padding:5px 9px;border-radius:999px;background:#e8f3f4;color:#315c67;font-size:12px;font-weight:900;letter-spacing:.06em}
.readiness-badge,.run-status,.effect-badge,.mapping-badge{display:inline-flex;width:max-content;align-items:center;justify-content:center;padding:6px 10px;border-radius:999px;font-size:12px;font-weight:900;white-space:nowrap}
.readiness-ready,.status-pass{background:#def3eb;color:#17684e}
.readiness-final_validation{background:#e1f0f6;color:#1b6078}
.readiness-in_progress,.readiness-partial,.status-running,.status-pending{background:#fff1cc;color:#785d10}
.readiness-not_started{background:#eaf0f2;color:#526a73}
.readiness-attention,.readiness-unavailable,.status-failed,.status-cancelled{background:#fde7ea;color:#9b2938}
.coverage-row{display:grid;gap:8px}
.coverage-row>div:first-child{display:flex;justify-content:space-between;gap:12px}
.coverage-row span{color:#657b83}
.coverage-track{height:10px;border-radius:999px;background:#e5edef;overflow:hidden}
.coverage-track span{display:block;height:100%;border-radius:999px;background:#208d82}
.coverage-caption{font-size:12px;color:#7a6a3b}
.coverage-caption.coverage-complete{color:#1b6e59}
.hospital-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.hospital-metrics>div,.hospital-contract>div{display:grid;gap:4px;min-width:0;padding:13px;border:1px solid #e0eaec;border-radius:14px;background:#fff}
.hospital-metrics span,.hospital-contract dt{font-size:13px;color:#6e838a}
.hospital-metrics strong{font-size:18px;color:#143f4c;overflow-wrap:anywhere}
.run-snapshot{display:grid;grid-template-columns:1fr auto;gap:6px 12px;min-width:0;padding:15px;border-radius:16px;background:#eff6f7}
.run-snapshot>div{display:grid;min-width:0}
.run-snapshot span:not(.run-status),.run-snapshot small{color:#657b83;overflow-wrap:anywhere}
.run-snapshot p{grid-column:1/-1;margin:5px 0 0;color:#8b2a37;overflow-wrap:anywhere}
.hospital-contract{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0}
.hospital-contract dd{margin:0;font-weight:800;color:#173e49;overflow-wrap:anywhere}
.site-error{padding:14px;border-radius:13px;background:#fde7ea;color:#942837}

.pipeline-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:11px}
.pipeline-step{display:flex;gap:11px;align-items:center;min-width:0;padding:15px;border-radius:16px;border:1px solid #e0e9eb;background:#f8fbfb}
.step-number{display:inline-flex;align-items:center;justify-content:center;flex:0 0 34px;height:34px;border-radius:50%;background:#dfeaec;color:#315d67;font-weight:900}
.pipeline-step div{display:grid;gap:2px;min-width:0}
.pipeline-step strong,.pipeline-step small{overflow-wrap:anywhere}
.pipeline-step small{font-size:12px;color:#71868d}
.pipeline-pass{border-color:#b7dfd1;background:#f0faf6}
.pipeline-pass .step-number{background:#208d82;color:#fff}
.pipeline-in_progress{border-color:#ecd797;background:#fffaf0}
.pipeline-in_progress .step-number{background:#d89a2b;color:#fff}
.pipeline-pending{opacity:.74}

.quick-link-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.quick-link-grid a{display:grid;align-content:start;gap:6px;min-height:132px;padding:17px;border:1px solid #dfe9eb;border-radius:17px;background:#f9fcfc;color:#153d4a;text-decoration:none;transition:transform .15s ease,box-shadow .15s ease}
.quick-link-grid a:hover{transform:translateY(-2px);box-shadow:0 12px 28px rgba(33,73,89,.09)}
.quick-link-grid strong{font-size:18px}
.quick-link-grid a>span:not(.quick-status){color:#6c8289}
.quick-status{display:inline-flex;width:max-content;padding:4px 8px;border-radius:999px;font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.04em}
.quick-status.live{background:#def3eb;color:#17684e}
.quick-status.review{background:#fff1cc;color:#725813}
.quick-status.governance{background:#eee8fb;color:#5c3e88}

.diar-command-filters,.diar-fact-filters{display:grid;grid-template-columns:2fr repeat(3,minmax(150px,1fr));gap:13px;min-width:0;padding:19px;border:1px solid var(--diar-line);border-radius:21px;background:#fff;align-items:end}
.diar-fact-filters{grid-template-columns:repeat(5,minmax(135px,1fr))}
.field{display:grid;gap:7px;min-width:0}
.field label{font-size:14px;font-weight:900;color:#244e59}
.field input,.field select{width:100%;min-height:48px;padding:10px 12px;border:1px solid #cbdcdf;border-radius:13px;background:#f9fcfc;color:#173f4b;font:inherit;box-sizing:border-box}
.filter-actions{display:flex;justify-content:flex-end;gap:9px;grid-column:1/-1}
.primary-button,.secondary-button{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:9px 17px;border-radius:12px;font-weight:900;text-decoration:none;border:0;cursor:pointer}
.primary-button{background:#208d82;color:#fff}.primary-button:hover{background:#17776e}.primary-button:disabled{opacity:.65;cursor:wait}
.secondary-button{border:1px solid #bdced2;background:#fff;color:#244e59}

.dictionary-version-card{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;min-width:0;padding:19px;border:1px solid var(--diar-line);border-radius:21px;background:#fff}
.dictionary-version-card>div{display:grid;gap:5px;min-width:0;padding:13px;border-radius:14px;background:#f6fafb}
.dictionary-version-card span{font-size:13px;color:#6d8289}
.dictionary-version-card strong{font-size:19px;overflow-wrap:anywhere}
.dictionary-version-card .hash-field{grid-column:1/-1}
.dictionary-version-card code,.compact-hash{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:Consolas,monospace;font-size:12px;color:#48636b}

.command-table-wrap{max-width:100%;overflow:auto;border:1px solid #e1eaec;border-radius:17px}
.command-table{width:100%;border-collapse:collapse;min-width:1100px}
.command-table th{padding:13px 14px;background:#f1f7f8;text-align:left;color:#536d75;font-size:13px;white-space:nowrap}
.command-table td{padding:15px 14px;border-top:1px solid #e7eff1;vertical-align:top;overflow-wrap:anywhere}
.command-table td strong,.command-table td span,.command-table td small,.command-table td code{display:block}
.command-table td span,.command-table td small{margin-top:4px;color:#6c8188;line-height:1.45}
.movement-code{font-size:23px}.effect-0{background:#e8eff2;color:#4d6871}.effect-1{background:#def3eb;color:#17684e}.effect-2{background:#fff0dc;color:#955613}
.mapping-source_only{background:#eaf2f4;color:#385f68}.mapping-classified{background:#e1f5ed;color:#17684e}.mapping-retired{background:#eceff0;color:#6b777c}.error-code{color:#a02b3b}
.pagination{display:flex;justify-content:center;align-items:center;gap:18px;margin-top:18px}.pagination a{min-height:44px;display:inline-flex;align-items:center;color:#176f67;font-weight:900}
.empty-state{padding:30px;text-align:center;color:#71868d;background:#f7fafb;border-radius:16px}
.facts-kpis{margin-top:0}
[dir=rtl] .command-table th{text-align:right}
[dir=rtl] .hospital-readiness-card:before{left:auto;right:0}

@media(max-width:1350px){
    .diar-command-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
    .pipeline-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
    .diar-fact-filters{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:1000px){
    .diar-command-hero,.diar-subpage-hero{flex-direction:column;align-items:stretch}
    .hero-boundary{flex:auto}
    .hospital-readiness-grid{grid-template-columns:1fr}
    .diar-command-filters{grid-template-columns:repeat(2,minmax(0,1fr))}
    .search-wide{grid-column:1/-1}
    .dictionary-version-card{grid-template-columns:repeat(2,minmax(0,1fr))}
    .pipeline-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
    .diar-scope-strip{align-items:flex-start}
}
@media(max-width:720px){
    .diar-command-page{gap:15px;font-size:16px}
    [dir=rtl] .diar-command-page{font-size:17px}
    .diar-module-tabs{margin-inline:-2px;padding:6px}
    .diar-module-tabs a{min-height:46px;padding:7px 11px}
    .tab-meta{display:none}
    .diar-scope-strip{flex-direction:column;gap:10px;padding:12px}
    .diar-scope-badges{justify-content:flex-start}
    .diar-command-hero,.diar-subpage-hero,.diar-command-section{padding:17px;border-radius:19px}
    .diar-command-hero h1,.diar-subpage-hero h1{font-size:29px}
    .diar-command-hero p,.diar-subpage-hero p{font-size:15px;line-height:1.58}
    .hero-boundary{padding:15px}
    .hero-action{width:100%}
    .semantic-boundary{grid-template-columns:1fr}
    .diar-command-kpis,.diar-command-filters,.diar-fact-filters,.hospital-metrics,.hospital-contract,.dictionary-version-card,.pipeline-grid{grid-template-columns:1fr}
    .dictionary-version-card .hash-field,.search-wide{grid-column:auto}
    .filter-actions{justify-content:stretch;flex-direction:column}
    .filter-actions>*{width:100%}
    .hospital-card-head,.section-heading{flex-direction:column}
    .hospital-card-head{align-items:flex-start}
    .kpi-triplet{grid-template-columns:repeat(3,minmax(0,1fr))}
    .command-table-wrap{border:0;overflow:visible}
    .command-table{min-width:0;display:block}
    .command-table thead{display:none}
    .command-table tbody{display:grid;gap:13px}
    .command-table tr{display:grid;gap:0;border:1px solid #dfe9eb;border-radius:16px;background:#fff;overflow:hidden}
    .command-table td{display:grid;grid-template-columns:minmax(106px,.78fr) minmax(0,1.45fr);gap:11px;border-top:1px solid #edf2f3;padding:12px 13px;min-width:0}
    .command-table td:first-child{border-top:0}
    .command-table td:before{content:attr(data-label);font-size:12px;font-weight:900;color:#526f78;overflow-wrap:anywhere}
    .command-table td>*{min-width:0}
    .compact-hash,.dictionary-version-card code{white-space:normal;overflow-wrap:anywhere;word-break:break-all}
    .quick-link-grid{grid-template-columns:1fr}
}
@media(max-width:430px){
    .diar-command-page{gap:13px}
    .diar-command-hero h1,.diar-subpage-hero h1{font-size:27px}
    .diar-command-kpis article{padding:17px}
    .kpi-triplet{gap:5px}
    .kpi-triplet>span{padding:8px 4px}
    .kpi-triplet strong{font-size:21px}
    .scope-badge{font-size:10px}
    .command-table td{grid-template-columns:1fr;gap:4px}
    .command-table td:before{padding-bottom:2px}
}
@media(prefers-reduced-motion:reduce){.quick-link-grid a{transition:none}}


/* DIAR_UI1_R3_MODULE_NAVIGATION_CONTINUITY */
.quick-link-grid.operational-only{grid-template-columns:repeat(3,minmax(0,1fr))}
.diar-module-boundary{margin-top:18px;padding:18px 20px;border:1px solid #d7e3e8;border-radius:18px;background:#f7fafb;display:grid;grid-template-columns:minmax(240px,.8fr) minmax(0,1.8fr);gap:18px;align-items:center;color:#284b57}
.diar-module-boundary>div{display:grid;gap:6px}
.diar-module-boundary strong{font-size:18px;line-height:1.35;color:#123f4b}
.diar-module-boundary p{margin:0;font-size:15px;line-height:1.65;color:#607985}
.boundary-status{display:inline-flex;width:max-content;min-height:30px;align-items:center;padding:4px 10px;border-radius:999px;background:#fff1ca;color:#7a5a00;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
@media(max-width:1000px){.quick-link-grid.operational-only{grid-template-columns:1fr 1fr}.diar-module-boundary{grid-template-columns:1fr}}
@media(max-width:720px){.quick-link-grid.operational-only{grid-template-columns:1fr}.diar-module-boundary{padding:16px;border-radius:16px}.diar-module-boundary strong{font-size:17px}}

/* DIAR_UI1_R3_ARABIC_SIDEBAR_CONTINUITY */
html.diar-ui1-r3-active .diar-layout-sidebar{
    box-sizing:border-box;
}
html.diar-ui1-r3-active .diar-layout-sidebar a,
html.diar-ui1-r3-active .diar-layout-sidebar button,
html.diar-ui1-r3-active .diar-layout-sidebar [role="menuitem"]{
    min-height:44px;
}
html[dir="rtl"].diar-ui1-r3-active .diar-layout-sidebar{
    direction:rtl!important;
    text-align:right!important;
}
html[dir="rtl"].diar-ui1-r3-active .diar-layout-sidebar nav,
html[dir="rtl"].diar-ui1-r3-active .diar-layout-sidebar [class*="nav"],
html[dir="rtl"].diar-ui1-r3-active .diar-layout-sidebar a,
html[dir="rtl"].diar-ui1-r3-active .diar-layout-sidebar button,
html[dir="rtl"].diar-ui1-r3-active .diar-layout-sidebar [role="menuitem"]{
    direction:rtl!important;
    text-align:right!important;
}
html[dir="rtl"].diar-ui1-r3-active .diar-layout-sidebar a,
html[dir="rtl"].diar-ui1-r3-active .diar-layout-sidebar button,
html[dir="rtl"].diar-ui1-r3-active .diar-layout-sidebar [role="menuitem"]{
    justify-content:flex-start;
}
html[dir="rtl"].diar-ui1-r3-active .diar-layout-parent.diar-layout-grid{
    direction:rtl!important;
}
html[dir="rtl"].diar-ui1-r3-active .diar-layout-parent.diar-layout-grid>.diar-layout-sidebar{
    grid-column:1!important;
    grid-row:1!important;
}
html[dir="rtl"].diar-ui1-r3-active .diar-layout-parent.diar-layout-grid>.diar-layout-main{
    grid-column:2!important;
    grid-row:1!important;
    min-width:0;
}
html[dir="rtl"].diar-ui1-r3-active .diar-layout-parent.diar-layout-flex{
    flex-direction:row-reverse!important;
}
html[dir="rtl"].diar-ui1-r3-active .diar-layout-sidebar-fixed{
    left:auto!important;
    right:0!important;
}
html[dir="rtl"].diar-ui1-r3-active .diar-layout-main-fixed-offset{
    margin-left:0!important;
    margin-right:var(--diar-shell-sidebar-width,240px)!important;
}
html:not([dir="rtl"]).diar-ui1-r3-active .diar-layout-sidebar-fixed{
    left:0!important;
    right:auto!important;
}
html:not([dir="rtl"]).diar-ui1-r3-active .diar-layout-main-fixed-offset{
    margin-left:var(--diar-shell-sidebar-width,240px)!important;
    margin-right:0!important;
}
@media(max-width:1000px){
    html.diar-ui1-r3-active{--diar-shell-sidebar-width:76px}
}
@media(max-width:720px){
    html[dir="rtl"].diar-ui1-r3-active .diar-layout-sidebar-fixed{
        left:auto!important;
        right:0!important;
    }
    html.diar-ui1-r3-active .diar-layout-main-fixed-offset{
        margin-left:0!important;
        margin-right:0!important;
    }
}
@media(max-width:720px){
    html[dir="rtl"].diar-ui1-r3-active .diar-layout-main-fixed-offset,
    html:not([dir="rtl"]).diar-ui1-r3-active .diar-layout-main-fixed-offset{
        margin-left:0!important;
        margin-right:0!important;
    }
}

/* DIAR-UI-3 R0 — Statistical profile and controlled candidate workspace */
.tab-meta-profile{background:#e1f0f6;color:#1b6078}
.tab-meta-prepared{background:#eee8fb;color:#5c3e88}
.scope-profile{background:#e1f0f6;color:#1b6078}
.profile-kpis{grid-template-columns:repeat(5,minmax(0,1fr))}
.profile-kpis article.readiness-ready{border-top:4px solid #208d82}
.profile-kpis article.readiness-limited{border-top:4px solid #d89927}
.profile-kpis article.readiness-sparse{border-top:4px solid #7864a8}
.profile-kpis article.readiness-no_activity{border-top:4px solid #85979e}
.readiness-limited{background:#fff1cc;color:#785d10}
.readiness-sparse{background:#eee8fb;color:#5c3e88}
.readiness-no_activity{background:#eaf0f2;color:#526a73}
.profile-pending-alert small{display:block;margin-top:6px;font-weight:600;overflow-wrap:anywhere}
.profile-contract-panel{border-top:4px solid #247ea0}
.profile-live-chip{display:inline-flex;width:max-content;align-items:center;justify-content:center;min-height:31px;padding:5px 10px;border-radius:999px;background:#eaf0f2;color:#526a73;font-size:12px;font-weight:900;white-space:nowrap}
.profile-live-chip.status-live{background:#def3eb;color:#17684e}
.profile-live-chip.status-empty_ready,.profile-live-chip.status-pending_5d,.profile-live-chip.status-pending_diar_5e_r1{background:#fff1cc;color:#785d10}
.profile-contract-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.profile-contract-grid>div{display:grid;gap:4px;min-width:0;padding:14px;border:1px solid #e0eaec;border-radius:14px;background:#f9fcfc}
.profile-contract-grid>div.wide{grid-column:1/-1}
.profile-contract-grid span{font-size:13px;color:#6e838a}
.profile-contract-grid strong{color:#173e49;overflow-wrap:anywhere}
.diar-profile-filters{display:grid;grid-template-columns:repeat(5,minmax(130px,1fr));gap:12px;padding:19px;border:1px solid var(--diar-line);border-radius:21px;background:#fff;box-shadow:0 9px 27px rgba(33,73,89,.05);align-items:end}
.diar-profile-filters .field-search{grid-column:span 2}
.diar-profile-filters .field{display:grid;gap:7px;min-width:0}
.diar-profile-filters label{font-size:13px;font-weight:900;color:#31545f}
.diar-profile-filters input,.diar-profile-filters select{width:100%;min-height:48px;border:1px solid #cbdcdf;border-radius:13px;background:#f9fcfc;padding:10px 12px;font:inherit;color:#173e49}
.diar-profile-filters .filter-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:9px}
.profile-table-wrap{max-height:720px}
.profile-table{min-width:1540px}
.profile-table td{vertical-align:top;min-width:145px}
.profile-table td:first-child{min-width:230px}
.profile-table td span,.profile-table td small{display:block;margin-top:5px;color:#6d838b;line-height:1.45}
.profile-table code{display:inline-flex;max-width:180px;padding:3px 6px;border-radius:7px;background:#edf3f4;color:#315c67;font-size:12px;overflow-wrap:anywhere}
.diar-empty-state{display:grid;gap:5px;place-items:center;min-height:170px;padding:28px;border:1px dashed #bfd1d5;border-radius:17px;background:#f8fbfb;text-align:center;color:#607981}
.diar-empty-state strong{font-size:19px;color:#244e59}
.candidate-boundary-alert{border-left:5px solid #d89927}
[dir=rtl] .candidate-boundary-alert{border-left:1px solid #ecd998;border-right:5px solid #d89927}
.candidate-site-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.candidate-site-card{display:grid;gap:14px;padding:18px;border:1px solid #dce8eb;border-radius:18px;background:#fbfdfd}
.candidate-site-card>div:first-child{display:flex;justify-content:space-between;gap:12px;align-items:center}
.candidate-site-card dl{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:0}
.candidate-site-card dl>div{display:grid;gap:3px;padding:10px;border-radius:11px;background:#eff6f7;text-align:center}
.candidate-site-card dt{font-size:12px;color:#6d838b}.candidate-site-card dd{margin:0;font-size:20px;font-weight:900;color:#173e49}
.candidate-contract-layout{display:grid;grid-template-columns:1.2fr .8fr;gap:18px;min-width:0}
.signal-contract-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
.signal-contract-grid article{display:grid;gap:5px;padding:15px;border:1px solid #dce8eb;border-radius:15px;background:#f9fcfc}
.signal-contract-grid span{font-size:11px;color:#71868d;overflow-wrap:anywhere}.signal-contract-grid strong{font-size:16px;color:#173e49}
.binding-list,.grain-flow{display:flex;flex-wrap:wrap;gap:8px}
.binding-list span,.grain-flow span{display:inline-flex;align-items:center;min-height:34px;padding:6px 10px;border-radius:999px;background:#edf3f4;color:#315c67;font-size:12px;font-weight:900;overflow-wrap:anywhere}
.grain-flow span{background:#e8f6f4;color:#176f67}
.candidate-filter-preview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) auto;gap:12px;align-items:end;margin-bottom:14px;opacity:.68}
.candidate-filter-preview>div{display:grid;gap:6px}.candidate-filter-preview label{font-size:13px;font-weight:900;color:#31545f}
.candidate-filter-preview input{width:100%;min-height:46px;border:1px solid #d7e2e5;border-radius:12px;padding:10px;background:#f2f6f7;color:#71868d}
.candidate-filter-preview button{min-height:46px;border:0;border-radius:12px;padding:10px 16px;background:#c9d6d9;color:#607981;font-weight:900}
.quick-status.profile{background:#e1f0f6;color:#1b6078}.quick-status.prepared{background:#eee8fb;color:#5c3e88}
.pipeline-grid{grid-template-columns:repeat(6,minmax(0,1fr))}
.pipeline-prepared{border-color:#d8ccec;background:#f8f5fd}.pipeline-prepared .step-number{background:#eee8fb;color:#5c3e88}
.diar-command-kpis.executive-kpis{grid-template-columns:repeat(5,minmax(0,1fr))}
@media (max-width:1280px){
  .profile-kpis,.diar-command-kpis.executive-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}
  .diar-profile-filters{grid-template-columns:repeat(3,minmax(0,1fr))}
  .profile-contract-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .pipeline-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:900px){
  .profile-kpis,.diar-command-kpis.executive-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .diar-profile-filters{grid-template-columns:repeat(2,minmax(0,1fr))}
  .profile-contract-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .candidate-contract-layout{grid-template-columns:1fr}
  .candidate-site-card dl{grid-template-columns:repeat(2,minmax(0,1fr))}
  .candidate-filter-preview{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:640px){
  .profile-kpis,.diar-command-kpis.executive-kpis,.candidate-site-grid,.signal-contract-grid{grid-template-columns:1fr}
  .diar-profile-filters,.profile-contract-grid,.candidate-filter-preview{grid-template-columns:1fr}
  .diar-profile-filters .field-search{grid-column:auto}
  .profile-contract-grid>div.wide{grid-column:auto}
  .diar-profile-filters .filter-actions{justify-content:stretch}.diar-profile-filters .filter-actions>*{flex:1}
  .candidate-site-card dl{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pipeline-grid{grid-template-columns:1fr}
}

