/* Compact ERP navigation: monochrome icons, mint selection, no data-side effects. */
.erp-app{--sb-width:256px;--sb-rail:74px;--sb-top:54px;--sb-ink:#26344b;--sb-muted:#8a98ad;--sb-line:#e8eef5;--sb-teal:#087e78;grid-template-columns:minmax(0,1fr)}
.erp-app>.shell{display:grid;grid-template-columns:var(--sb-width) minmax(0,1fr);align-items:start;min-width:0;width:100%;min-height:calc(100dvh - var(--sb-top));transition:grid-template-columns 180ms ease}
.erp-app>.shell.sb-compact{grid-template-columns:var(--sb-rail) minmax(0,1fr)}
.erp-app .sidebar.erp-sidebar{position:sticky;inset:var(--sb-top) auto auto 0;z-index:25;display:flex;flex-direction:column;align-self:start;width:100%;min-width:0;max-width:100%;height:calc(100dvh - var(--sb-top));max-height:calc(100dvh - var(--sb-top));padding:0;overflow:visible;border:0;border-right:1px solid #e0e8f1;background:linear-gradient(120deg,#fff 55%,#fbfdff);box-shadow:5px 0 22px #1e3e5d03;color:var(--sb-ink);backdrop-filter:none}
.erp-sidebar button,.sb-popover button{font:inherit;cursor:pointer}
.erp-sidebar svg,.sb-popover svg{width:19px;height:19px;flex:0 0 19px;display:block}
.erp-sidebar button:focus-visible,.sb-popover button:focus-visible,.sb-search-field input:focus-visible,.sb-mobile-trigger:focus-visible{outline:2px solid #63bdb3;outline-offset:2px}
.sb-header{height:58px;min-height:58px;padding:12px 15px 8px;display:flex;align-items:center;justify-content:space-between;gap:8px}
.sb-brand{display:flex;align-items:center;gap:11px;font-size:15px;font-weight:800;letter-spacing:.2px;white-space:nowrap}
.sb-brand img{width:44px;height:28px;object-fit:cover;border-radius:4px;border:1px solid #ece6dd}
.sb-brand>span{padding-left:10px;border-left:1px solid var(--sb-line)}
.sb-collapse{display:grid;place-items:center;width:27px;height:29px;min-width:0;padding:5px;border:0;border-radius:5px;background:transparent;color:#7d8ba1}
.sb-collapse:hover{background:#f2f6fa;color:#35536e}.sb-collapse svg{width:17px;height:17px;flex-basis:17px}
.sb-company-wrap{padding:3px 13px 10px}
.sb-company{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:34px;border:1px solid #e4ebf4;border-radius:6px;background:#fff;padding:8px 10px;color:#33435a;text-align:start;font-size:11px!important;box-shadow:0 1px 2px #24416403}
.sb-company>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sb-company svg{width:13px;height:13px;flex-basis:13px;transform:rotate(90deg)}
.sb-search-wrap{padding:0 13px 10px}
.sb-search-field{display:flex;align-items:center;gap:7px;min-width:0;min-height:35px;padding:6px 8px;border:1px solid #e7edf6;border-radius:6px;background:#fafcff;color:#8594aa}
.sb-search-field>svg{width:16px;height:16px;flex-basis:16px}
.sb-search-field input{min-width:0;width:100%;border:0;outline:0;background:transparent;padding:0;box-shadow:none;color:#31465f;font:inherit;font-size:11px;min-height:20px}
.sb-search-field input::placeholder{color:#91a0b5}.sb-search-field input::-webkit-search-cancel-button{cursor:pointer}
.sb-search-field kbd{flex:none;padding:2px 4px;border:1px solid #e2eaf4;border-radius:4px;color:#8392a7;background:#f2f6fb;font-size:9px;white-space:nowrap;font-family:inherit}
.sb-search-compact{display:none;place-items:center;width:36px;height:34px;border:1px solid #e4ebf4;border-radius:7px;background:#fff;color:#63728b;margin:0 auto}
.sb-nav{min-height:0;flex:1;overflow:auto;overscroll-behavior:contain;padding:0 12px 14px;scrollbar-width:thin;scrollbar-color:#dae4ed transparent}
.sb-section{display:grid;gap:3px;margin:0 0 10px}.sb-section-title{display:flex;align-items:center;gap:9px;margin:9px 8px 5px;color:#95a3b6;font-size:10px;font-weight:600;line-height:1.5;white-space:nowrap}
.sb-section-title i{height:1px;background:#edf2f7;flex:1}
.sb-link{position:relative;display:flex;align-items:center;gap:10px;width:100%;min-width:0;min-height:36px;border:0;border-radius:6px;padding:8px 11px;background:transparent;color:#35435a;text-align:start;font:inherit;font-size:12px;font-weight:600;line-height:1.45;text-decoration:none}
.sb-link:hover{background:#f4f8fb;color:#1b5b62}
.sb-link.active{color:#087b77;background:#eaf8f5}
.sb-link.active:before{position:absolute;content:"";width:2px;top:6px;bottom:6px;left:-4px;border-radius:3px;background:#0c8f86}
.sb-link .sb-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sb-link>svg{width:18px;height:18px;flex-basis:18px}
.sb-group-button .sb-chevron{margin-left:auto;color:#8392a6}.sb-chevron svg{width:13px;height:13px;flex-basis:13px}
.sb-group.is-open>.sb-group-button .sb-chevron{transform:rotate(90deg)}
.sb-group.has-active>.sb-group-button:not(:focus-visible){background:transparent;color:#087b77}
.sb-group.has-active>.sb-group-button:before{display:none}
.sb-children{display:grid;gap:1px;margin:3px 0 6px 21px;padding-left:9px;border-left:1px solid #e4ecf5}.sb-children[hidden]{display:none}
.sb-link.sb-subitem{min-height:29px;padding:5px 7px;gap:9px;font-size:11px;font-weight:500}
.sb-dot{width:4px;height:4px;min-width:4px;border-radius:50%;background:#c6d1df}
.sb-subitem.active .sb-dot{background:#13998f}.sb-subitem.active:before{display:none}
.sb-utilities{padding-top:10px;border-top:1px solid #e9eff6;margin-bottom:0}
.sb-footer{padding:8px 12px 10px;border-top:1px solid #e8eef5;flex:none;background:#fff}
.sb-user{display:flex;align-items:center;gap:10px;width:100%;border:0;border-radius:6px;background:transparent;padding:5px 7px;text-align:start;color:#30425b}
.sb-user:hover{background:#f5faf9}
.sb-avatar{display:inline-grid;place-items:center;flex:0 0 32px;width:32px;height:32px;border-radius:50%;background:linear-gradient(140deg,#a9d8cf,#6db3b5);color:#fff;font-size:13px;font-weight:700}
.sb-user-copy{display:grid;gap:3px;min-width:0}.sb-user-copy strong{font-size:11px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sb-user-copy small{font-size:9px;color:#8c9bae}
.sb-user-more{margin-left:auto;color:#7c8ca3}.sb-user-more svg{width:15px;height:15px;flex-basis:15px}
.sb-empty{padding:15px 8px;color:#8798ac;font-size:11px;line-height:1.6;margin:0}
.erp-sidebar.is-compact .sb-header{padding:10px 8px;gap:3px;justify-content:center}
.erp-sidebar.is-compact .sb-brand{gap:0}.erp-sidebar.is-compact .sb-brand img{width:29px;height:26px}.erp-sidebar.is-compact .sb-brand>span{display:none}
.erp-sidebar.is-compact .sb-collapse{width:21px;padding:2px}
.erp-sidebar.is-compact .sb-company-wrap,.erp-sidebar.is-compact .sb-search-field,.erp-sidebar.is-compact .sb-label,.erp-sidebar.is-compact .sb-section-title>span,.erp-sidebar.is-compact .sb-chevron,.erp-sidebar.is-compact .sb-children,.erp-sidebar.is-compact .sb-user-copy,.erp-sidebar.is-compact .sb-user-more{display:none}
.erp-sidebar.is-compact .sb-search-compact{display:grid}.erp-sidebar.is-compact .sb-search-wrap{padding:0 8px 13px}
.erp-sidebar.is-compact .sb-nav{padding:0 13px 12px}.erp-sidebar.is-compact .sb-link{min-height:39px;justify-content:center;gap:0;padding:9px 0}
.erp-sidebar.is-compact .sb-section-title{height:1px;margin:12px 4px 8px}.erp-sidebar.is-compact .sb-section-title i{background:#e9eff5}
.erp-sidebar.is-compact .sb-section{gap:5px;margin-bottom:7px}.erp-sidebar.is-compact .sb-footer{padding:8px 9px 12px}.erp-sidebar.is-compact .sb-user{padding:3px;justify-content:center}
.erp-sidebar.is-compact .sb-group.has-active>.sb-group-button{background:#eaf8f5}.erp-sidebar.is-compact .sb-group.has-active>.sb-group-button:before{display:block}
.sb-popover{position:fixed;z-index:240;max-height:min(480px,calc(100dvh - 24px));overflow:auto;padding:9px;border:1px solid #dfe8f0;border-radius:9px;background:#fff;box-shadow:0 12px 38px #17345124;color:#31445d;font-size:12px}
.sb-popover h2{margin:4px 8px 10px;font-size:12px;font-weight:700}
.sb-popover .sb-link{font-size:12px}.sb-popover .sb-link.active:before{left:0}
.sb-current-company{display:flex;gap:10px;align-items:center;justify-content:space-between;padding:4px 8px;color:#137a75;font-size:12px;font-weight:650}.sb-current-company svg{width:16px;flex-basis:16px}
.sb-company-code{padding:0 8px 10px;margin:0;color:#8a99ac;font-size:11px;border-bottom:1px solid #e9eff6;overflow-wrap:anywhere}
.sb-popover-user{display:flex;gap:10px;align-items:center;padding:6px 7px 12px;border-bottom:1px solid #edf1f6;margin-bottom:7px}
.sb-popover-user strong,.sb-popover-user small{display:block}.sb-popover-user strong{font-size:12px}.sb-popover-user small{font-size:10px;color:#8a9bad;margin-top:4px}
.sb-logout{color:#a45252}.sb-popover-search{padding:12px}.sb-popover-search .sb-search-field{padding:9px}.sb-search-results{margin-top:9px;max-height:350px;overflow:auto}
.sb-tooltip{position:fixed;z-index:250;border-radius:5px;padding:7px 10px;background:#253247;color:#fff;font-size:11px;line-height:1.5;max-width:190px;box-shadow:0 4px 12px #18334c24;pointer-events:none}
.sb-tooltip:before{position:absolute;content:"";left:-4px;top:11px;width:8px;height:8px;transform:rotate(45deg);background:inherit}
.sb-mobile-trigger,.sb-drawer-shade{display:none}
@media(max-width:900px){
 .erp-app>.shell,.erp-app>.shell.sb-compact{display:block;grid-template-columns:minmax(0,1fr)}
 .erp-app .sidebar.erp-sidebar{position:fixed;inset:0 auto 0 0;z-index:160;width:280px;max-width:calc(100vw - 45px);height:100dvh;max-height:100dvh;transform:translateX(-102%);visibility:hidden;transition:transform 180ms ease,visibility 180ms ease;border-right:1px solid #dce7ef;box-shadow:10px 0 45px #193c5d20}
 .erp-app .sidebar.erp-sidebar.is-mobile-open{transform:translateX(0);visibility:visible}
 .erp-app>.topbar{gap:8px}.erp-app>.topbar .brand{min-width:0;flex:1}.erp-app>.topbar .brand p{display:none}.erp-app>.topbar .brand-mark{display:none}.erp-app>.topbar .brand h1{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:160px}
 .sb-mobile-trigger{display:grid;place-items:center;flex:0 0 33px;width:33px;height:34px;border:1px solid #e1e9f2;border-radius:6px;padding:7px;background:#fff;color:#41556f}
 .sb-mobile-trigger svg{display:block;width:18px;height:18px}
 .sb-drawer-shade:not([hidden]){display:block;position:fixed;inset:0;z-index:159;width:100vw;height:100dvh;border:0;background:#1c32474d;backdrop-filter:blur(2px)}
 .erp-app .main{width:100%;max-width:100%;min-width:0;padding:14px 12px 24px}
 .sb-popover{z-index:200}.sb-user-copy strong{font-size:12px}.sb-link{min-height:40px;font-size:13px}.sb-link.sb-subitem{min-height:33px;font-size:12px}
}
@media(max-width:420px){.erp-app>.topbar .brand h1{max-width:100px;font-size:13px}.erp-app>.topbar .top-actions{gap:5px;min-width:0}}
@media(prefers-reduced-motion:reduce){.erp-app>.shell,.erp-app .sidebar.erp-sidebar{transition:none}}
@media print{.erp-app .sidebar.erp-sidebar,.sb-mobile-trigger,.sb-drawer-shade,.sb-popover,.sb-tooltip{display:none!important}.erp-app>.shell{display:block!important}}

body.sb-drawer-open{overflow:hidden}
