/* Loaded last. Breakpoints are measured from the workspace, not device names. */
body{font-size:15px}
body :is(input,select,textarea){font-size:15px;min-height:40px}
body :is(button,.button){font-size:14px}
body label{font-size:13px}
body :is(table,.classic-table){font-size:14px}
body .classic-table th{font-size:13px;white-space:nowrap}
body .row-actions :is(button,.button){font-size:13px}
body .workspace>header h1{font-size:19px}
body aside#sidebar :is(nav a,.nav-group summary){font-size:15px;white-space:nowrap}
body .sale-totals>div{font-size:14px;align-items:baseline}
body .sale-totals b{white-space:nowrap}
body .sale-fee-note{grid-template-columns:135px minmax(0,1fr)}
body .sale-customer-row .quick-add{font-size:12px}
body .product-picker{grid-template-columns:minmax(220px,2fr) minmax(110px,1fr) minmax(110px,1fr) minmax(120px,1fr)}
body :is(.revenue-meta,.payment-balances strong,.num,.total-box strong){font-variant-numeric:tabular-nums}
.workspace .heading-actions{flex-wrap:wrap}
.workspace .panel-heading :is(button,.button){flex-shrink:0}
.workspace .page-actions>strong{white-space:nowrap}
.workspace .sale-totals>div>span{min-width:0}
.workspace.content-narrow .sale-customer-row{flex-wrap:wrap}
.workspace.content-narrow .sale-customer-row>label{flex:1 1 210px}
.workspace.content-small .sale-fee-note{grid-template-columns:120px minmax(0,1fr)}
.workspace.content-small .product-picker{grid-template-columns:minmax(0,1fr)}
body.mobile-ui :is(input,select,textarea){font-size:16px}
.workspace{min-width:0}
.workspace>header{display:flex;align-items:center;flex-wrap:wrap;gap:12px}
.workspace>header>.page-title{min-width:0;flex:0 1 auto;overflow-wrap:anywhere}
.workspace>header>.page-controls{order:2;flex:1 1 auto;min-width:0;margin-left:auto;justify-content:flex-end;padding:0}
.workspace>header>.profile{order:3;flex:0 0 auto;margin-left:auto;white-space:nowrap}
.workspace>header>.profile form{margin:0}
.workspace>header>.profile>span{max-width:150px;overflow:hidden;text-overflow:ellipsis}
.workspace :is(.catalog-split,.entry-columns,.two-columns,.inventory-columns,.rates-layout,.nail-top,.legacy-workspace,.grid,.form-grid,.stat-grid,.revenue-grid,.dashboard-panels)>*{min-width:0}
.workspace :is(.panel-body,.stock-entry-right,.card,.legacy-panel){min-width:0;max-width:100%}
.workspace :is(.table-wrap,.scroll-table,.stock-cart-scroll){width:100%;max-width:100%;overflow:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
.workspace :is(.table-wrap,.scroll-table,.stock-cart-scroll):focus-visible{outline:2px solid #86b7fe;outline-offset:-2px}
.workspace .panel-heading{flex-wrap:wrap;gap:10px}
.workspace .panel-heading h2{min-width:0}
.workspace .compact-period{max-width:100%}
.workspace .compact-period label{max-width:100%}
.workspace .compact-period .combo-label{flex:1 1 260px}
.workspace .toolbar{max-width:100%}
.workspace .toolbar label{min-width:0;max-width:100%}
.workspace .audit-json{max-width:100%;overflow-wrap:anywhere}
.workspace.content-compact>header>.page-title{flex:1 1 0}
.workspace.content-compact>header>.page-controls{order:4;flex:1 1 100%;width:100%;margin:0;justify-content:flex-start;border-top:1px solid #e9ecef;padding-top:10px}
.workspace.content-compact :is(.catalog-split,.entry-columns,.two-columns,.inventory-columns,.rates-layout,.legacy-workspace){grid-template-columns:minmax(0,1fr)}
.workspace.content-compact :is(.stat-grid,.grid,.dashboard-panels){grid-template-columns:repeat(2,minmax(0,1fr))}
.workspace.content-compact .nail-top{grid-template-columns:repeat(2,minmax(0,1fr))}
.workspace.content-compact .legacy-info{position:static}
.workspace.content-compact .product-picker{grid-template-columns:repeat(2,minmax(0,1fr))}
.sale-entry-page .workspace.content-compact [data-stock-editor]{height:auto;grid-template-columns:minmax(0,1fr)}
.sale-entry-page .workspace.content-compact [data-stock-editor]>.classic-card{height:auto;display:block;margin-bottom:16px}
.sale-entry-page .workspace.content-compact [data-stock-editor]>.classic-card>.panel-body{overflow:visible}
.sale-entry-page .workspace.content-compact .stock-entry-right{display:block}
.sale-entry-page .workspace.content-compact .stock-entry-right>.classic-card{display:block;margin-bottom:16px}
.sale-entry-page .workspace.content-compact .stock-entry-right>.classic-card:last-child>.panel-body{display:block;padding:12px}
.workspace.content-compact .stock-cart-scroll{max-height:55vh}
.workspace.content-narrow :is(.form-grid,.payment-balances,.revenue-grid,.grid.two){grid-template-columns:minmax(0,1fr)}
.workspace.content-narrow .nail-top{grid-template-columns:minmax(0,1fr)}
.workspace.content-narrow .compact-period{gap:8px}
.workspace.content-narrow .compact-period label{flex-wrap:wrap}
.workspace.content-narrow .compact-period select{max-width:100%}
.workspace.content-small :is(.service-list,.service-catalog,.stat-grid,.dashboard-panels){grid-template-columns:minmax(0,1fr)}
.workspace.content-small>header{gap:8px;padding:12px}
.workspace.content-small>header h1{font-size:15px}
.workspace.content-small>header>.profile{gap:6px}
.workspace.content-small>header>.profile>span{display:none}
.workspace.content-small>header>.profile .button,.workspace.content-small>header>.profile button{font-size:11px;padding:6px 8px}
.workspace.content-small .compact-period input[type=month]{width:150px}
.workspace.content-small .dialog-body{padding:14px}
@media(max-width:760px){body.full-ui .workspace{margin-left:0;padding:12px}body.full-ui aside#sidebar{width:300px;min-width:300px}body.full-ui .mobile-toggle{flex:0 0 auto;margin-right:0}}
@media print{.workspace.content-compact>header{display:none!important}.workspace :is(.table-wrap,.scroll-table,.stock-cart-scroll){overflow:visible;max-height:none}.workspace.content-compact .stock-cart-scroll{max-height:none}}

.workspace.content-small .product-picker{grid-template-columns:minmax(0,1fr)}

body [data-cost-total]{white-space:normal;overflow-wrap:anywhere}

body.mobile-ui .cart-table td{font-size:14px}

/* Consistent readable sizes override older page-specific compact styles. */
body .workspace{font-size:16px;line-height:1.55}
body .workspace :is(input,select,textarea,table,td){font-size:16px!important}
body .workspace :is(label,button,.button,th,.badge,.pill,.rate-category,.screen-tabs a){font-size:15px!important}
body .workspace :is(small,.muted small){font-size:14px!important}
body .workspace>header h1{font-size:20px!important}
body .workspace :is(h2,.panel-heading h2,.dialog-heading h2){font-size:17px}
body .workspace h3{font-size:15px}
body aside#sidebar :is(nav a,.nav-group summary){font-size:16px}
body .workspace input:not([type=checkbox]):not([type=hidden]),body .workspace :is(select,textarea){min-height:42px}
body .workspace input[type=checkbox]{width:18px;height:18px;min-height:0;padding:0;flex:0 0 auto}
body .workspace .row-actions :is(button,.button){padding:6px 10px}
body .workspace .compact-period input[type=month]{width:185px}
body .workspace .compact-period label{white-space:nowrap}
body .workspace .compact-period select{max-width:280px}
body .workspace .rates-layout{grid-template-columns:minmax(240px,300px) minmax(0,1fr);align-items:start}
body .workspace .rates-layout>.rate-categories{position:static;inset:auto;width:auto;min-width:0;padding:0;background:transparent;color:inherit;box-shadow:none;display:block}
body .workspace .rate-category{gap:12px;white-space:normal}
body .workspace .rate-category span{flex-shrink:0;white-space:nowrap}
body .workspace .rates-layout table{min-width:600px}
body .workspace .rates-layout td input{width:100%;min-width:130px}
body .workspace .rates-layout td label{margin:0}
body .workspace .rates-layout tbody td label{font-size:0!important}
body .workspace .shipping-fees{align-items:start;gap:0 16px}
body .workspace .island-field{display:flex;flex-direction:column;gap:5px;margin-bottom:16px;min-width:0}
body .workspace .field-caption{font-size:15px;font-weight:600;color:#6c757d;line-height:1.55}
body .workspace .island-option{margin:0;min-height:42px;padding:8px 10px;display:flex;align-items:center;gap:10px}
body .workspace .island-option>span{display:flex;align-items:center;gap:8px;min-width:0;flex:1}
body .workspace .island-option strong{white-space:nowrap;flex-shrink:0}
body .workspace .shipping-summary{flex-wrap:wrap;gap:16px}
body .workspace .shipping-summary>div{min-width:0}
body .workspace .sale-customer-row .quick-add{font-size:15px!important}
body .workspace .sale-fee-note{grid-template-columns:150px minmax(0,1fr)}
body .workspace .payment-balances>div{min-width:0;overflow-wrap:anywhere}
body .workspace .num{white-space:nowrap}
body.embedded-document.full-ui .workspace,body.embedded-document.mobile-ui .workspace{margin:0!important;padding:12px!important;width:100%;max-width:none}
body.embedded-document .workspace>main{padding:0;max-width:none;width:100%}
body.embedded-document :is(aside#sidebar,.workspace>header,.workspace>footer,.mobile-bottom){display:none!important}
body .workspace.content-narrow .rates-layout{grid-template-columns:minmax(0,1fr)}
body .workspace.content-small .sale-customer-row{align-items:stretch}
body .workspace.content-small .sale-customer-row>label{flex-basis:100%}
body .workspace.content-small .sale-customer-row .quick-add{max-width:none;white-space:nowrap;width:auto}
body .workspace.content-small .product-picker{grid-template-columns:minmax(0,1fr)}
@media(max-width:760px){body.full-ui .workspace{margin-left:0!important}body .workspace .rates-layout{grid-template-columns:minmax(0,1fr)}}
@media print{body.embedded-document .workspace{padding:0!important}body .workspace :is(table,td,th){font-size:12px!important}}

body .workspace .cart-table input{width:130px;min-width:120px}
body .workspace .cart-table select{min-width:105px}
body .workspace .rates-layout td:nth-child(3) input{min-width:160px}
body .workspace [data-ship-row] td:first-child{min-width:240px}
body .workspace [data-ship-row] td:nth-child(2){min-width:160px}
body.mobile-ui .workspace .cart-table input{width:100%;min-width:0}

body.login .login-card{font-size:16px}
body.login .login-card input{font-size:16px;min-height:42px}
body.login .login-card :is(label,button){font-size:15px}

/* v2.0.42: sidebar drawer overlay (noi dung khong doi kich thuoc) + picker fluid 5 cot ti le + tran */
@media(min-width:761px){
body.full-ui .mobile-toggle{display:inline-flex;align-items:center;justify-content:center;margin-right:10px}
body.full-ui aside#sidebar{width:280px;min-width:0;transform:translateX(-105%);visibility:hidden;transition:transform .25s ease,visibility .25s;z-index:70}
body.full-ui .workspace{margin-left:0}
body.full-ui.menu-open{overflow:hidden}
body.full-ui.menu-open aside#sidebar{transform:none;visibility:visible}
body.full-ui.menu-open .sidebar-backdrop{opacity:1;pointer-events:auto}
}
.sidebar-backdrop{position:fixed;inset:0;background:#0009;opacity:0;pointer-events:none;transition:opacity .25s ease;z-index:65}
@media(min-width:700px){
body.full-ui .workspace .product-picker{grid-template-columns:minmax(200px,2.5fr) minmax(80px,1fr) minmax(64px,.7fr) minmax(80px,1fr) auto}
body.full-ui .workspace .product-picker{grid-template-columns:minmax(200px,min(2.5fr,440px)) minmax(80px,min(1fr,150px)) minmax(64px,min(.7fr,110px)) minmax(80px,min(1fr,170px)) auto}
body.full-ui .workspace .product-picker>button{grid-column:auto;justify-self:end;margin:0}
}
@media(min-width:1100px){
body.full-ui .workspace .entry-columns{grid-template-columns:minmax(210px,.65fr) minmax(0,2fr)}
body.full-ui.sale-entry-page .workspace .entry-columns{grid-template-columns:minmax(250px,.55fr) minmax(0,1fr)}
}
@media(max-width:699px){
body.full-ui .workspace .product-picker{grid-template-columns:1fr 1fr}
body.full-ui .workspace .product-picker>label:first-child{grid-column:1/-1}
body.full-ui .workspace .product-picker>button{grid-column:1/-1;justify-self:end}
}
