/* BPS ERP v2 — adaptive workspace, no external UI dependency. */
:root{--brand:#087f72;--brand-600:#07685e;--brand-50:#edf8f5;--brand-100:#ccece5;--navy:#192c3d;--navy-2:#223c50;--bg:#f4f7fa;--sw:246px;--th:66px}
[data-theme=dark]{--brand:#4fd5bd;--brand-600:#23b69f;--brand-50:#173d37;--brand-100:#215c51;--bg:#0b1420;--navy:#0d1d2c;--navy-2:#172c3d}
body{font-family:Inter,'Segoe UI',Arial,sans-serif}.content{padding:26px!important}.sidebar{background:var(--navy)!important}.sidebar .sbi{font-size:13px!important;min-height:40px;line-height:1.4}.sidebar button.sbi{width:calc(100% - 20px);text-align:left;border:0;cursor:pointer}.sidebar .sbi.on{background:#365566!important;color:white!important;border-left:3px solid #42c6aa}.sb-brand-name{font-size:20px!important;letter-spacing:-.6px}.sb-brand-name small{font-size:10px!important;letter-spacing:0;font-weight:400;color:#c0d4df!important}.sblbl{font-size:10px!important;letter-spacing:1.2px!important}.topbar{box-shadow:0 1px 0 var(--bd)!important}.tbs{background:var(--sur2)!important}.page{max-width:none}.ew-workspace{max-width:1660px;margin:auto;color:var(--tx)}
.ew-head{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:0 0 14px}.ew-eyebrow{font-size:10px;font-weight:750;letter-spacing:1.6px;color:var(--brand);margin-bottom:8px}.ew-head h1{font-size:29px;letter-spacing:-1.1px;line-height:1.2;margin:0 0 8px;font-weight:750}.ew-head p{margin:0;font-size:13px;color:var(--tx2)}.ew-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.ew-btn{min-height:35px;padding:8px 12px;border:1px solid var(--bd);border-radius:7px;background:var(--sur);color:var(--tx2);font-family:inherit;font-size:12px;font-weight:600;line-height:1.4;cursor:pointer;white-space:nowrap}.ew-btn:hover,.ew-btn.active{border-color:var(--brand);color:var(--brand);background:var(--brand-50)}.ew-btn.primary{background:var(--brand);color:white;border-color:var(--brand)}.ew-btn:disabled{opacity:.4;cursor:default}.ew-workspace select,.ew-workspace input,.ew-dialog input,.ew-dialog textarea,.ew-dialog select{background:var(--sur);color:var(--tx);border:1px solid var(--bd);border-radius:7px;min-height:36px;padding:8px 10px;font:inherit;font-size:12px;max-width:100%}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #44bca9;outline-offset:2px}.ew-meta{display:flex;align-items:center;gap:8px;color:var(--tx3);font-size:10px;margin-bottom:22px;flex-wrap:wrap}.ew-dot{width:6px;height:6px;background:var(--brand);border-radius:50%}
.ew-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:22px}.ew-metric{padding:19px 18px;text-align:left;background:var(--sur);border:1px solid var(--bd);border-radius:10px;min-width:0;color:var(--tx);display:flex;flex-direction:column;gap:12px}.ew-metric button{cursor:pointer}.ew-metric-top{display:flex;justify-content:space-between;gap:8px;align-items:center}.ew-metric span,.ew-metric small{font-size:11px;color:var(--tx2)}.ew-metric strong{font-size:25px;letter-spacing:-.7px;line-height:1.2;overflow-wrap:anywhere}.ew-metric strong small{font-size:11px;font-weight:500;letter-spacing:0}.ew-metric svg{width:22px;height:22px;stroke:var(--brand);fill:none;stroke-width:1.6}.ew-layout{display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:18px;align-items:start}.ew-main,.ew-aside{display:grid;gap:18px;min-width:0}.ew-panel{background:var(--sur);border:1px solid var(--bd);border-radius:10px;min-width:0;overflow:hidden}.ew-pad{padding:19px}.ew-panel h2{font-size:15px;line-height:1.3;margin:0;font-weight:750;letter-spacing:-.25px}.ew-panel p{color:var(--tx3);font-size:11px;margin:5px 0 0}.ew-section-head{padding:18px;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.ew-section-head input{max-width:240px;flex:1;min-width:160px}.ew-tabs{display:flex;gap:16px;border-bottom:1px solid var(--bd);padding:0 18px;overflow:auto}.ew-tabs button{font-size:11px;font-weight:650;background:transparent;border:0;border-bottom:2px solid transparent;padding:7px 0 12px;color:var(--tx2);white-space:nowrap;cursor:pointer}.ew-tabs button.active{border-color:var(--brand);color:var(--brand)}.ew-modules{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:18px}.ew-module{display:flex;gap:10px;align-items:flex-start;min-width:0;position:relative;text-align:left;border:1px solid var(--bd);background:var(--sur);padding:16px 12px;border-radius:8px;cursor:pointer;color:var(--tx);transition:border .15s,box-shadow .15s}.ew-module:hover{border-color:var(--brand);box-shadow:0 3px 12px #112a3d0d}.ew-module>span:nth-child(2){min-width:0}.ew-module-icon{background:var(--brand-50);color:var(--brand);width:35px;height:35px;display:grid;place-items:center;border-radius:9px;flex-shrink:0}.ew-module-icon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linejoin:round;stroke-linecap:round}.tone-1 .ew-module-icon{background:var(--bll);color:var(--bl)}.tone-2 .ew-module-icon{background:var(--aml);color:var(--am)}.tone-3 .ew-module-icon{background:var(--pul);color:var(--pu)}.ew-module b{display:block;font-size:12px;line-height:1.4;margin:2px 10px 6px 0}.ew-module small{display:block;font-size:10px;color:var(--tx2);line-height:1.5;min-height:30px}.ew-module em{display:block;font-style:normal;font-size:9px;color:var(--brand);margin-top:10px}.ew-arrow{position:absolute;right:10px;top:14px;color:var(--tx3);font-size:12px}.ew-table-scroll{overflow:auto}.ew-table{width:100%;border-collapse:collapse;font-size:11px;text-align:left}.ew-table th{background:var(--sur2);color:var(--tx2);font-weight:650;padding:11px 16px;white-space:nowrap}.ew-table td{padding:13px 16px;border-top:1px solid var(--bd);vertical-align:middle}.ew-table tbody tr:hover{background:var(--sur2)}.ew-secondary{display:block;color:var(--tx3);font-size:10px;line-height:1.4;margin-top:4px;max-width:270px;overflow-wrap:anywhere}.ew-link{border:0;background:none;padding:0;color:var(--brand);font-size:inherit;font-weight:650;cursor:pointer;text-align:left}.ew-pill{display:inline-flex;padding:4px 8px;border-radius:5px;background:var(--sur3);color:var(--tx2);font-size:10px;white-space:nowrap;font-weight:600}.ew-pill.done,.ew-pill.delivered,.ew-pill.received,.ew-pill.paid,.ew-pill.approved{background:var(--gnl);color:var(--gn)}.ew-pill.in_progress,.ew-pill.on_route{background:var(--bll);color:var(--bl)}.ew-pill.review,.ew-pill.pending,.ew-pill.unpaid,.ew-pill.qc{background:var(--aml);color:var(--am)}.ew-pill.cancelled{background:var(--rdl);color:var(--rd)}.ew-count{font-size:11px;padding:4px 7px;border-radius:5px;background:var(--rdl);color:var(--rd)}.ew-alerts{padding:0 16px 12px}.ew-alert{padding:13px 0;display:flex;gap:10px;background:none;border:0;border-top:1px solid var(--bd);width:100%;text-align:left;color:var(--tx);cursor:pointer}.ew-alert-icon{display:grid;place-items:center;width:23px;height:23px;background:var(--aml);color:var(--am);border-radius:6px;flex-shrink:0;font-weight:700}.ew-alert b{font-size:11px;line-height:1.5;display:block}.ew-alert small{display:block;color:var(--tx2);font-size:10px;margin-top:4px}.ew-alert em{font-style:normal;display:block;color:var(--brand);font-size:9px;margin-top:7px}.ew-progress-item{margin-top:18px;font-size:11px}.ew-progress{display:flex;height:6px;gap:2px;border-radius:5px;overflow:hidden;margin:8px 0}.ew-progress span{background:#99b6ce}.ew-progress .done,.ew-progress .received,.ew-progress .paid,.ew-progress .delivered{background:#33b599}.ew-progress .cancelled{background:#d8a2a6}.ew-progress .in_progress,.ew-progress .on_route{background:#5682bf}.ew-progress-legend{font-size:9px;color:var(--tx3);line-height:1.7}.ew-empty{padding:34px 20px;text-align:center;color:var(--tx2);font-size:13px}.ew-empty p{margin:12px 0}.ew-pagination{display:flex;gap:12px;align-items:center;justify-content:center;padding:18px;font-size:11px;border-top:1px solid var(--bd)}
.ew-board-note{font-size:10px;color:var(--tx3);padding:0 18px 12px}.ew-board{display:grid;grid-template-columns:repeat(6,minmax(210px,1fr));gap:12px;padding:0 18px 18px;overflow:auto;align-items:start}.ew-lane{background:var(--sur2);border:1px solid var(--bd);border-radius:8px;padding:10px;min-height:230px}.ew-lane h3{font-size:11px;margin:3px 0 13px;display:flex;justify-content:space-between}.ew-lane h3 span{color:var(--tx3)}.ew-record{width:100%;display:flex;flex-direction:column;align-items:flex-start;gap:10px;border:1px solid var(--bd);background:var(--sur);padding:13px;border-radius:7px;text-align:left;margin-bottom:8px;color:var(--tx);cursor:pointer}.ew-record:hover{border-color:var(--brand)}.ew-record small{font-size:9px;color:var(--tx3)}.ew-record b{font-size:12px;line-height:1.5;overflow-wrap:anywhere}.ew-record span{font-size:10px;color:var(--tx2)}.ew-record footer{font-size:9px;color:var(--tx3);border-top:1px solid var(--bd);padding-top:9px;width:100%}.ew-record.urgent{border-left:3px solid var(--rd)}.ew-lane-empty{font-size:11px;text-align:center;padding:35px 0;color:var(--tx3)}.ew-dialog{padding:0;background:var(--sur);color:var(--tx);border:1px solid var(--bd);border-radius:12px;width:min(730px,94vw);max-height:90vh;box-shadow:0 24px 90px #0003}.ew-dialog::backdrop{background:#0b192a88;backdrop-filter:blur(3px)}.ew-dialog>header{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--bd);padding:17px 22px;position:sticky;top:0;background:var(--sur);z-index:1}.ew-dialog h2{font-size:17px;margin:0}.ew-dialog form{padding:22px}.ew-dialog fieldset{border:0;padding:0;margin:0;min-width:0}.ew-form{display:grid;grid-template-columns:1fr 1fr;gap:17px}.ew-form label{display:flex;flex-direction:column;gap:7px;font-size:11px;font-weight:600;color:var(--tx2)}.ew-form-wide{grid-column:1/-1}.ew-dialog footer{display:flex;gap:10px;align-items:center;justify-content:flex-end;margin-top:20px;padding:10px}.ew-form-error{color:var(--rd);font-size:12px}.ew-workflow{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:0 0 18px}.ew-workflow button{border:1px solid var(--bd);padding:14px;text-align:left;background:var(--sur);border-radius:8px;color:var(--tx);cursor:pointer}.ew-workflow small{color:var(--brand);font-size:10px}.ew-workflow b{display:block;font-size:12px;margin:8px 0}.ew-workflow span{font-size:10px;color:var(--tx3)}.ew-mini-board{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:15px 0}.erp-head h1{font-size:28px!important}.erp-head p{font-size:12px!important}.erp-table th{font-size:11px!important;padding:13px!important}.erp-table td{font-size:12px!important;padding:14px!important}.erp-kpi-v{font-size:24px!important}.erp-kpi-l,.erp-kpi-s{font-size:11px!important}.erp-btn,.erp-select,.erp-search input{font-size:12px!important;min-height:37px}.erp-product-img{width:56px!important;height:56px!important}.erp-modal input,.erp-modal select,.erp-modal textarea{font-size:13px!important;min-height:39px}.erp-modal label{font-size:11px!important}.sales-pos-pname{font-size:12px!important;height:48px!important}.sales-pos-price{font-size:13px!important}.sales-pos-photo{height:150px!important}.sales-pos-field label,.sales-pos-code,.sales-pos-stock{font-size:10px!important}.sales-pos-field input,.sales-pos-field select{font-size:12px!important}.auth-l{background:#192c3d!important;color:white}.auth-l .auth-hero{color:white}.auth-l .auth-lead,.auth-l .auth-feats{color:#cad9e2}.auth-l .auth-hero em{color:#51d5b3}
@media(min-width:1600px){.ew-modules{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(max-width:1220px){.ew-layout{grid-template-columns:1fr}.ew-aside{grid-template-columns:1fr 1fr}.ew-metric strong{font-size:21px}.content{padding:20px!important}.ew-mini-board{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:900px){.ew-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.ew-modules{grid-template-columns:repeat(2,minmax(0,1fr))}.ew-head{align-items:flex-start;flex-direction:column}.ew-workflow{grid-template-columns:repeat(3,minmax(0,1fr))}.ew-aside{grid-template-columns:1fr}.erp-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}}@media(max-width:700px){:root{--sw:0px}.sidebar{width:246px!important}.content{padding:16px 12px!important}.ew-head h1{font-size:25px}.ew-meta{font-size:9px}.ew-section-head{padding:14px}.ew-tabs{gap:15px;padding:0 14px}.ew-modules{padding:12px;gap:8px}.ew-module{padding:12px 10px;flex-direction:column;min-height:160px}.ew-module b{font-size:12px}.ew-module small{font-size:10px}.ew-module-icon{width:32px;height:32px}.ew-metric{padding:15px 12px}.ew-metric strong{font-size:22px}.ew-metric-top{align-items:flex-start}.ew-workflow{gap:6px}.ew-workflow button{padding:10px}.ew-workflow b{font-size:10px}.ew-workflow span{font-size:9px}.ew-dialog form{padding:16px}.ew-form{grid-template-columns:1fr}.ew-table th,.ew-table td{padding:11px 12px}.ew-metrics{gap:9px}.ew-section-head .ew-actions{width:100%}.ew-section-head input{max-width:100%}.ew-mini-board{grid-template-columns:1fr 1fr}.ew-pagination{padding:12px;gap:6px}.ew-pagination .ew-btn{font-size:10px}.ew-dialog>header{padding:12px}.ew-dialog h2{font-size:15px}}
@media print{.sidebar,.topbar,.ew-actions,.ew-tabs,.ew-btn{display:none!important}.content{padding:0!important}.workspace{margin:0!important}.ew-layout{display:block}.ew-aside{display:none}.ew-panel{break-inside:avoid}.ew-table-scroll{overflow:visible}}

.ew-nav-group{margin:5px 0}.ew-nav-group summary{cursor:pointer;color:#a8bdce;font-size:10px;font-weight:650;letter-spacing:.5px;padding:14px 18px;list-style:none;display:flex;align-items:center;justify-content:space-between}.ew-nav-group summary::-webkit-details-marker{display:none}.ew-nav-group summary:after{content:'›';font-size:15px;transition:transform .15s}.ew-nav-group[open] summary:after{transform:rotate(90deg)}.ew-nav-group[hidden]{display:none}.ew-nav-group>.sbi{margin-left:10px;margin-right:10px}.ew-nav-group>.sbi svg{flex-shrink:0}.sidebar .sb-brand .bps-mark{font-size:22px!important;color:white!important}.ew-nav-group summary:hover{color:white}.sidebar{overflow-y:auto!important}

.sidebar button.sbi{background:transparent;color:#bccddd}.sidebar button.sbi:hover{background:#2d465b;color:#fff}.sidebar .sb-brand .bps-mark{position:relative;text-indent:0!important;overflow:hidden}.sidebar .sb-brand .bps-mark:after{content:'B';position:absolute;inset:0;display:grid;place-items:center;color:white!important;font:800 23px/1 'Segoe UI',sans-serif;background:var(--brand);text-indent:0}.sidebar .sb-brand .bps-mark img{display:none}

@media(max-width:700px){.sidebar:not(.sb-open){box-shadow:none!important}}

/* BPS corporate palette: restrained blue surfaces, white canvas, original blue logo. */
:root{
  --brand:#285e96;--brand-600:#204e7f;--brand-50:#eef4fa;--brand-100:#dbe8f4;
  --navy:#173b60;--navy-2:#234c76;--navy-tx:#e4edf7;--navy-line:rgba(255,255,255,.14);
  --bg:#f5f7fa;--sur:#fff;--sur2:#f8fafc;--sur3:#edf2f7;
  --bd:#e1e8ef;--bd2:#cbd8e6;--tx:#1b334c;--tx2:#506780;--tx3:#718399;
  --focus:0 0 0 3px rgba(40,94,150,.22);--orgline:#d4e0ec;
}
[data-theme=dark]{
  --brand:#91bbe4;--brand-600:#b5d3ee;--brand-50:#1b354c;--brand-100:#294962;
  --navy:#11283e;--navy-2:#1b3b59;--bg:#101e2c;--sur:#192c3e;--sur2:#20364a;--sur3:#294157;
  --bd:#365066;--bd2:#4b657b;--tx:#f2f6fa;--tx2:#c5d3df;--tx3:#9fb2c5;
  --focus:0 0 0 3px rgba(145,187,228,.32);--orgline:#3e5a71;
}
.sidebar{background:linear-gradient(165deg,#254d76 0%,#1a3d63 52%,#143452 100%)!important;color:#e5edf5!important}
#sidebar .sbi.on{background:rgba(255,255,255,.12)!important;color:white!important;border-left:3px solid #9fc6ec}
#sidebar .sbi.on::before{background:white!important}
.sidebar button.sbi{color:#dce8f3!important}.sidebar button.sbi:hover{color:#fff!important;background:rgba(255,255,255,.09)!important}
.ew-nav-group summary{color:#d9e6f2}.ew-nav-group summary:hover{color:white}.sidebar .sblbl{color:#bacfe2!important}
.sidebar .sb-new{background:#fff!important;color:#204e7f!important}.sidebar .sb-new:hover{background:#edf4fa!important;color:#173b60!important}
.sidebar .sb-brand{justify-content:center;padding:2px 0 14px;border-bottom-color:rgba(255,255,255,.15)}
.bps-sidebar-logo,.bps-auth-logo,.bps-auth-mobile-logo{display:grid;place-items:center;position:relative;overflow:hidden;flex:none}
.bps-sidebar-logo{width:100%;height:110px;background:transparent}
.bps-sidebar-logo img,.bps-auth-logo img,.bps-auth-mobile-logo img{display:block;position:static;width:100%;height:100%;box-sizing:border-box;object-fit:contain;transform:none}
.bps-sidebar-logo img{padding:8px 26px}
.bps-auth-logo{width:min(310px,100%);height:158px;background:transparent}
.bps-auth-mobile-logo{width:79px;height:43px;border-radius:6px;background:#254d76}
.bps-auth-mobile-logo img{padding:5px}
.auth-l{background:linear-gradient(155deg,#32618f 0%,#244f7d 54%,#183d65 100%)!important;color:#fff!important}.auth-l .auth-lead,.auth-l .auth-feats{color:#e1ebf5!important}
.auth-l .auth-hero em{color:white!important}.auth-l .auth-grid{opacity:.24}
.auth-l .afeat-ic{background:rgba(255,255,255,.16)!important;color:white!important}
.auth-mobile-brand{gap:8px}.auth-mobile-brand>span:last-child{color:var(--tx);font-size:13px;font-weight:750}
.ew-eyebrow,.ew-link,.ew-module em{color:var(--brand)}
.ew-metric{border-top:3px solid #d5e3f0}.ew-metric svg{stroke:#285e96}
.ew-module-icon,.tone-1 .ew-module-icon,.tone-2 .ew-module-icon,.tone-3 .ew-module-icon{background:#edf4fa;color:#285e96}
.ew-module.tone-1 .ew-module-icon{background:#eaf2f9;color:#285e96}
.ew-module.tone-2 .ew-module-icon{background:#eff2f9;color:#526994}
.ew-module.tone-3 .ew-module-icon{background:#e8f0f7;color:#315d85}
.ew-module:hover{border-color:#88abc9;box-shadow:0 5px 20px rgba(25,55,85,.07)}
.ew-progress span{background:#bbd0e2}.ew-progress .in_progress,.ew-progress .on_route{background:#4c83b6}
.ew-progress .done,.ew-progress .received,.ew-progress .paid,.ew-progress .delivered{background:#78a9d0}
.ew-btn.primary{background:#0066cc;border-color:#0066cc}.ew-btn.primary:hover{background:#0054ad;border-color:#0054ad;color:white}
.ew-workspace input:focus,.ew-workspace select:focus,.ew-dialog input:focus,.ew-dialog select:focus,.ew-dialog textarea:focus{outline:2px solid var(--brand);outline-offset:1px}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline-color:var(--brand)}
::selection{background:#dbe8f4;color:#173b60}
@media(max-width:700px){.bps-sidebar-logo{height:110px}.auth-mobile-brand .bps-auth-mobile-logo{flex:none}}
[data-theme=dark] .ew-metric{background:var(--sur)!important;border-color:var(--bd)!important;color:var(--tx)!important}
[data-theme=dark] .ew-metric strong{color:var(--tx)!important}
[data-theme=dark] .ew-metric span,[data-theme=dark] .ew-metric small{color:var(--tx2)!important}
[data-theme=dark] .ew-metric svg{stroke:#91bbe4}
[data-theme=dark] .ew-module-icon,[data-theme=dark] .tone-1 .ew-module-icon,[data-theme=dark] .tone-2 .ew-module-icon,[data-theme=dark] .tone-3 .ew-module-icon{background:#19456d;color:#a6d4ff}
[data-theme=dark] .ew-module.tone-1 .ew-module-icon,[data-theme=dark] .ew-module.tone-2 .ew-module-icon,[data-theme=dark] .ew-module.tone-3 .ew-module-icon{background:#19456d;color:#a6d4ff}
[data-theme=dark] .ew-btn.primary{background:#0066cc;color:white}

/* ERP navigation v3 — 7 business groups + cell-based workspaces. */
.ew-legacy-nav{display:none!important}
#ew-erp-menu,#ew-quick-menu{display:flex;flex-direction:column;gap:5px;margin:8px 10px}
.ew-side-caption{padding:9px 8px 5px;color:rgba(229,237,245,.62);font-size:9px;font-weight:800;letter-spacing:.9px}
.ew-side-group,.ew-side-link{width:100%;border:0;background:transparent;color:#dce8f3;display:flex;align-items:center;gap:10px;min-height:48px;padding:9px 10px;border-radius:9px;text-align:left;cursor:pointer;font:inherit;transition:background .15s,color .15s,transform .15s}
.ew-side-group:hover,.ew-side-link:hover{background:rgba(255,255,255,.09);color:#fff}
.ew-side-group.active{background:rgba(255,255,255,.14);color:#fff;box-shadow:inset 3px 0 0 #a9cceb}
.ew-side-group>svg,.ew-side-link>svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}
.ew-side-group>span{min-width:0;display:flex;flex-direction:column;gap:2px;flex:1}
.ew-side-group b{font-size:10.5px;line-height:1.25;letter-spacing:.15px;white-space:normal}
.ew-side-group small{font-size:9px;color:rgba(220,232,243,.62);font-weight:500}
.ew-side-group i{font-size:18px;font-style:normal;opacity:.5;transition:transform .15s}
.ew-side-group.active i{transform:rotate(90deg);opacity:1}
.ew-side-link{min-height:38px;padding:7px 10px;font-size:11px;font-weight:650}
#ew-quick-menu{padding-top:4px;border-top:1px solid rgba(255,255,255,.11)}

.ew-groups-panel{margin-top:18px}
.ew-groups-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:15px}
.ew-group-card{border:1px solid var(--bd);background:var(--sur);border-radius:10px;padding:18px;display:grid;grid-template-columns:auto 1fr auto;align-items:start;gap:13px;text-align:left;color:var(--tx);cursor:pointer;min-height:138px;transition:border-color .15s,box-shadow .15s,transform .15s}
.ew-group-card:hover{border-color:#88abc9;box-shadow:0 8px 25px rgba(25,55,85,.08);transform:translateY(-1px)}
.ew-group-card>span:nth-child(2){display:flex;flex-direction:column;min-width:0}
.ew-group-card b{font-size:13px;letter-spacing:.1px;margin:1px 0 7px}
.ew-group-card small{font-size:10px;line-height:1.45;color:var(--tx2);min-height:31px}
.ew-group-card em{margin-top:12px;color:var(--brand);font-size:10px;font-style:normal;font-weight:700}
.ew-group-card>i{font-style:normal;color:var(--tx3);font-size:18px}
.ew-group-icon{width:38px;height:38px;border-radius:9px;background:var(--brand-50);color:var(--brand);display:grid;place-items:center}
.ew-group-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}

.ew-group-workspace .ew-head{margin-bottom:16px}
.ew-group-note{display:flex;align-items:center;gap:12px;border:1px solid var(--bd);background:linear-gradient(135deg,var(--brand-50),var(--sur));border-radius:10px;padding:13px 15px;margin-bottom:14px;color:var(--tx)}
.ew-group-note>span{width:35px;height:35px;border-radius:8px;background:var(--sur);display:grid;place-items:center;color:var(--brand);border:1px solid var(--bd)}
.ew-group-note svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.ew-group-note div{display:flex;flex-direction:column;gap:2px}.ew-group-note b{font-size:11px}.ew-group-note small{font-size:10px;color:var(--tx2);line-height:1.4}
.ew-app-panel{overflow:hidden}
.ew-app-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:15px}
.ew-app-card{min-height:156px;border:1px solid var(--bd);background:var(--sur);border-radius:10px;padding:16px;display:grid;grid-template-columns:auto 1fr auto;align-items:start;gap:12px;text-align:left;color:var(--tx);cursor:pointer;transition:border-color .15s,box-shadow .15s,transform .15s}
.ew-app-card:hover{border-color:#7fa6c8;box-shadow:0 8px 24px rgba(25,55,85,.08);transform:translateY(-1px)}
.ew-app-copy{display:flex;flex-direction:column;min-width:0}.ew-app-copy b{font-size:13px;line-height:1.3;margin:2px 0 7px}.ew-app-copy small{font-size:10px;color:var(--tx2);line-height:1.5;min-height:44px}.ew-app-copy em{font-size:9.5px;color:var(--brand);font-style:normal;font-weight:700;margin-top:10px}.ew-app-card .ew-arrow{font-size:15px;color:var(--tx3)}
[data-theme=dark] .ew-group-card,[data-theme=dark] .ew-app-card{background:var(--sur)}
[data-theme=dark] .ew-group-note{background:linear-gradient(135deg,var(--brand-50),var(--sur))}

@media(max-width:1100px){.ew-groups-grid,.ew-app-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){#ew-erp-menu,#ew-quick-menu{margin-left:9px;margin-right:9px}.ew-side-group{min-height:45px}.ew-groups-grid,.ew-app-grid{grid-template-columns:1fr;padding:10px;gap:9px}.ew-group-card,.ew-app-card{min-height:auto;padding:14px}.ew-app-copy small,.ew-group-card small{min-height:auto}.ew-group-note{align-items:flex-start}.ew-group-note small{font-size:9px}}

/* ERP navigation v4 — language switch, preserved legacy-module return path. */
.top-lang-switch{display:flex;align-items:center;gap:8px;min-height:36px;padding:4px 5px 4px 10px;border:1px solid var(--bd);border-radius:9px;background:var(--sur);color:var(--tx2);white-space:nowrap}
.top-lang-switch>span{font-size:10px;font-weight:700;letter-spacing:.1px}
.top-lang-switch select{height:28px;min-height:28px;border:0;border-left:1px solid var(--bd);border-radius:0 6px 6px 0;background:transparent;color:var(--tx);padding:2px 8px;font:inherit;font-size:11px;font-weight:700;outline:0;cursor:pointer}
.top-lang-switch select:focus-visible{outline:2px solid var(--brand);outline-offset:1px}
.ew-app-badge{display:inline-flex!important;align-self:flex-start;margin-top:7px!important;padding:3px 6px;border-radius:5px;background:var(--sur2);border:1px solid var(--bd);color:var(--tx3)!important;font-size:8px!important;line-height:1.25!important;font-weight:700!important}
.ew-app-extra{border-style:dashed}
.ew-group-back{display:inline-flex;align-items:center;gap:6px;flex:0 0 auto}
.ph .ph-r>.ew-group-back{order:-10;margin-right:4px}
.erp-toolbar>.ew-group-back{margin-right:auto}
#bps-crumbs button[data-ew="group-back"]{border:0;background:transparent;padding:0;color:inherit;font:inherit;font-weight:700;cursor:pointer}
#bps-crumbs button[data-ew="group-back"]:hover{color:var(--brand)}
.ew-crumb-sep{opacity:.5;margin:0 6px}
@media(max-width:900px){.top-lang-switch>span{display:none}.top-lang-switch{padding-left:4px}.top-lang-switch select{border-left:0;padding:2px 6px}}
@media(max-width:560px){.top-lang-switch select{max-width:96px;font-size:10px}}
.ew-task-nav{display:flex;gap:6px;align-items:center;overflow:auto;margin:-3px 0 14px;padding:8px;border:1px solid var(--bd);border-radius:9px;background:var(--sur)}
.ew-task-nav button{border:1px solid transparent;background:transparent;color:var(--tx2);border-radius:7px;padding:7px 10px;font:inherit;font-size:10px;font-weight:700;white-space:nowrap;cursor:pointer}
.ew-task-nav button:hover{background:var(--sur2);color:var(--tx)}.ew-task-nav button.active{background:var(--brand-50);border-color:var(--brand-100);color:var(--brand)}
