/* MGO Payneos v2.8.0 — AdminLTE 4-architecture application shell.
 * Custom MGO compatibility theme, NOT the upstream AdminLTE dist bundle.
 * Bootstrap 5.3.6 is vendored locally and loaded before original CSS.
 * No CDN, @import, remote fonts, icon fonts, API calls or runtime fetches.
 * Original app.css/dynamics.css/enterprise.css/enterprise_stable.css
 * remain intact. This stylesheet only provides layout and presentation.
 */
:root{--lte-brand:#1d62c1;--lte-navy:#122d55;--lte-surface:#fff;--lte-edge:#dde8f5;--lte-ink:#183b61;--lte-canvas:#f2f6fd;--lte-side-width:264px;--lte-bar-height:64px}
html[data-bs-theme="light"]{color-scheme:light}
body.dashboard{background:var(--lte-canvas);color:#283d57;min-width:0}
body.dashboard .app-wrapper.shell{display:grid;grid-template-columns:var(--lte-side-width) minmax(0,1fr);grid-template-rows:var(--lte-bar-height) minmax(0,1fr);grid-template-areas:'header header' 'sidebar main';align-items:start;min-height:100dvh;overflow:clip;max-width:100vw}
/* AdminLTE regions remain siblings. Browser-driven scrolling is restricted
   to the sidebar menu and content, avoiding navigation jump on page loads. */
body.dashboard .app-header.topbar{grid-area:header;left:0;right:0;top:0;width:100%;height:var(--lte-bar-height);min-height:var(--lte-bar-height);position:fixed;z-index:70;box-sizing:border-box;border-bottom:1px solid var(--lte-edge);background:rgba(255,255,255,.98)!important;box-shadow:0 2px 13px #173d6510;display:flex;align-items:center;gap:15px}
body.dashboard .app-header.topbar::before{height:4px;background:linear-gradient(90deg,#14395d,#216dcc 46%,#13ad9f 75%,#f1b248)}
body.dashboard .app-sidebar.sidebar{grid-area:sidebar;position:fixed;top:var(--lte-bar-height);bottom:0;left:0;width:var(--lte-side-width);height:calc(100dvh - var(--lte-bar-height));max-height:calc(100dvh - var(--lte-bar-height));z-index:62;display:flex;flex-direction:column;overflow:hidden;background:linear-gradient(180deg,#fff 0%,#fcfdff 100%);border-right:1px solid var(--lte-edge);transform:none}
body.dashboard .app-sidebar .sidebar-brand.sidebar-top{flex:none;min-height:0;background:transparent;padding:17px 15px 12px;border-bottom:1px solid #e7eef8}
body.dashboard .app-sidebar .sidebar-brand .brand{font-weight:800;color:#1a436f}
body.dashboard .app-sidebar .sidebar-brand .brand-icon{background:linear-gradient(145deg,#195391,#3686d1);box-shadow:0 3px 11px #1e63a421}
body.dashboard .app-sidebar .sidebar-wrapper.nav{display:flex;flex-direction:column;flex-wrap:nowrap!important;align-content:stretch;flex:1 1 auto;min-height:0;max-height:none;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:stable;scroll-behavior:auto;overflow-anchor:none;padding:10px 9px 20px;gap:0;scrollbar-width:thin;scrollbar-color:#b7ccea transparent}
body.dashboard .app-sidebar .mgo-nav-search{flex:none;order:0;border-bottom:1px solid #e6eef9}
body.dashboard .app-sidebar .nav-link.prod-main-link{display:flex;align-items:center;flex:none;width:100%;min-width:0;min-height:59px;height:59px;max-height:59px;margin:2px 0;box-sizing:border-box;border-radius:10px;border:1px solid transparent;padding:7px 10px;color:#435b75;transition:background-color .12s,border-color .12s;line-height:1.2}
body.dashboard .app-sidebar .nav-link.prod-main-link .nav-copy{min-width:0;display:flex;flex-direction:column;justify-content:center;gap:3px}
body.dashboard .app-sidebar .nav-link.prod-main-link .nav-friendly{font-weight:650;font-size:12px;color:inherit;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow-wrap:anywhere}
body.dashboard .app-sidebar .nav-link.prod-main-link .nav-technical{font-size:9.5px;line-height:1.2;color:#8295a9;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}
body.dashboard .app-sidebar .nav-link.prod-main-link.active{background:linear-gradient(90deg,#e7f2ff,#f4f8ff);color:#145ba9;border-color:#c8ddfa;box-shadow:inset 3px 0 #216fd2,0 2px 8px #2d70ba09}
body.dashboard .app-sidebar .nav-link.prod-main-link:hover:not(.active){color:#1d64a9;background:#f0f6fd;border-color:#e0eafa}
body.dashboard .app-sidebar .nav-label.nav-section{flex:none;color:#3d6490;font-size:10px;letter-spacing:.85px;padding:12px 11px 7px}
body.dashboard .app-sidebar .nav-label.space-top{border-top:1px solid #e9eff8;color:#188e85}
body.dashboard .app-sidebar .sidebar-bottom{flex:none;background:#fff;min-height:0;padding-bottom:13px;border-top:1px solid #e7eff7}
body.dashboard .app-main.workspace{grid-area:main;display:block;position:relative;margin:0!important;min-width:0;min-height:calc(100dvh - var(--lte-bar-height));max-width:100%;background:var(--lte-canvas);overflow:visible}
body.dashboard .app-content-header{display:block;max-width:1880px;margin:auto;padding:22px 26px 0;min-width:0}
body.dashboard .app-content-header .page-heading{margin-bottom:13px;min-height:60px}
body.dashboard .app-content.content{display:block;padding:0 26px 27px!important;width:100%;max-width:1880px;margin:0 auto;min-width:0}
body.dashboard .app-content > *{min-width:0;max-width:100%}
body.dashboard .d365-commandbar{border-radius:11px;border-color:#dde7f5;min-height:46px;box-shadow:0 3px 10px #21496f09}
body.dashboard .page-heading h1{color:#174676;letter-spacing:-.5px}
body.dashboard .page-chip{background:#e9f4ff;color:#215a9f;border-color:#d0e5fa}
body.dashboard .panel,body.dashboard .stat-card,body.dashboard .prod-kpi,body.dashboard .prod-dash-card{border-radius:12px;box-shadow:0 3px 13px #173e6410;min-width:0}
body.dashboard .panel{border-left:3px solid #d9e6f7}
body.dashboard .stat-card:nth-child(4n+1){border-top:3px solid #2975d3}
body.dashboard .stat-card:nth-child(4n+2){border-top:3px solid #19aa92}
body.dashboard .stat-card:nth-child(4n+3){border-top:3px solid #8365d4}
body.dashboard .stat-card:nth-child(4n+4){border-top:3px solid #e6ae43}
body.dashboard .status.good{background:#e6f7ef;color:#12784f}
body.dashboard .status.warn{background:#fff2da;color:#9c620d}
body.dashboard .status.bad{background:#ffe9ed;color:#b32640}
body.dashboard .table-wrap{overflow-x:auto;max-width:100%;border-radius:9px;scrollbar-width:thin}
body.dashboard .table-wrap th{background:#f0f6ff}
body.dashboard .btn.primary{background:#2068ca;border-color:#2068ca;color:#fff}
body.dashboard .btn.primary:not(:disabled):hover{background:#1a59b0;border-color:#1a59b0;color:#fff}
body.dashboard .workspace-menu-panel{z-index:110;max-height:min(72dvh,650px);overflow-y:auto}
body.dashboard .top-actions{min-width:0;gap:8px}
body.dashboard .settings-topmenu .workspace-menu-panel{right:0}
body.dashboard .mgo-lte-backdrop{display:none}
body.dashboard .footer{margin-top:22px}
body.dashboard .prod-dash-empty{border:1px dashed #bcd5f5;background:linear-gradient(140deg,#f5faff,#edf6ff)}
body.dashboard .prod-registry-bulkbar{max-width:100%;min-width:0}
body.dashboard .app-sidebar a:focus-visible,body.dashboard .app-header button:focus-visible,body.dashboard .app-header summary:focus-visible{outline:2px solid #317bd0;outline-offset:2px}
/* Responsive AdminLTE-style offcanvas: only one menu toggle handler — the
   existing assets/app.js. We do not register a second open/close listener. */
@media(max-width:1100px){:root{--lte-side-width:244px}body.dashboard .app-content-header{padding-left:20px;padding-right:20px}body.dashboard .app-content.content{padding-left:20px!important;padding-right:20px!important}}
@media(max-width:760px){
  body.dashboard .app-wrapper.shell{grid-template-columns:minmax(0,1fr);grid-template-areas:'header' 'main'}
  body.dashboard .app-header.topbar{height:60px;min-height:60px;padding:0 12px;gap:9px}
  body.dashboard .app-sidebar.sidebar{position:fixed;top:60px;height:calc(100dvh - 60px);max-height:calc(100dvh - 60px);width:min(294px,90vw);bottom:0;left:0;transform:translateX(-105%);transition:transform .16s ease-out;box-shadow:12px 0 30px #182e5220;z-index:95}
  body.dashboard .app-sidebar.sidebar.open{transform:translateX(0)}
  body.dashboard .app-main.workspace{margin:0!important;grid-area:main;width:100%;min-width:0}
  body.dashboard .app-content-header{padding:19px 13px 0}
  body.dashboard .app-content.content{padding:0 13px 20px!important}
  body.dashboard .mgo-lte-backdrop{position:fixed;z-index:89;inset:60px 0 0;background:#0d2b4a70;display:none}
  body.dashboard .app-sidebar.sidebar.open + .mgo-lte-backdrop{display:block}
  body.dashboard .d365-header-identity{min-width:0}
  body.dashboard .top-actions{gap:6px}
  body.dashboard .top-actions .avatar.small{display:none}
  body.dashboard .workspace-menu-panel{max-width:min(330px,90vw)}
}
@media(max-width:540px){
  body.dashboard .app-header .d365-header-name{font-size:11px}
  body.dashboard .app-header .d365-appgrid{width:28px;height:28px}
  body.dashboard .app-header .pill.pale{display:none}
  body.dashboard .app-header .workspace-menu-trigger{padding:6px 7px!important;font-size:9px!important}
  body.dashboard .app-header .mgo-clock{min-width:0;padding-right:7px}
  body.dashboard .app-header .mgo-clock-label{display:none}
  body.dashboard .app-header .mgo-clock-time{font-size:10px}
  body.dashboard .app-content-header .page-heading h1{font-size:20px}
}
@media(prefers-reduced-motion:reduce){body.dashboard .app-sidebar.sidebar{transition:none}}
/* Login/setup are still the existing secure PHP forms, simply reskinned. */
body.auth-bg{background:radial-gradient(circle at 14% 11%,#cfe6ff85,transparent 46%),linear-gradient(125deg,#eaf3ff,#fcfdff 55%,#e6f6f2)}
body.auth-bg .login-card,body.auth-bg .install-card{border-top:4px solid #236bcc;border-radius:12px;box-shadow:0 15px 45px #113d6b22}
