/* Employee ERP v14.9.4 — stability-first reference UI.
   Respects native RTL/LTR shell positioning and avoids business-logic/layout rewrites. */
@media (min-width:761px){
  html[dir="rtl"][data-ui-theme="neo3d"] .sidebar{right:0!important;left:auto!important;width:248px!important;padding:14px 12px!important}
  html[dir="rtl"][data-ui-theme="neo3d"] main{margin-right:248px!important;margin-left:0!important}
  html[dir="ltr"][data-ui-theme="neo3d"] .sidebar{left:0!important;right:auto!important;width:248px!important;padding:14px 12px!important}
  html[dir="ltr"][data-ui-theme="neo3d"] main{margin-left:248px!important;margin-right:0!important}
}
html[data-ui-theme="neo3d"] .brand{padding:6px 7px 15px!important}.brand-logo{width:44px!important;height:44px!important}
html[data-ui-theme="neo3d"] .sidebar-nav{gap:2px!important}.sidebar-nav>details>summary,.sidebar-nav>a{min-height:43px!important;padding-block:9px!important}
html[data-ui-theme="neo3d"] .topbar-v2{min-height:68px!important;height:68px!important;padding:7px 16px!important}
html[data-ui-theme="neo3d"] .topbar-action-card{height:48px!important;min-width:52px!important}.topbar-action-card small{font-size:8px!important}
html[data-ui-theme="neo3d"] .user-chip{min-height:48px!important}.header-clock{font-size:9px!important}
html[data-ui-theme="neo3d"] .content{padding:14px 16px 22px!important}

/* Reference dashboard, but without changing application shell direction. */
.reference-dashboard{margin-top:0!important}.dashboard-command-hero{display:none!important}
.reference-kpis{grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:10px!important;margin-bottom:10px!important}
.ref-kpi{min-height:84px!important;padding:10px 11px!important;border-radius:13px!important;box-shadow:0 7px 20px rgba(15,23,42,.055)!important}
.ref-kpi>span{width:40px!important;height:40px!important;font-size:20px!important}.ref-kpi strong{font-size:22px!important;line-height:1.05!important}.ref-kpi small{font-size:10px!important}.ref-kpi em{font-size:9px!important;margin-top:5px!important}
.reference-main-grid{grid-template-columns:minmax(0,2.62fr) minmax(260px,.88fr)!important;gap:10px!important;align-items:stretch!important}
html[dir="rtl"] .reference-main-grid{direction:rtl!important}html[dir="ltr"] .reference-main-grid{direction:ltr!important}
.reference-map-area,.reference-side{direction:inherit!important}.reference-side{gap:9px!important}.ref-card{padding:11px!important;border-radius:12px!important}.ref-card-head{margin-bottom:7px!important}.ref-card-head h3{font-size:13px!important}

/* Map: preserve interaction and 1000x470 coordinate system. */
.approved-map-layout{grid-template-columns:116px minmax(0,1fr)!important;gap:8px!important}
html[dir="rtl"] .approved-map-layout{direction:rtl!important}html[dir="ltr"] .approved-map-layout{direction:ltr!important}
.approved-map-filter{direction:inherit!important;padding:9px!important;border-radius:11px!important}.approved-map-filter label,.approved-map-filter .filter-label{font-size:9px!important}.approved-map-filter select,.geo-view-tabs button,.geo-3d-toggle{font-size:9px!important;min-height:31px!important}
.approved-world-map{aspect-ratio:1000/470!important;border-radius:11px!important;overflow:hidden!important;isolation:isolate!important}
.geo-map-toolbar{inset-inline-end:8px!important;top:8px!important}.geo-map-toolbar button{width:29px!important;height:29px!important}
.approved-world-map .geo-route{stroke-width:1.35!important;opacity:.68!important}.approved-world-map .geo-pin-dot{filter:drop-shadow(0 0 8px rgba(22,132,255,.9))!important}
.approved-world-map .geo-pin-count{font-size:10.5px!important;font-weight:900!important;fill:#fff!important}.approved-world-map .geo-pin-country{display:none;font-size:9px!important;font-weight:800!important;paint-order:stroke;stroke-width:2.6px!important;stroke:#061321!important;fill:#eef8ff!important}
.approved-world-map .geo-pin-major .geo-pin-country{display:block!important}html[data-theme="light"] .approved-world-map .geo-pin-country{stroke:#f7fbff!important;fill:#20466d!important}
.geo-map-legend{font-size:9px!important;padding:5px 8px!important}
html[data-theme="dark"] .approved-world-map{box-shadow:inset 0 0 0 1px rgba(76,153,255,.13),inset 0 -60px 80px rgba(0,43,82,.12)!important}
html[data-theme="light"] .approved-world-map{box-shadow:inset 0 0 0 1px rgba(88,130,174,.12)!important}

/* Nationality flags: clearer, larger and local-only. */
.approved-top-nationalities{padding-top:9px!important}.approved-top-head{margin-bottom:7px!important}.approved-top-head strong{font-size:12px!important}
.approved-top-nationalities .geo-map-list{display:grid!important;grid-template-columns:repeat(9,minmax(0,1fr))!important;gap:6px!important}
.approved-top-nationalities .geo-map-list>a{min-width:0!important;padding:7px 6px!important;border-radius:9px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:5px!important}
.nationality-label{display:flex!important;align-items:center!important;gap:6px!important;min-width:0!important}.nationality-label b{font-size:9px!important;font-weight:800!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}.nationality-flag{width:27px!important;height:18px!important;object-fit:cover!important;border-radius:3px!important;box-shadow:0 0 0 1px rgba(15,23,42,.18),0 2px 6px rgba(15,23,42,.12)!important;flex:0 0 auto!important}.geo-map-list>a>strong{font-size:12px!important}

.legacy-dashboard-section{margin-top:14px!important}.legacy-dashboard-title{padding:10px 13px!important;border-radius:11px!important}.legacy-dashboard-title h2{font-size:15px!important}
html[data-theme="dark"] .ref-kpi,html[data-theme="dark"] .ref-card,html[data-theme="dark"] .approved-geo-card{box-shadow:inset 0 1px rgba(255,255,255,.025),0 9px 24px rgba(0,0,0,.18)!important}
html[data-theme="light"] .reference-dashboard{--line:#dbe6f2}.reference-dashboard a{text-decoration:none}

/* Health page readability and diagnostic status clarity. */
.health-summary,.health-grid{max-width:100%!important}.health-card{min-height:112px!important}.health-card em{line-height:1.45!important;overflow-wrap:anywhere!important}
.health-card.bad{border-color:rgba(220,38,38,.30)!important}.health-card.warn{border-color:rgba(245,158,11,.30)!important}.health-card.ok{border-color:rgba(34,197,94,.18)!important}

@media(max-width:1350px){.reference-kpis{grid-template-columns:repeat(3,minmax(0,1fr))!important}.approved-top-nationalities .geo-map-list{grid-template-columns:repeat(5,minmax(0,1fr))!important}}
@media(max-width:1050px){.reference-main-grid{grid-template-columns:1fr!important}.reference-side{grid-template-columns:repeat(3,minmax(0,1fr))!important}.approved-top-nationalities .geo-map-list{grid-template-columns:repeat(4,minmax(0,1fr))!important}}
@media(max-width:760px){.reference-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}.reference-side{grid-template-columns:1fr!important}.approved-map-layout{grid-template-columns:1fr!important}.approved-map-filter{grid-template-columns:repeat(2,minmax(0,1fr))!important}.approved-top-nationalities .geo-map-list{grid-template-columns:repeat(3,minmax(0,1fr))!important}.content{padding:11px!important}}
@media(max-width:480px){.reference-kpis{grid-template-columns:1fr 1fr!important}.approved-top-nationalities .geo-map-list{grid-template-columns:repeat(2,minmax(0,1fr))!important}.nationality-flag{width:24px!important;height:16px!important}}
