/* HR reference foundation shared by existing Blade and Inertia admin surfaces. */
body.sam-admin-unified{--sam-admin-header:#173b35;--sam-admin-rail:#203c43;--sam-admin-canvas:#e7edf0;--sam-admin-panel:#f8fafb;--sam-admin-border:#d4dee2;background:var(--sam-admin-canvas)!important;color:#182d34}
.sam-admin-unified.portal-page>div>header{background:var(--sam-admin-header)!important;border-color:var(--sam-admin-border)}
.sam-admin-unified.portal-page>div>header h1{color:#fff!important}
.sam-admin-unified.portal-page>div>footer{display:none}
.sam-admin-unified :where(i[class*="ri-"],svg.lucide){color:#000!important}
.sam-admin-unified :where(header,aside) i[class*="ri-"]{background:#edf3f4;border-radius:6px;padding:3px;flex-shrink:0}
.sam-admin-unified :where(.admin-shell-header,body>header,.sam-unified-react-header){background:var(--sam-admin-header)!important;border-color:var(--sam-admin-header)!important;box-shadow:none!important;backdrop-filter:none}
.sam-admin-unified :where(.admin-shell-header,body>header,.sam-unified-react-header)>div{max-width:none!important}
.sam-admin-unified :where(.admin-shell-header,body>header,.sam-unified-react-header) :where(b,strong,.text-slate-900,.text-slate-950){color:#fff!important}
.sam-admin-unified :where(.admin-shell-header,body>header,.sam-unified-react-header) :where(small,.text-slate-500,.text-slate-400){color:#c0d4d0}
.sam-admin-unified :where(.admin-shell-header,body>header,.sam-unified-react-header) a:has(.ri-arrow-right-up-line){display:inline-flex!important;background:#edf3f4!important;color:#173b35!important;border-radius:8px}
.sam-admin-unified :where(.admin-shell-sidebar,.enterprise-admin-sidebar){background:var(--sam-admin-rail)!important;border-color:var(--sam-admin-border);top:56px;height:calc(100dvh - 56px)}
.sam-admin-unified :where(.admin-shell-sidebar,.enterprise-admin-sidebar) :where(button,a){color:#e4eef0}
.sam-admin-unified :where(.admin-shell-sidebar,.enterprise-admin-sidebar) :where(.admin-shell-sidebar__head,.enterprise-sidebar-copy){background:transparent!important;color:#fff}
.sam-admin-unified :where(.admin-shell-sidebar,.enterprise-admin-sidebar) :where(strong,small){color:#e4eef0!important}
.sam-admin-unified :where(.admin-shell-sidebar,.enterprise-admin-sidebar) [data-enterprise-nav-group]{border-color:#446069!important;background:transparent!important}
.sam-admin-unified :where(.admin-shell-sidebar,.enterprise-admin-sidebar) [data-enterprise-nav-item]:hover{background:#35515a!important;color:#fff!important}
.sam-admin-unified :where(.admin-shell-body,.enterprise-admin-shell){min-height:calc(100dvh - 56px)}
.sam-admin-unified :where(main){min-width:0}
.sam-admin-unified :where(main>section,main>div.rounded-2xl,main>div.rounded-3xl){border-color:var(--sam-admin-border)!important;border-radius:12px!important;box-shadow:none}
.sam-admin-unified :where(main h1){font-size:22px;line-height:1.5}
.sam-admin-unified :where(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),select,textarea){border-radius:8px;border-color:var(--sam-admin-border)}
.sam-admin-unified :where([role=tablist]){background:var(--sam-admin-panel);border:1px solid var(--sam-admin-border);border-radius:10px;padding:4px;gap:4px}
.sam-admin-unified :where([role=tab][aria-selected=true]){background:#173b35;color:#fff}
.sam-admin-unified :where(th){background:#f1f5f6;border-color:var(--sam-admin-border)}
.sam-admin-unified :where(a,button,input,select,textarea):focus-visible{outline:2px solid #376b60;outline-offset:3px}
/* Existing React navigation becomes a right rail + contextual links, without moving nodes. */
.sam-unified-react-header{height:56px}
.sam-unified-react-header nav[aria-label="منوی مدیریت"]{display:block!important;border:0!important;padding:0!important}
.sam-unified-react-header nav[aria-label="منوی مدیریت"]>div:first-child{position:fixed;inset:56px 0 0 auto;display:flex;flex-direction:column;width:72px;max-width:72px;height:calc(100dvh - 56px);overflow-y:auto;background:var(--sam-admin-rail);border:0;border-radius:0;padding:8px 4px;gap:6px}
.sam-unified-react-header nav[aria-label="منوی مدیریت"]>div:first-child>button{flex-direction:column;justify-content:center;white-space:normal;width:64px;min-height:62px;height:auto;padding:7px 3px;font-size:9px;line-height:1.4;color:#e7f0f1;gap:4px}
.sam-unified-react-header nav[aria-label="منوی مدیریت"]>div:last-child{position:absolute;top:56px;right:72px;left:0;display:flex;width:auto;max-width:none;min-height:48px;margin:0;border:0;border-bottom:1px solid var(--sam-admin-border);border-radius:0;background:var(--sam-admin-panel);padding:7px 16px;overflow-x:auto}
.sam-admin-unified-react #app>div>main{margin-right:72px;margin-left:0;width:calc(100% - 72px);max-width:none;padding-top:68px}
/* Standalone HR/finance/lunch/assets/tickets/module geometry remains authoritative. */
.sam-admin-unified :where(.hr-module-header,.sam-module-header,.sam-react-module-header) :where(i,svg){color:#000!important;background:#edf3f4;border-radius:6px;padding:3px}
@media(max-width:1023px){
 .sam-unified-react-header nav[aria-label="منوی مدیریت"]>div:first-child{position:absolute;top:56px;right:0;left:0;bottom:auto;flex-direction:row;width:100%;max-width:100%;height:60px;overflow-x:auto;overflow-y:hidden;padding:4px}
 .sam-unified-react-header nav[aria-label="منوی مدیریت"]>div:first-child>button{width:auto;min-width:72px;min-height:50px;flex-shrink:0}
 .sam-unified-react-header nav[aria-label="منوی مدیریت"]>div:last-child{top:116px;right:0;padding:5px 8px}
 .sam-admin-unified-react #app>div>main{margin:0;width:100%;padding:124px 12px 20px}
 .sam-admin-unified :where(.admin-shell-header,body>header,.sam-unified-react-header)>div{padding-inline:12px!important}
 .sam-admin-unified :where(header)>div>div{gap:6px!important}
 .sam-admin-unified :where(header) a:has(.ri-arrow-right-up-line){padding-inline:8px!important;font-size:10px!important}
}
@media print{body.sam-admin-unified{background:white!important}.sam-unified-react-header{display:none!important}.sam-admin-unified-react #app>div>main{margin:0;width:100%;padding:0}}
