*{box-sizing:border-box}body{margin:0;background:#f5f7fb;color:#15243d;font:14px Inter,Arial,sans-serif}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}.shell{display:grid;grid-template-columns:245px 1fr;min-height:100vh}.sidebar{background:#fff;border-right:1px solid #e3e9f1;padding:22px 16px}.logo{display:flex;align-items:center;gap:11px;font-size:17px;font-weight:750;margin:2px 8px 30px}.logo b,.brand-mark{display:grid;place-items:center;width:38px;height:38px;border-radius:10px;background:#176448;color:#fff}.sidebar nav{display:flex;flex-direction:column;gap:5px}.sidebar nav a{padding:12px 14px;border-radius:9px;color:#50627b}.sidebar nav a:hover,.sidebar nav a.active{background:#edf7f2;color:#176448;font-weight:650}.content,.page{padding:28px 34px;min-width:0;max-width:1500px;margin:auto}.content header,.page-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:28px}.content header small{color:#728199;font-weight:650}.content h1,.page-head h1{margin:4px 0 0;font-size:29px}.page-head a{color:#64758d}.ghost{background:#fff;border:1px solid #dbe3ed;padding:10px 15px;border-radius:9px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:22px}.stats article,.panel{background:#fff;border:1px solid #e0e7f0;border-radius:13px;box-shadow:0 4px 18px #173b5b08}.stats article{padding:20px}.stats span{display:block;color:#718198;margin-bottom:9px}.stats strong{font-size:26px}.panel{padding:20px;margin-bottom:20px}.panel-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.panel-head h2,.editor h2{font-size:18px;margin:0 0 16px}.panel-head a{color:#176448;font-weight:650}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:13px;border-bottom:1px solid #edf0f4}th{font-size:13px;color:#75849a}.sub{display:block;color:#8491a4;margin-top:4px}.empty{text-align:center;color:#8795a7;padding:30px}.primary{border:0;background:#176448;color:#fff;border-radius:9px;padding:13px 18px;font-weight:700;cursor:pointer}.search{display:flex;gap:10px;margin-bottom:18px}.search input{flex:1;max-width:600px}.search input,.form-grid input,.form-grid select,.form-grid textarea,.sale-line input,.sale-line select{border:1px solid #ccd7e4;border-radius:8px;padding:11px 12px;background:#fff}.search button,.form-actions button:not(.primary){border:1px solid #d5dfea;background:#fff;border-radius:8px;padding:10px 15px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.form-grid label{display:grid;gap:7px;font-weight:600}.form-grid textarea{min-height:80px;resize:vertical}.span2,.form-actions{grid-column:1/-1}.form-actions{display:flex;gap:10px;margin-top:18px}.sale-line{display:grid;grid-template-columns:minmax(250px,1fr) 120px 140px 42px;gap:9px;margin:9px 0}.sale-line button{border:1px solid #e2c9cc;background:#fff5f5;color:#b32b38;border-radius:8px;font-size:20px}.notice{background:#eaf8f0;color:#176448;padding:12px 14px;border-radius:9px;margin-bottom:18px}.login-body{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#eef7f2,#edf3fa)}.login-card{width:min(420px,calc(100% - 30px));padding:34px;background:#fff;border:1px solid #dfe7f0;border-radius:16px;box-shadow:0 20px 60px #15375b18}.login-card .brand-mark{margin-bottom:20px}.login-card h1{margin:0 0 8px}.login-card p{color:#6d7d93;margin:0 0 25px}.login-card form{display:grid;gap:16px}.login-card label{display:grid;gap:7px;font-weight:600}.login-card input{padding:12px;border:1px solid #ccd7e4;border-radius:8px}.wide{width:100%}.alert{background:#fff0f0;color:#a12828;padding:11px;border-radius:8px;margin-bottom:18px}.table-wrap{overflow:auto}@media(max-width:900px) and (min-width:601px){.shell{grid-template-columns:180px 1fr}.logo span{display:none}.sidebar nav a{font-size:13px;padding:12px 10px}.stats{grid-template-columns:repeat(2,1fr)}}@media(max-width:600px){.shell{display:block}.sidebar{position:fixed;z-index:20;left:0;right:0;bottom:0;height:65px;border:0;border-top:1px solid #e1e7ef;padding:7px;background:#fff}.logo{display:none}.sidebar{height:auto;max-height:92px;overflow-x:auto;-webkit-overflow-scrolling:touch}.sidebar nav{height:100%;flex-direction:row;justify-content:flex-start;gap:6px}.sidebar nav a{display:flex;place-items:center;width:auto;min-width:max-content;padding:10px 12px;font-size:13px;white-space:nowrap}.sidebar nav a:before{content:none}.content,.page{padding:20px 14px 85px}.stats{grid-template-columns:1fr 1fr;gap:10px}.stats article{padding:15px}.stats strong{font-size:21px}.panel{padding:13px}.content h1,.page-head h1{font-size:24px}.form-grid{grid-template-columns:1fr}.span2,.form-actions{grid-column:auto}.page-head{align-items:flex-end}.page-head .primary{padding:11px 12px}.search{display:grid;grid-template-columns:1fr auto}.table-wrap{margin:0 -13px}.sale-line{grid-template-columns:1fr 80px 100px 38px;gap:6px}.sale-line select,.sale-line input{min-width:0;padding:9px 7px}}
/* Mobile navigation matching the pre-PHP application: compact off-canvas sidebar. */
.mobile-menu-button{display:none}
@media(max-width:600px){
 .shell{display:block}
 .sidebar{position:fixed;z-index:40;inset:0 auto 0 0;width:min(82vw,290px);height:100dvh;max-height:none;overflow-y:auto;overflow-x:hidden;border:0;border-right:1px solid #dbe3ed;padding:20px 14px;background:#fff;transform:translateX(-105%);transition:transform .2s ease;box-shadow:12px 0 35px #15243d22}
 .sidebar.open{transform:translateX(0)}
 .sidebar .logo{display:flex;margin:2px 8px 24px}
 .sidebar .logo span{display:inline}
 .sidebar nav{height:auto;display:flex;flex-direction:column;justify-content:flex-start;gap:5px}
 .sidebar nav a{display:flex;align-items:center;width:100%;min-width:0;padding:13px 14px;font-size:15px;white-space:normal}
 .sidebar nav a:before{content:none}
 .mobile-menu-button{display:grid;place-items:center;position:fixed;z-index:35;left:14px;top:14px;width:42px;height:42px;border:1px solid #dbe3ed;border-radius:10px;background:#fff;color:#15243d;font-size:22px;box-shadow:0 3px 12px #15243d12}
 .sidebar.open~.mobile-menu-button{left:min(calc(82vw - 56px),234px)}
 .content,.page{padding:72px 14px 24px}
 body.menu-open:after{content:'';position:fixed;z-index:30;inset:0;background:#15243d55}
}

.settings-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 18px}.settings-tabs a{padding:10px 13px;border-radius:9px;background:#edf2f8;color:#344d6a;font-weight:650}.settings-tabs a.active{background:#244b79;color:#fff}.settings-currency{display:flex;justify-content:space-between;gap:15px;padding:14px;background:#f1f5fa;border-radius:9px}.settings-help{color:#60738c}.warehouse-setting{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:10px;align-items:center;margin:10px 0}.warehouse-setting input{border:1px solid #ccd7e4;border-radius:8px;padding:11px 12px}.warehouse-setting span{color:#60738c}.warehouse-setting button{border:1px solid #d5dfea;background:#fff;border-radius:8px;padding:10px 15px}@media(max-width:600px){.settings-tabs{display:grid;grid-template-columns:1fr 1fr}.settings-tabs a{text-align:center;font-size:13px}.settings-currency{flex-direction:column}.warehouse-setting{grid-template-columns:1fr auto}.warehouse-setting span{grid-column:1/-1}}

/* Visual parity with the original pre-PHP workspace */
:root{--ob-bg:#f5f7f8;--ob-text:#192b33;--ob-green:#176448;--ob-green-dark:#163e33;--ob-border:#dfe7e8;--ob-muted:#73838b}
body{background:var(--ob-bg);color:var(--ob-text);font-family:Arial,Helvetica,sans-serif}
.shell{grid-template-columns:270px minmax(0,1fr)}
.sidebar{background:#fff;border-right:1px solid #e1e8e8;padding:0 14px}
.logo{height:auto;padding:24px 10px;color:var(--ob-green);font-size:22px;gap:10px}.logo b{background:var(--ob-green);color:#fff;border-radius:9px;width:34px;height:34px;display:grid;place-items:center}.logo span{font-weight:750}
.sidebar nav{gap:4px}.sidebar nav a{min-height:46px;display:flex;align-items:center;padding:0 14px;border-radius:8px;color:#52636b;font-size:15px;font-weight:500}.sidebar nav a:hover{background:#f3f7f5;color:var(--ob-green)}.sidebar nav a.active{background:#e8f3ed;color:var(--ob-green);font-weight:650}
.content{padding:0 38px 38px;max-width:1600px;width:100%;margin:0 auto}.content>header{height:76px;margin:0 -38px 30px;padding:0 32px;background:#fff;border-bottom:1px solid #e1e8e9;display:flex;align-items:center}.content>header small{color:#73838a;letter-spacing:1.2px}.content>header h1{font-size:22px;color:#263d46;margin:3px 0 0}.content>header .ghost{margin-left:auto}
.panel{background:#fff;border:1px solid #e1e8e9;border-radius:12px;box-shadow:none;margin-bottom:22px;overflow:hidden}.panel-head,.panel-heading{padding:22px 24px;border-bottom:1px solid #edf0f2}.panel h2{font-size:18px;color:#304b55}.primary{background:var(--ob-green);border-color:var(--ob-green);border-radius:8px}.ghost,.outline{border-color:#dfe7e8;border-radius:8px;background:#fff;color:#405861}
input,select,textarea{border-color:#dfe7e8!important;border-radius:8px!important;background:#fff}.notice{background:#e8f3ed;border-color:#cfe4d9;color:#176448}.alert{border-radius:8px}
.stats,.metrics{gap:18px}.stat,.metric{background:#fff;border:1px solid #e1e8e9;border-radius:12px;box-shadow:none}.stat strong,.metric strong{color:#304b55}
table{background:#fff}th{background:#fafbfb;color:#71828b;font-size:13px;text-transform:none}td{border-color:#edf1f2}
.settings-tabs{background:#fff;border:1px solid #e1e8e9;border-radius:12px;padding:7px}.settings-tabs a{background:transparent;color:#64747c}.settings-tabs a.active{background:#e8f3ed;color:#176448}
@media(max-width:900px) and (min-width:601px){.shell{grid-template-columns:220px minmax(0,1fr)}}
@media(max-width:600px){.shell{display:block}.content{padding:0 16px 24px}.content>header{height:66px;margin:0 -16px 20px;padding:0 16px 0 68px}.content>header h1{font-size:19px}.sidebar{padding:0 14px}.sidebar .logo{padding:20px 10px}.mobile-menu-button{top:12px;left:14px;background:#fff;color:#176448;border-color:#dfe7e8}.panel{border-radius:10px}.panel-head,.panel-heading{padding:18px}.settings-tabs{grid-template-columns:1fr 1fr;gap:5px}.settings-tabs a{padding:10px 8px}.stats,.metrics{grid-template-columns:1fr 1fr;gap:10px}}

.page-embedded{max-width:1600px;margin:0 auto;padding:38px}.page-embedded .page-head{margin-top:0}.page-embedded .page-head>div>a:first-child{display:none}
@media(max-width:1100px){.page-embedded{padding:24px}}
@media(max-width:600px){.page-embedded{padding:20px 16px}.page-embedded .page-head{margin-bottom:20px}}

@media(max-width:600px){
 .page-embedded{padding:18px 14px!important}
 .page-embedded .page-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
 .page-embedded .page-head h1{font-size:28px;margin:0}
 .page-embedded .page-head .primary{padding:11px 14px;font-size:14px}
 .page-embedded .search{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
 .page-embedded .search input{min-width:0;width:100%;font-size:16px}
 .page-embedded .search button{white-space:nowrap}
 .page-embedded .table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
 .page-embedded table{min-width:680px}
}

/* Mobile header: keep menu button beside, never over the page title */
@media(max-width:600px){
 .mobile-menu-button{position:fixed!important;top:12px!important;left:14px!important;width:52px!important;height:52px!important;z-index:1001}
 .page-embedded{padding-top:18px!important}
 .page-embedded .page-head{padding-left:66px!important;min-height:56px}
 .page-embedded .page-head>div{min-width:0}
 .page-embedded .page-head h1{white-space:nowrap}
}

@media(max-width:600px){
 body .page-embedded .mobile-title-row{padding-left:78px!important;box-sizing:border-box!important}
 body .page-embedded .mobile-title-row h1{margin-left:0!important;position:relative!important;left:0!important}
 body .mobile-menu-button{left:14px!important}
}


/* Products page: mobile layout without horizontal page overflow. */
.products-page{width:100%;max-width:100%;min-width:0}
.products-panel,.products-panel .table-wrap{min-width:0;max-width:100%}
@media(max-width:600px){
 html,body{max-width:100%;overflow-x:hidden}
 .content{width:100%;max-width:100%;min-width:0;overflow-x:hidden}
 .page-embedded.products-page{width:100%!important;max-width:100%!important;min-width:0!important;padding:18px 14px 28px!important;overflow:hidden}
 body .page-embedded.products-page .products-page-head.mobile-title-row{padding-left:64px!important;min-height:52px;gap:8px;margin-bottom:18px;align-items:center}
 .products-page .products-page-head>div{min-width:0}
 .products-page .products-page-head h1{font-size:25px!important;line-height:1.1;white-space:nowrap}
 .products-page .products-page-head .primary{padding:10px 12px;font-size:13px;min-height:42px;white-space:nowrap;flex-shrink:0}
 .products-page .products-search{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:8px;width:100%;max-width:100%}
 .products-page .products-search input{min-width:0!important;width:100%!important;max-width:none!important;font-size:16px;padding:10px 11px}
 .products-page .products-search button{white-space:nowrap;padding:10px 12px}
 .products-page .products-panel{padding:0!important;overflow:hidden}
 .products-page .products-panel .table-wrap{width:100%;max-width:100%;margin:0!important;overflow:visible!important}
 .products-page .products-table{display:block;width:100%;min-width:0!important;max-width:100%;background:transparent}
 .products-page .products-table thead{display:none}
 .products-page .products-table tbody{display:block;width:100%}
 .products-page .products-table tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);width:100%;padding:14px;gap:12px 16px;border-bottom:1px solid #e8edf3;background:#fff}
 .products-page .products-table tr:last-child{border-bottom:0}
 .products-page .products-table td{display:flex;flex-direction:column;align-items:flex-start;min-width:0;padding:0;border:0;overflow-wrap:anywhere}
 .products-page .products-table td::before{content:attr(data-label);font-size:13px;line-height:1.2;font-weight:700;color:#75849a;margin-bottom:4px}
 .products-page .products-table .product-name-cell{grid-column:1/-1;padding-bottom:10px;border-bottom:1px solid #eef2f6}
 .products-page .products-table .product-name-cell b{font-size:15px;color:#20364f}
 .products-page .products-table .products-empty{grid-column:1/-1;display:block;padding:30px 12px;text-align:center}
 .products-page .products-table .products-empty::before{content:none}
}
@media(max-width:390px){
 body .page-embedded.products-page .products-page-head.mobile-title-row{padding-left:58px!important}
 .products-page .products-page-head h1{font-size:23px!important}
 .products-page .products-page-head .primary{padding:9px 10px;font-size:13px}
}


/* 2026-09-18 mobile shell hardening: one off-canvas menu, no bottom nav, no page overflow. */
@media(max-width:600px){
 html,body{width:100%;max-width:100%;overflow-x:hidden}
 .shell{display:block!important;width:100%!important;max-width:100%!important;min-width:0!important}
 .content{display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important;padding:0!important;overflow-x:hidden!important}
 .sidebar{
   display:block!important;position:fixed!important;z-index:1000!important;
   top:0!important;bottom:0!important;left:0!important;right:auto!important;
   width:min(82vw,290px)!important;height:100dvh!important;max-height:none!important;
   padding:20px 14px!important;overflow-y:auto!important;overflow-x:hidden!important;
   background:#fff!important;border:0!important;border-right:1px solid #dbe3ed!important;
   transform:translateX(-105%)!important;transition:transform .2s ease!important;
   box-shadow:12px 0 35px #15243d22!important;
 }
 .sidebar.open{transform:translateX(0)!important}
 .sidebar .logo{display:flex!important;margin:2px 8px 24px!important;padding:0!important}
 .sidebar .logo span{display:inline!important}
 .sidebar nav{display:flex!important;flex-direction:column!important;justify-content:flex-start!important;gap:5px!important;height:auto!important;width:100%!important}
 .sidebar nav a{display:flex!important;align-items:center!important;width:100%!important;min-width:0!important;min-height:46px!important;padding:0 14px!important;font-size:15px!important;white-space:normal!important;border-radius:8px!important}
 .mobile-menu-button{
   display:grid!important;place-items:center!important;position:fixed!important;z-index:1002!important;
   left:14px!important;top:12px!important;width:48px!important;height:48px!important;
   padding:0!important;border:1px solid #dbe3ed!important;border-radius:12px!important;
   background:#fff!important;color:#176448!important;font-size:22px!important;line-height:1!important;
   box-shadow:0 3px 12px #15243d12!important;
 }
 .sidebar.open~.mobile-menu-button{left:14px!important}
 body.menu-open:after{content:''!important;position:fixed!important;z-index:999!important;inset:0!important;background:#15243d55!important}
 .page-embedded{width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important;padding:16px 14px 28px!important;overflow-x:hidden!important}
 .page-embedded .page-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;min-height:52px!important;padding-left:62px!important;margin:0 0 18px!important}
 .page-embedded .page-head>div{min-width:0!important}
 .page-embedded .page-head>div>a:first-child{display:none!important}
 .page-embedded .page-head h1{margin:0!important;font-size:25px!important;line-height:1.15!important;white-space:nowrap!important}
 .page-embedded .page-head .primary{flex-shrink:0!important;min-height:42px!important;padding:10px 12px!important;font-size:13px!important;white-space:nowrap!important}
 .page-embedded .panel{width:100%!important;max-width:100%!important;min-width:0!important}
 .page-embedded .table-wrap{width:100%!important;max-width:100%!important;margin:0!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch}
 .page-embedded .table-wrap table{max-width:none}
 .page-embedded .search{width:100%!important;max-width:100%!important}
 .page-embedded .search input{min-width:0!important;max-width:none!important}
}
@media(max-width:390px){
 .page-embedded .page-head{padding-left:56px!important}
 .page-embedded .page-head h1{font-size:23px!important}
 .page-embedded .page-head .primary{font-size:13px!important;padding:9px 10px!important}
}


/* Clean mobile empty tables. */
@media(max-width:600px){
 .page-embedded table:has(td.empty) thead{display:none}
 .page-embedded table:has(td.empty){min-width:0!important;width:100%!important}
 .page-embedded table:has(td.empty) tbody,.page-embedded table:has(td.empty) tr{display:block!important;width:100%!important}
 .page-embedded table:has(td.empty) td.empty{display:block!important;width:100%!important;padding:36px 14px!important;border:0!important;text-align:center!important;font-size:15px!important;color:#7d8da2!important}
}


/* Reliable mobile menu: CSS checkbox control, works without JavaScript. */
.mobile-menu-toggle,.mobile-menu-backdrop{display:none}
@media(max-width:600px){
 .mobile-menu-toggle{position:fixed!important;opacity:0!important;pointer-events:none!important}
 .mobile-menu-button{cursor:pointer!important;user-select:none!important;-webkit-user-select:none!important;-webkit-tap-highlight-color:transparent!important}
 .mobile-menu-backdrop{display:none;position:fixed;z-index:999;inset:0;background:#15243d55}
 .mobile-menu-toggle:checked~.mobile-menu-backdrop{display:block!important}
 .mobile-menu-toggle:checked~.sidebar{transform:translateX(0)!important}
 .mobile-menu-toggle:checked~.mobile-menu-button{z-index:1002!important}
}

/* 2026-09-18 — visual parity with the original pre-PHP “Облік 2” workspace */
:root{--ob2-bg:#f4f6fa;--ob2-text:#172238;--ob2-navy:#142037;--ob2-navy2:#29364e;--ob2-orange:#e66035;--ob2-border:#e5e9f1;--ob2-muted:#738095}
body{background:var(--ob2-bg);color:var(--ob2-text);font-family:Inter,'Segoe UI',Arial,sans-serif;letter-spacing:-.15px}
.shell{grid-template-columns:270px minmax(0,1fr)}
.sidebar{background:var(--ob2-navy);border-right:1px solid #233049;padding:0 14px;color:#b5bfd1}
.logo{padding:24px 10px 30px;margin:0;color:#fff;font-size:22px;letter-spacing:-.5px}
.logo b{background:transparent;color:#ff865d;width:34px;height:34px;font-size:25px}
.logo span{color:#fff}.sidebar nav{gap:5px}
.sidebar nav a{min-height:48px;display:flex;align-items:center;padding:0 14px;border-radius:10px;color:#b5bfd1;font-size:15px;font-weight:500;border-left:3px solid transparent}
.sidebar nav a:hover{background:#223149;color:#fff}
.sidebar nav a.active{background:var(--ob2-navy2);color:#fff;font-weight:600;border-left-color:#ff8358}
.content{padding:0 36px 36px;max-width:1650px;width:100%;margin:0 auto}
.content>header{height:72px;margin:0 -36px 28px;padding:0 36px;background:#fff;border-bottom:1px solid #e7ebf2}
.content>header small{color:#8995a6;letter-spacing:1.1px;font-weight:600}
.content>header h1{font-size:22px;color:#162339}
.page-embedded{max-width:1650px;padding:32px 0;margin:0 auto}
.page-head{margin-bottom:22px}.page-head h1,.content h1{color:#162339;letter-spacing:-1px}
.page-head h1{font-size:32px}.ghost,.outline{background:#fff;border:1px solid #e0e6ee;color:#405069;border-radius:10px}
.primary{background:var(--ob2-orange);border-color:var(--ob2-orange);border-radius:10px;color:#fff;box-shadow:0 3px 6px #ce572313}
.primary:hover{background:#cd502a}
.stats{gap:16px;margin-bottom:24px}.stats article{background:#fff;border:1px solid var(--ob2-border);border-radius:14px;box-shadow:0 2px 3px #17223802;padding:22px}
.stats article:first-child{box-shadow:inset 0 3px var(--ob2-orange)}
.stats span{color:#728097;font-size:14px}.stats strong{color:#1b2940;font-size:30px;letter-spacing:-1px}
.panel{background:#fff;border:1px solid var(--ob2-border);border-radius:14px;box-shadow:0 3px 8px #14203702;overflow:hidden;padding:0}
.panel-head,.panel-heading{padding:22px 24px;margin:0;border-bottom:1px solid #edf0f6}
.panel-head h2,.panel h2{color:#1b2940}.panel>form,.panel>p:not(.settings-help),.panel>.settings-help,.panel>.warehouse-setting{margin-left:24px;margin-right:24px}
.table-wrap{margin:0}th{background:#fafbfe;color:#8490a4;font-weight:500;padding:14px 24px}td{color:#4a5b73;padding:16px 24px;border-color:#edf1f2}
.search{background:#fff;border:1px solid var(--ob2-border);border-radius:14px;padding:16px;margin-bottom:20px}
.search input,.search select,.form-grid input,.form-grid select,.form-grid textarea,.sale-line input,.sale-line select{border-color:#dce5e7!important;border-radius:8px!important}
.notice{background:#eaf6ef;color:#31875c}.alert{background:#fff0ed;color:#a94040}
.settings-tabs{background:#fff;border:1px solid var(--ob2-border);border-radius:12px}.settings-tabs a.active{background:#fff0e9;color:#cf623c}
.login-body{background:#f4f6fa}.login-card{border-color:#e3e9f2;border-radius:20px;box-shadow:0 20px 60px #1420370a}.login-card .brand-mark{background:#fff0e9;color:#dd6a44;border:1px solid #ffe2d5;border-radius:14px}.login-card h1{color:#162339}
@media(max-width:900px) and (min-width:601px){.shell{grid-template-columns:220px minmax(0,1fr)}}
@media(max-width:600px){
 body{padding-bottom:74px}
 .shell{display:block}.content{padding:0 16px 24px}.content>header{height:66px;margin:0 -16px 20px;padding:0 16px}
 .mobile-menu-toggle,.mobile-menu-button,.mobile-menu-backdrop{display:none!important}
 .sidebar{position:fixed!important;z-index:1000!important;left:0!important;right:0!important;bottom:0!important;top:auto!important;width:100%!important;height:70px!important;max-height:70px!important;transform:none!important;padding:7px 6px!important;border:0!important;border-top:1px solid #26344c!important;background:#142037!important;box-shadow:0 -8px 25px #14203718!important;overflow-x:auto!important;overflow-y:hidden!important}
 .sidebar .logo{display:none!important}.sidebar nav{height:100%;display:flex!important;flex-direction:row!important;gap:4px!important;align-items:center!important}
 .sidebar nav a{height:54px!important;min-height:54px!important;min-width:74px!important;padding:7px 10px!important;justify-content:center!important;text-align:center!important;font-size:13px!important;line-height:1.2!important;white-space:nowrap!important;border-left:0!important;border-bottom:3px solid transparent!important;border-radius:9px!important;color:#9facbf!important}
 .sidebar nav a.active{background:#29364e!important;color:#fff!important;border-bottom-color:#ff8358!important}
 .page-embedded{padding:20px 0!important}.page-head{padding-left:0!important;min-height:auto!important}.page-head h1{font-size:28px!important}
 .stats{grid-template-columns:1fr 1fr;gap:10px}.stats article{padding:17px}.stats strong{font-size:23px}
 .panel{border-radius:12px}.panel-head,.panel-heading{padding:18px}.search{padding:10px}
 html,body{max-width:100%;overflow-x:hidden}
}

/* 2026-09-18 — mobile: restore the original app side drawer and button treatment */
@media(max-width:600px){
 body{padding-bottom:0!important}
 .mobile-menu-toggle{position:absolute!important;opacity:0!important;pointer-events:none!important;width:1px!important;height:1px!important}
 .mobile-menu-button{display:grid!important;place-items:center!important;position:fixed!important;z-index:1202!important;left:14px!important;top:12px!important;width:46px!important;height:46px!important;border:1px solid #dfe5ee!important;border-radius:12px!important;background:#fff!important;color:#172238!important;font-size:0!important;box-shadow:0 4px 16px #14203714!important}
 .mobile-menu-button:before{content:'☰';font-size:23px;line-height:1}
 .mobile-menu-backdrop{display:block!important;visibility:hidden;opacity:0;position:fixed!important;z-index:1198!important;inset:0!important;background:#0d1728a6!important;transition:.2s}
 .sidebar{display:block!important;position:fixed!important;z-index:1200!important;left:0!important;top:0!important;bottom:0!important;right:auto!important;width:min(82vw,310px)!important;height:100dvh!important;max-height:none!important;padding:18px 14px!important;background:#142037!important;border:0!important;border-right:1px solid #26344c!important;box-shadow:18px 0 45px #0c142644!important;overflow-y:auto!important;overflow-x:hidden!important;transform:translateX(-105%)!important;transition:transform .22s ease!important}
 .sidebar .logo{display:flex!important;padding:8px 10px 24px!important;margin:0!important}.sidebar .logo b{display:grid!important}.sidebar .logo span{display:inline!important}
 .sidebar nav{display:flex!important;flex-direction:column!important;height:auto!important;gap:6px!important}
 .sidebar nav a{display:flex!important;justify-content:flex-start!important;text-align:left!important;width:100%!important;height:48px!important;min-height:48px!important;min-width:0!important;padding:0 15px!important;border:0!important;border-left:3px solid transparent!important;border-radius:10px!important;color:#aeb9cb!important;font-size:15px!important;line-height:1!important}
 .sidebar nav a:hover{background:#202e45!important;color:#fff!important}
 .sidebar nav a.active{background:#2b3952!important;color:#fff!important;border-left-color:#ff7a4c!important;box-shadow:inset 0 0 0 1px #ffffff08!important}
 .mobile-menu-toggle:checked~.mobile-menu-backdrop{visibility:visible!important;opacity:1!important}
 .mobile-menu-toggle:checked~.sidebar{transform:translateX(0)!important}
 .content{padding:0 16px 26px!important}
 .content>header{height:70px!important;margin:0 -16px 20px!important;padding:0 16px 0 72px!important}
 .page-embedded{padding:18px 0 26px!important}
 .page-embedded .page-head,.page-embedded .mobile-title-row{padding-left:58px!important;min-height:48px!important}
 .page-head .primary,.form-actions .primary,.search button{border-radius:10px!important;box-shadow:0 3px 8px #d9552a20!important}
 .page-head .primary{background:#e66035!important;color:#fff!important;border:1px solid #e66035!important}
 .stats article:first-child{border-top:3px solid #e66035!important}
}

/* Hybrid navigation from the original app: desktop side sections + mobile bottom bar and drawer */
.nav-group{display:block}.nav-sub{display:none;padding:2px 0 6px 18px}.nav-group.active .nav-sub{display:flex;flex-direction:column;gap:2px}.sidebar .nav-sub a{min-height:34px;padding:0 12px;font-size:13px;color:#8f9cb0;border-left:1px solid #3b4960;border-radius:0}.sidebar .nav-sub a:hover{background:transparent;color:#fff}
.mobile-bottom-nav{display:none}
@media(max-width:600px){
 body{padding-bottom:72px!important}
 .mobile-bottom-nav{display:grid;grid-template-columns:repeat(5,1fr);position:fixed;z-index:1150;left:0;right:0;bottom:0;height:70px;background:#142037;border-top:1px solid #2b3952;padding:6px 5px calc(6px + env(safe-area-inset-bottom));box-shadow:0 -7px 24px #1420371c}
 .mobile-bottom-nav a,.mobile-bottom-nav label{display:flex;align-items:center;justify-content:center;text-align:center;color:#aeb9cb;font-size:13px;font-weight:550;border-radius:9px;cursor:pointer}
 .mobile-bottom-nav a.active{background:#2b3952;color:#fff;box-shadow:inset 0 -3px #ff7a4c}
 .mobile-bottom-nav label{color:#d4dbe6}
 .mobile-menu-button{display:none!important}
 .sidebar{padding-bottom:88px!important}
 .nav-group.active .nav-sub{display:flex!important}
}

/* menu stability fix */
.mobile-menu-toggle{position:absolute;opacity:0;pointer-events:none}
@media(min-width:601px){.mobile-bottom-nav,.mobile-menu-button,.mobile-menu-backdrop{display:none!important}.sidebar{transform:none!important}.nav-group.active .nav-sub{display:flex}}
@media(max-width:600px){
 .mobile-bottom-nav{display:grid!important}
 .mobile-bottom-nav label{user-select:none;-webkit-user-select:none}
 .mobile-menu-toggle:checked~.sidebar{transform:translateX(0)!important}
 .mobile-menu-toggle:checked~.mobile-menu-backdrop{display:block!important;visibility:visible!important;opacity:1!important;pointer-events:auto!important}
 body.menu-open{overflow:hidden}
}


/* 2026-09-18 final mobile navigation parity: exactly 4 bottom actions. */
@media(max-width:600px){
 .mobile-bottom-nav{grid-template-columns:repeat(4,minmax(0,1fr))!important;height:70px!important}
 .mobile-bottom-nav a{min-width:0!important;padding:6px 4px!important;font-size:13px!important;white-space:nowrap!important}
 .mobile-bottom-nav label{display:none!important}
 body{padding-bottom:72px!important}
 .sidebar{padding-bottom:88px!important}
}

.sidebar .nav-sub a.active{color:#fff!important;font-weight:600!important;border-left-color:#ff7a4c!important;background:#ffffff08!important}
@media(max-width:600px){.sidebar .nav-sub a.active{background:#223149!important;color:#fff!important;border-left-color:#ff7a4c!important}}

.finance-chart{margin-bottom:20px}.finance-bars{padding:18px 24px}.finance-bar-row{display:grid;grid-template-columns:72px 1fr 1fr;gap:12px;align-items:center;margin:12px 0}.finance-bar-row>span{font-size:13px;color:#738095}.finance-bar-row>div{position:relative;height:32px;background:#f2f4f8;border-radius:8px;overflow:hidden}.finance-bar-row i{position:absolute;inset:0 auto 0 0;min-width:2px;background:#e66035;border-radius:8px}.finance-bar-row i.expense{background:#a9b3c3}.finance-bar-row small{position:relative;z-index:1;display:flex;align-items:center;height:100%;padding:0 9px;color:#26354b;font-size:13px}
@media(max-width:600px){.finance-bars{padding:14px}.finance-bar-row{grid-template-columns:58px 1fr;gap:7px}.finance-bar-row>div{grid-column:2}.finance-bar-row>span{grid-row:1/3}}

/* Mobile access to the full main menu. Keep four primary actions + separate menu trigger. */
@media(max-width:600px){.mobile-more-button{display:flex!important;position:fixed!important;z-index:1160!important;right:10px!important;bottom:78px!important;width:54px!important;height:44px!important;align-items:center!important;justify-content:center!important;background:#fff!important;color:#172238!important;border:1px solid #dfe5ee!important;border-radius:12px!important;box-shadow:0 4px 16px #14203718!important;font-size:13px!important;font-weight:700!important}.mobile-menu-toggle:checked~.mobile-bottom-nav .mobile-more-button{display:none!important}}
@media(min-width:601px){.mobile-more-button{display:none!important}}

/* 2026-09-18 mobile home dashboard */
.home-dashboard{background:#f5f7fb;min-height:100vh}.home-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:16px}.home-actions a{display:flex;justify-content:center;align-items:center;min-height:52px;border-radius:16px;font-size:18px;font-weight:750;text-decoration:none}.home-sale{background:#35c98a;color:#fff}.home-writeoff{background:#ffe5eb;color:#ef476f}.home-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:16px}.home-kpis a{display:flex;flex-direction:column;gap:6px;padding:20px;background:#fff;border:1px solid #e4e9f1;border-radius:18px;text-decoration:none;color:#18253b;box-shadow:0 4px 16px #17243b0a}.home-kpis span,.home-kpis small{color:#71809a}.home-kpis strong{font-size:25px}.home-ok{display:flex;align-items:center;gap:14px;padding:18px 22px;margin-bottom:16px;background:#f0fbf6;border:1px solid #dcefe6;border-radius:18px}.home-ok>b{display:grid;place-items:center;width:42px;height:42px;border-radius:50%;background:#16c777;color:#fff;font-size:22px}.home-ok div{display:flex;flex-direction:column;gap:3px}.home-ok small{color:#71809a}.home-chart{margin-bottom:16px}.home-chart .panel-head>span{color:#71809a}.home-chart-bars{height:220px;padding:18px 24px 30px;display:flex;align-items:flex-end;gap:10px;border-top:1px solid #eef1f5}.home-chart-bars>div{height:100%;flex:1;min-width:18px;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:7px}.home-chart-bars i{display:block;width:min(24px,70%);background:#19c875;border-radius:7px 7px 2px 2px;min-height:4px}.home-chart-bars small{font-size:13px;color:#8793a7;white-space:nowrap}.home-sale-list>a{display:grid;grid-template-columns:1fr auto auto;gap:18px;align-items:center;padding:14px 22px;border-top:1px solid #edf0f4;text-decoration:none;color:#172238}.home-sale-list span{display:flex;flex-direction:column;gap:3px}.home-sale-list small{color:#8a96aa}.home-sale-list em{font-style:normal;background:#dff8eb;color:#0da763;padding:7px 13px;border-radius:9px}.home-sale-list strong{text-align:right}
@media(max-width:600px){.home-dashboard{padding-top:0!important}.home-top{padding-left:16px!important}.home-top small{font-size:13px;letter-spacing:.12em}.home-top h1{font-size:20px!important;margin-top:2px}.home-actions{gap:9px}.home-actions a{min-height:48px;font-size:16px;border-radius:14px}.home-kpis{grid-template-columns:1fr 1fr;gap:10px}.home-kpis a{padding:15px;border-radius:16px;min-height:112px}.home-kpis strong{font-size:22px}.home-kpis small{font-size:13px}.home-ok{padding:14px 16px;border-radius:16px}.home-chart,.home-recent{border-radius:18px!important}.home-chart .panel-head,.home-recent .panel-head{padding:16px}.home-chart .panel-head h2,.home-recent .panel-head h2{font-size:19px}.home-chart-bars{height:190px;padding:14px 12px 27px;gap:5px;overflow-x:auto}.home-chart-bars>div{min-width:24px}.home-chart-bars i{width:16px}.home-sale-list>a{grid-template-columns:1fr auto;padding:13px 16px;gap:8px}.home-sale-list em{grid-row:1/3;grid-column:2;padding:6px 9px;font-size:13px}.home-sale-list strong{grid-column:1/3;text-align:right;font-size:14px}.mobile-more-button{bottom:78px!important}}

/* php-v2 migration: old Облік 2 workspace parity */
.migration-workspace{min-width:0;flex:1;background:#f4f6fa;min-height:100vh}.migration-topbar{height:72px;background:#fff;border-bottom:1px solid #e7ebf2;display:flex;align-items:center;padding:0 36px;color:#738095;font-size:14px}.migration-topbar i{font-style:normal;margin:0 8px;color:#c3cccf}.migration-topbar b{color:#263d46;font-weight:500}.migration-avatar{margin-left:auto;width:36px;height:36px;display:grid;place-items:center;border-radius:11px;background:#fff0e9;color:#c15834;font-weight:700}.migration-page{max-width:1650px;margin:auto;padding:32px 36px}.migration-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:22px}.migration-heading p{font-size:13px;font-weight:600;letter-spacing:1.1px;color:#8995a6;margin:0 0 10px}.migration-heading h1{font-size:32px;margin:0 0 10px}.migration-heading>div>span{color:#7a889b;font-size:14px}.migration-metrics{grid-template-columns:repeat(4,1fr)}.migration-workspace table{width:100%;border-collapse:collapse}.migration-workspace th{padding:14px 24px;background:#fafbfe;color:#8490a4;font-size:13px;text-align:left;font-weight:500}.migration-workspace td{padding:16px 24px;border-top:1px solid #edf1f2;color:#4a5b73;font-size:14px}
@media(max-width:600px){.migration-topbar{padding:0 16px;height:64px}.migration-page{padding:22px 16px}.migration-heading{align-items:flex-start;flex-direction:column}.migration-heading h1{font-size:28px}.migration-heading .primary{width:100%}.migration-metrics{grid-template-columns:1fr 1fr;gap:12px}.migration-workspace .dashboard-grid{grid-template-columns:1fr}.migration-workspace .table-wrap{overflow-x:auto}.migration-workspace th,.migration-workspace td{padding:13px 14px;white-space:nowrap}}

/* php-v2 catalog parity */
.migration-workspace .sales-tabs{display:flex;gap:8px;margin-bottom:16px}.migration-workspace .sales-tabs a{padding:10px 14px;border:1px solid #e0e6ee;border-radius:9px;background:#fff;color:#64748a;text-decoration:none;font-size:14px}.migration-workspace .sales-tabs a.active{background:#142037;color:#fff;border-color:#142037}.catalog-toolbar{display:grid;grid-template-columns:minmax(220px,1fr) 220px auto auto;gap:10px;padding:18px 20px;border-bottom:1px solid #edf1f2;align-items:center}.catalog-toolbar input[type=text],.catalog-toolbar>input,.catalog-toolbar select{height:42px;border:1px solid #dfe5ee;border-radius:9px;padding:0 12px;background:#fff}.catalog-toolbar label{display:flex;align-items:center;gap:7px;color:#64748a;font-size:13px;white-space:nowrap}.catalog-pagination{display:flex;justify-content:flex-end;align-items:center;gap:8px;padding:12px 20px;color:#7a889b;font-size:13px}.catalog-pagination .outline{padding:6px 11px;text-decoration:none}.catalog-pagination .disabled{pointer-events:none;opacity:.4}.catalog-rows{border-top:1px solid #edf1f2}.catalog-row{display:grid;grid-template-columns:minmax(260px,1fr) minmax(300px,.8fr) auto;align-items:center;gap:18px;padding:15px 20px;border-bottom:1px solid #edf1f2}.catalog-product{display:flex;align-items:center;gap:12px}.catalog-product>span:last-child{display:flex;flex-direction:column;gap:5px}.catalog-product small{color:#8794a8}.catalog-prices{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.catalog-prices span{display:flex;flex-direction:column;gap:4px;color:#8794a8;font-size:13px}.catalog-prices b{font-size:14px;color:#33465f}.catalog-sell{text-decoration:none}
@media(max-width:700px){.catalog-toolbar{grid-template-columns:1fr}.catalog-row{grid-template-columns:1fr;gap:12px}.catalog-prices{order:2}.catalog-row .row-actions{order:3;justify-content:stretch}.catalog-sell{width:100%}.catalog-pagination{justify-content:center}.migration-workspace .sales-tabs{overflow-x:auto}.migration-workspace .sales-tabs a{white-space:nowrap}}


/* php-v2 stock control parity */
.stock-ledger .panel-head span{display:block;color:#7b889b;margin-top:6px;font-size:13px}.movement-filters{display:grid;grid-template-columns:minmax(220px,1fr) 210px 210px auto auto;gap:10px;padding:18px 20px;border-bottom:1px solid #edf1f2}.movement-filters input,.movement-filters select{height:42px;border:1px solid #dfe5ee;border-radius:9px;padding:0 12px;background:#fff}.movement-filters .outline{display:flex;align-items:center;justify-content:center;padding:0 14px}.movement-summary{display:flex;gap:28px;padding:14px 20px;background:#fafbfe;border-bottom:1px solid #edf1f2;color:#7b889b;font-size:13px}.movement-summary b{color:#273b55;margin-left:5px}.movement-table td small{display:block;color:#8995a6;margin-top:4px}.movement-badge{display:inline-flex;padding:6px 9px;border-radius:8px;font-size:13px;font-weight:650}.movement-badge.in{background:#e8f8ef;color:#168354}.movement-badge.out{background:#fff0ed;color:#b74c35}.qty-plus{color:#168354!important;font-weight:700}.qty-minus{color:#c34f3a!important;font-weight:700}
@media(max-width:800px){.movement-filters{grid-template-columns:1fr 1fr}.movement-filters input:first-of-type{grid-column:1/-1}.movement-summary{overflow-x:auto;white-space:nowrap}.stock-ledger .table-wrap{overflow-x:auto}.movement-table{min-width:1050px}}
@media(max-width:520px){.movement-filters{grid-template-columns:1fr}.movement-filters input:first-of-type{grid-column:auto}.movement-summary{padding:12px 14px;gap:18px}}

/* php-v2 catalog row actions from old catalog */
.catalog-row .row-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px}.catalog-row .row-actions form{margin:0}.icon-button{width:38px;height:38px;display:inline-grid;place-items:center;border:1px solid #dfe5ee;border-radius:9px;background:#fff;color:#52637a;text-decoration:none;cursor:pointer;font-size:18px}.icon-button:hover{background:#f7f9fc;color:#172238}.icon-button.danger{color:#bd4c4c;border-color:#f0d8d8}.icon-button.danger:hover{background:#fff1f1}.editor .form-actions .outline{display:inline-flex;align-items:center;justify-content:center;padding:10px 15px}
@media(max-width:700px){.catalog-row .row-actions{display:grid;grid-template-columns:1fr 38px 38px 38px}.catalog-row .row-actions form{width:38px}.catalog-row .row-actions form button{width:38px}.catalog-sell{display:flex;align-items:center;justify-content:center}}


/* Keep the submenu of the current desktop section expanded across navigation. */
@media (min-width: 901px){
  .sidebar .nav-group.open > .nav-sub,
  .sidebar .nav-group.active > .nav-sub{
    display:flex !important;
    max-height:none !important;
    opacity:1 !important;
    visibility:visible !important;
    overflow:visible !important;
    pointer-events:auto !important;
  }
}


/* Invoice parity toolbar */
.invoice-toolbar{display:grid;grid-template-columns:minmax(260px,1fr) 220px auto auto;gap:10px;align-items:center;margin:14px 0 16px}
.invoice-toolbar input,.invoice-toolbar select{height:42px;border:1px solid #dfe5ee;border-radius:9px;background:#fff;padding:0 12px;color:#33465f;font:inherit}
.invoice-toolbar .outline{min-height:42px;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;white-space:nowrap}
@media(max-width:760px){.invoice-toolbar{grid-template-columns:1fr 1fr}.invoice-toolbar input{grid-column:1/-1}}
@media(max-width:520px){.invoice-toolbar{grid-template-columns:1fr}.invoice-toolbar input{grid-column:auto}}

.delivery-toolbar{grid-template-columns:minmax(260px,1fr) auto auto}
.delivery-card summary{cursor:pointer;list-style:none;width:100%;display:grid;grid-template-columns:minmax(220px,1fr) auto;gap:14px;align-items:center}
.delivery-card summary::-webkit-details-marker{display:none}
.delivery-card[open] summary{padding-bottom:14px;border-bottom:1px solid #e8edf4;margin-bottom:16px}
.delivery-form{padding:0 2px 4px}
@media(max-width:760px){.delivery-toolbar{grid-template-columns:1fr auto}.delivery-toolbar input{grid-column:1/-1}.delivery-card summary{grid-template-columns:1fr}}

/* Supply list parity */
.supply-toolbar{grid-template-columns:minmax(280px,1fr) 220px auto auto;margin:14px 0}
.supply-toolbar input,.supply-toolbar select{height:42px;border:1px solid #dfe5ee;border-radius:9px;background:#fff;padding:0 12px;font:inherit}
@media(max-width:760px){.supply-toolbar{grid-template-columns:1fr 1fr}.supply-toolbar input{grid-column:1/-1}}
@media(max-width:520px){.supply-toolbar{grid-template-columns:1fr}.supply-toolbar input{grid-column:auto}}

/* Supply draft editor parity */
.supply-edit-details summary{cursor:pointer;font-weight:650;color:#33465f}
.supply-inline-form{display:grid;gap:12px;margin-top:12px;padding:14px;border:1px solid #e4e9f0;border-radius:10px;background:#fafbfe}
.supply-inline-form .compact-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.supply-inline-form label{display:grid;gap:5px;font-size:13px;color:#66758b}
.supply-inline-form input,.supply-inline-form select{width:100%;min-height:40px;border:1px solid #dfe5ee;border-radius:8px;background:#fff;padding:7px 10px;font:inherit;color:#33465f}
.supply-edit-lines{display:grid;gap:8px}
.supply-edit-lines .sale-line{grid-template-columns:minmax(260px,1fr) 110px 130px}
@media(max-width:700px){.supply-inline-form .compact-fields{grid-template-columns:1fr}.supply-edit-lines .sale-line{grid-template-columns:1fr}}

.supply-shortage-confirm{display:flex;align-items:center;gap:9px;margin:12px 0;padding:11px 12px;border:1px solid #f0c8bd;border-radius:9px;background:#fff6f2;color:#9a452f;font-size:13px;font-weight:650}
.supply-shortage-confirm[hidden]{display:none!important}.supply-shortage-confirm input{width:16px;height:16px;margin:0}

.supply-summary summary{cursor:pointer;font-weight:650;color:#33465f}
.supply-summary-body{display:grid;gap:8px;margin-top:10px;padding:12px;border:1px solid #e4e9f0;border-radius:9px;background:#fafbfe}
.supply-summary-body>div{display:flex;justify-content:space-between;gap:16px}
.supply-summary-total{padding-top:8px;border-top:1px solid #dfe5ee;color:#172238}
.supply-summary-body small{display:block;color:#66758b}

/* Product photos — old catalog parity */
.catalog-product{display:flex;align-items:center;gap:12px;text-decoration:none;color:inherit;min-width:0}
.product-photo{width:48px;height:48px;flex:0 0 48px;border:1px solid #e1e7ef;border-radius:9px;background:#f8fafc;display:flex;align-items:center;justify-content:center;overflow:hidden}
.product-photo img{width:100%;height:100%;object-fit:contain;background:#fff}
.product-photo-editor{grid-column:1/-1;display:grid;gap:10px;padding:14px;border:1px solid #e1e7ef;border-radius:10px;background:#fafbfe}
#photo-list{display:flex;flex-wrap:wrap;gap:10px}.photo-edit-item{position:relative;width:92px;height:92px;border:1px solid #dfe5ee;border-radius:9px;background:#fff;overflow:hidden}
.photo-edit-item img{width:100%;height:100%;object-fit:contain}.photo-edit-item .danger{position:absolute;right:4px;top:4px;background:#fff}
.photo-upload-button{width:max-content;cursor:pointer}.product-photo-editor small{color:#718096}
@media(max-width:700px){.product-photo{width:56px;height:56px;flex-basis:56px}.photo-edit-item{width:78px;height:78px}}

/* Full product card parity */
.product-detail-card{margin-bottom:18px;padding:22px}.product-detail-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;margin-bottom:20px}.product-detail-head h2{margin:5px 0 3px;font-size:24px}.product-detail-head small{color:#74839a}.product-detail-grid{display:grid;grid-template-columns:minmax(280px,420px) 1fr;gap:28px}.product-gallery{min-width:0}.gallery-main{height:360px;border:1px solid #e1e7ef;border-radius:12px;background:#fff;display:flex;align-items:center;justify-content:center;overflow:hidden}.gallery-main img{width:100%;height:100%;object-fit:contain}.gallery-main .is-hidden{display:none}.gallery-empty{flex-direction:column;gap:10px;color:#8290a4;font-size:34px}.gallery-empty small{font-size:13px}.gallery-thumbnails{display:flex;gap:8px;margin-top:9px;overflow:auto}.gallery-thumbnails button{width:64px;height:64px;padding:3px;border:1px solid #dfe5ee;border-radius:8px;background:#fff;cursor:pointer}.gallery-thumbnails button.active{border-color:#e66035}.gallery-thumbnails img{width:100%;height:100%;object-fit:contain}.product-detail-info{display:grid;align-content:start;gap:16px}.product-detail-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.product-detail-stats>div{padding:15px;border:1px solid #e4e9f0;border-radius:10px;background:#fafbfe}.product-detail-stats span{display:block;color:#78879c;font-size:13px}.product-detail-stats b{display:block;margin-top:4px;font-size:20px;color:#172238}.compact-details{margin:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;border:1px solid #e4e9f0;border-radius:10px;overflow:hidden}.compact-details div{padding:11px 13px;border-bottom:1px solid #edf0f5}.compact-details dt{font-size:13px;color:#8190a4}.compact-details dd{margin:3px 0 0;font-weight:650}.product-detail-section{margin-top:22px;padding-top:18px;border-top:1px solid #e8edf4}.product-detail-section h3{margin:0 0 12px}.product-description{white-space:pre-wrap;color:#46566d}.detail-actions{display:flex;gap:9px;align-items:center}.detail-actions a{text-decoration:none}
@media(max-width:800px){.product-detail-head{display:grid}.product-detail-grid{grid-template-columns:1fr}.gallery-main{height:300px}.compact-details{grid-template-columns:1fr}.detail-actions{flex-wrap:wrap}}

/* Old product editor fields */
.product-editor-v2 .product-kind-tabs{grid-column:1/-1;display:flex;gap:7px;flex-wrap:wrap}.product-kind-tabs label{display:block}.product-kind-tabs input{position:absolute;opacity:0;pointer-events:none}.product-kind-tabs span{display:block;padding:8px 13px;border:1px solid #dfe5ee;border-radius:8px;background:#fff;cursor:pointer;font-size:13px}.product-kind-tabs input:checked+span{background:#172238;border-color:#172238;color:#fff}.input-action{display:flex;gap:7px;align-items:center}.input-action input{flex:1}.input-action .text-button{white-space:nowrap}.product-description-editor{grid-column:1/-1}.product-description-editor textarea{width:100%;resize:vertical;min-height:120px}.product-description-editor small{color:#718096}
@media(max-width:600px){.input-action{align-items:stretch;flex-direction:column}.product-kind-tabs{display:grid!important;grid-template-columns:1fr 1fr}}

.product-stock-editor{grid-column:1/-1;padding:14px;border:1px solid #e1e7ef;border-radius:10px;background:#fafbfe}.product-stock-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:10px}.product-stock-head small{display:block;margin-top:3px;color:#718096}.product-stock-row{display:grid;grid-template-columns:minmax(180px,1.3fr) 110px 130px 130px 85px 38px;gap:8px;align-items:center;margin-top:8px}.product-stock-row input,.product-stock-row select{width:100%;min-height:40px;border:1px solid #dfe5ee;border-radius:8px;background:#fff;padding:7px 9px;font:inherit}.stock-markup{text-align:right;font-weight:650;color:#33465f}@media(max-width:800px){.product-stock-head{align-items:flex-start;flex-direction:column}.product-stock-row{grid-template-columns:1fr 1fr}.product-stock-row select{grid-column:1/-1}.stock-markup{text-align:left}}

.product-attributes{margin:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border:1px solid #e4e9f0;border-radius:10px;overflow:hidden}.product-attributes div{display:grid;grid-template-columns:minmax(120px,.8fr) 1.2fr;gap:12px;padding:10px 13px;border-bottom:1px solid #edf0f5}.product-attributes dt{color:#78879c}.product-attributes dd{margin:0;font-weight:650}.product-source dd{overflow-wrap:anywhere}.similar-product-warning{grid-column:1/-1;padding:13px;border:1px solid #f0d6a5;border-radius:10px;background:#fffaf0}.similar-product-warning p{margin:4px 0 9px;color:#7b6848}.similar-product-warning>div{display:grid;gap:6px}.similar-product-warning a{display:grid;grid-template-columns:1fr auto;gap:2px 12px;padding:9px 10px;border:1px solid #eadfc9;border-radius:8px;background:#fff;text-decoration:none;color:#33465f}.similar-product-warning a small{color:#78879c}.similar-product-warning a span{grid-row:1/3;grid-column:2;align-self:center;color:#e66035;font-weight:650}@media(max-width:700px){.product-attributes{grid-template-columns:1fr}.product-attributes div{grid-template-columns:1fr}.similar-product-warning a{grid-template-columns:1fr}.similar-product-warning a span{grid-row:auto;grid-column:auto}}

/* Exact old product editor structure */
.product-edit-dialog{width:min(720px,100%);max-width:720px}.product-editor .editor-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;border-bottom:1px solid #dbe2eb;margin-bottom:16px}.product-editor .editor-tabs button{border:0;background:transparent;padding:12px 3px;border-bottom:3px solid transparent;color:#53647b;font-size:14px}.product-editor .editor-tabs button[aria-selected=true]{color:#b44a16;border-color:#e66035;background:#fff7f1}.editor-page{min-height:280px}.compact-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.full-field{grid-column:1/-1}.product-editor .field{display:grid;gap:7px}.product-editor .field input,.product-editor .field select,.product-editor .field textarea{width:100%;border:1px solid #dbe2ea;border-radius:8px;padding:10px;background:#fff;color:#273b53}.product-editor .product-kind-tabs{display:flex;background:#eef1f5;border-radius:10px;padding:4px;margin-bottom:22px}.product-editor .product-kind-tabs button{flex:1;border:0;background:transparent;border-radius:8px;padding:10px 5px;font-size:13px;color:#5a6b82}.product-editor .product-kind-tabs button[aria-pressed=true]{background:#fff;color:#263b56;box-shadow:0 2px 8px #20344c10;font-weight:650}.product-editor .warehouse-pager{display:flex;align-items:center;justify-content:space-between;font-size:14px;gap:10px}.product-editor .stock-editor{margin:10px 0}.product-editor .stock-editor table{width:100%;border-collapse:collapse;min-width:540px}.product-editor .stock-editor th{text-align:left;color:#5d6e84;font-weight:500;padding:10px 8px;font-size:13px}.product-editor .stock-editor td{padding:10px 8px;border-bottom:1px solid #edf0f4}.product-editor .stock-editor tr[hidden]{display:none!important}.product-editor .stock-editor-actions{display:flex;gap:18px;align-items:center;flex-wrap:wrap;margin-top:15px}.product-editor .editor-photos{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:12px}.product-editor .editor-photos>div{position:relative}.product-editor .editor-photos .product-photo{display:block;width:100%;height:85px}.product-editor .editor-photos .product-photo img{width:100%;height:100%;object-fit:contain}.product-editor .editor-photos button{position:absolute;right:0;top:0;background:#fff;border:1px solid #d6dfeb;border-radius:50%;width:28px;height:28px;color:#a52d2d}@media(max-width:700px){.compact-fields{grid-template-columns:1fr}.full-field{grid-column:auto}.product-editor .editor-tabs button{font-size:13px}.product-editor .product-kind-tabs button{font-size:13px}.product-editor .editor-photos{grid-template-columns:repeat(2,1fr)}}

/* Old compact product detail card */
.product-sheet{width:min(880px,100%);max-width:880px;background:#fff}.product-sheet-header{padding:22px 28px 8px}.product-sheet-header h2{font-size:22px;color:#243853;line-height:1.5;margin:6px 0}.product-detail-body{padding:10px 28px 30px}.compact-product-details>.editor-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;border-bottom:1px solid #dbe2eb;margin-bottom:16px}.compact-product-details>.editor-tabs button{border:0;background:transparent;padding:12px 3px;border-bottom:3px solid transparent;color:#53647b;font-size:14px}.compact-product-details>.editor-tabs button[aria-selected=true]{color:#b44a16;border-color:#e66035;background:#fff7f1}.compact-product-details .gallery-main{height:160px;border:0}.compact-product-details .gallery-thumbnails{display:flex;flex-wrap:wrap;gap:6px}.compact-product-details .gallery-thumbnails button{width:38px;height:38px}.compact-product-details .product-detail-stats{display:grid;grid-template-columns:1fr 1fr;gap:16px;padding:14px;background:#f8f9fc;border:1px solid #eef1f6;border-radius:11px;margin:12px 0}.compact-product-details .product-detail-stats span{color:#53657a;font-size:14px;display:block;margin-bottom:5px}.compact-product-details .product-detail-stats b{font-size:20px;color:#405774}.compact-product-details .compact-details{display:block;border:0;border-radius:0}.compact-product-details .compact-details>div{display:flex;justify-content:space-between;gap:14px;padding:11px 0;border-bottom:1px solid #e5eaf0}.compact-product-details .compact-details dt{color:#52647b;font-size:14px}.compact-product-details .compact-details dd{margin:0;color:#24364d;font-size:14px;text-align:right}.compact-product-details .product-description{max-height:45dvh;overflow:auto;color:#8799b0;line-height:1.8}.compact-product-details .detail-actions{display:flex;gap:10px;margin-top:16px}.compact-product-details .detail-actions .primary{flex:1;text-align:center;justify-content:center}.detail-stock-page[hidden],.product-detail-page[hidden]{display:none!important}@media(max-width:700px){.product-sheet-header,.product-detail-body{padding-left:18px;padding-right:18px}.compact-product-details>.editor-tabs button{font-size:13px}.compact-product-details .detail-actions{display:grid}}

/* Catalog — exact legacy row geometry */
.catalog-panel{overflow:hidden}.catalog-toolbar{display:flex;gap:12px;padding:18px;align-items:center;flex-wrap:wrap}.catalog-toolbar>input,.catalog-toolbar>select{border:1px solid #dce3ec;border-radius:9px;padding:11px;background:#fff;color:#2c415b;font-size:16px;min-width:0}.catalog-toolbar>input{flex:2;min-width:180px}.catalog-toolbar>select{flex:1;max-width:350px}.catalog-toolbar>label{display:flex;gap:8px;align-items:center;font-size:14px;color:#52647b}.catalog-pagination{display:flex;align-items:center;justify-content:flex-end;gap:12px;padding:12px 18px;border-top:1px solid #e6ecf2;font-size:14px;color:#52647b}.catalog-pagination>span:first-child{margin-right:auto}.catalog-pagination .outline{padding:8px}.catalog-row{display:grid;grid-template-columns:minmax(0,1fr) 330px auto;gap:20px;padding:18px;align-items:center;border-top:1px solid #e6ecf2}.catalog-product{display:flex;gap:12px;text-align:left;align-items:center;min-width:0;text-decoration:none;color:inherit}.catalog-product>span:last-child{min-width:0}.catalog-product b{font-size:15px;line-height:1.5;overflow-wrap:anywhere;display:block}.catalog-product small{display:block;color:#66788e;font-size:13px;margin-top:4px;overflow-wrap:anywhere}.catalog-product .product-photo{width:46px;height:46px;flex-shrink:0;border-radius:10px;background:#f1f4f7;display:inline-flex;align-items:center;justify-content:center;color:#92a0b2;overflow:hidden}.catalog-product .product-photo img{width:100%;height:100%;object-fit:cover}.catalog-prices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.catalog-prices span{font-size:13px;color:#62748b}.catalog-prices b{display:block;font-size:15px;color:#243b56;margin-top:5px}.catalog-row .row-actions{display:flex;justify-content:flex-end;gap:5px;align-items:center}.catalog-row .row-actions form{margin:0}.catalog-row .icon-button{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;padding:0}.catalog-pagination-bottom{border-bottom:0}
@media(max-width:700px){.catalog-row{grid-template-columns:minmax(0,1fr);gap:12px;padding:16px}.catalog-product .product-photo{width:52px;height:52px}.catalog-prices{grid-template-columns:repeat(3,minmax(0,1fr))}.catalog-row .row-actions{justify-content:flex-start}.catalog-sell{margin-right:auto}.catalog-toolbar>input,.catalog-toolbar>select{width:100%;max-width:none;flex-basis:100%}.catalog-pagination{gap:8px;padding:10px 12px}.catalog-pagination>span:first-child{font-size:13px}}

/* Product detail media parity */
.product-no-photo{display:block;text-align:center;color:#8c98a6;margin:8px 0 14px}.barcode-display{overflow:auto;background:#fff;margin:18px 0;text-align:center}.barcode-bars{height:72px;display:flex;align-items:stretch;justify-content:center;min-width:max-content;padding:12px}.barcode-bars i{display:block;height:48px}.barcode-bars .bar{width:2px;background:#172238}.barcode-bars .gap{width:1px;background:transparent}.barcode-display code{display:block;font-size:13px;color:#24364d;letter-spacing:1px;padding-bottom:8px}

/* Product editor sizing and explicit stock field labels */
.product-edit-dialog{width:min(100%,980px)}.product-editor .editor-page{min-height:270px}.product-editor .compact-fields{grid-template-columns:minmax(0,2fr) minmax(180px,1fr)}.product-editor .compact-fields .field input,.product-editor .compact-fields .field select{width:100%}.stock-editor{width:100%}.stock-editor .stock-table-wrap{overflow:visible}.stock-editor table{width:100%;table-layout:fixed}.stock-editor th:nth-child(1),.stock-editor td:nth-child(1){width:28%}.stock-editor th:nth-child(2),.stock-editor td:nth-child(2){width:16%}.stock-editor th:nth-child(3),.stock-editor td:nth-child(3){width:20%}.stock-editor th:nth-child(4),.stock-editor td:nth-child(4){width:20%}.stock-editor th:nth-child(5),.stock-editor td:nth-child(5){width:16%}.stock-editor td{padding:10px 7px;vertical-align:bottom}.stock-editor select,.stock-editor input{width:100%;min-width:0;height:42px}.stock-field-label{display:none;font-size:13px;font-weight:600;color:#62748b;margin:0 0 6px}.stock-editor-actions{margin-top:14px}
@media(max-width:700px){.product-edit-dialog{width:100%}.product-editor .compact-fields{grid-template-columns:1fr}.stock-editor table,.stock-editor tbody,.stock-editor tr,.stock-editor td{display:block;width:100%!important}.stock-editor thead{display:none}.stock-editor tr{padding:8px 0}.stock-editor td{border:0;padding:6px 0}.stock-field-label{display:block}.stock-editor .stock-markup{min-height:40px;padding-top:8px}.stock-editor-actions{display:flex;gap:8px;flex-wrap:wrap}}

/* Catalog forms — wide layout from approved reference */
.catalog-form-panel{width:100%!important;max-width:none!important;box-sizing:border-box;margin:0 0 18px;border:1px solid #dfe6ef;border-radius:12px;background:#fff;box-shadow:0 1px 3px rgba(23,34,56,.03)}.catalog-form-panel>h2{margin:0;padding:16px 20px 6px;font-size:20px;color:#172238}.product-edit-dialog form{padding:0 20px 18px}.product-editor .editor-tabs{gap:0;margin:8px 0 18px;border:1px solid #e1e7ef;border-radius:10px 10px 0 0;overflow:hidden;background:#f8fafc}.product-editor .editor-tabs button{min-height:48px;border-right:1px solid #e6ebf1;border-bottom:2px solid transparent}.product-editor .editor-tabs button:last-child{border-right:0}.product-editor .editor-tabs button[aria-selected=true]{background:#fff7f2;border-bottom-color:#f05b2a;color:#d84b1e;font-weight:650}.product-editor .editor-page{min-height:0}.product-editor .compact-fields{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px 18px}.product-editor .compact-fields .full-field{grid-column:span 2}.product-editor .field{font-size:13px;font-weight:600;color:#24364d}.product-editor .field input,.product-editor .field select,.product-editor .field textarea{min-height:42px;border-color:#d5deea;border-radius:7px;font-size:14px;font-weight:400}.product-editor-page[data-tab="2"]{padding:0}.product-editor .warehouse-pager{padding:8px 4px 10px}.product-editor .stock-editor{padding:12px 16px 14px;border:1px solid #f0e4de;border-radius:10px;background:#fff9f6}.product-editor .stock-table-wrap{background:#fff}.product-editor .stock-editor table{min-width:0}.product-editor .stock-editor th{background:#f7f9fc;padding:9px 10px}.product-editor .stock-editor td{padding:8px 10px}.product-editor .stock-editor select,.product-editor .stock-editor input{height:40px;border:1px solid #d5deea;border-radius:7px;padding:8px 10px;background:#fff}.product-editor .stock-editor th:nth-child(1),.product-editor .stock-editor td:nth-child(1){width:25%}.product-editor .stock-editor th:nth-child(2),.product-editor .stock-editor td:nth-child(2){width:13%}.product-editor .stock-editor th:nth-child(3),.product-editor .stock-editor td:nth-child(3){width:20%}.product-editor .stock-editor th:nth-child(4),.product-editor .stock-editor td:nth-child(4){width:20%}.product-editor .stock-editor th:nth-child(5),.product-editor .stock-editor td:nth-child(5){width:16%}.product-edit-dialog .form-actions{padding:0 20px 18px;margin-top:0}.product-edit-dialog .form-actions .primary{min-width:150px}.receive-form-panel form{padding:10px 20px 20px;grid-template-columns:minmax(260px,2fr) minmax(180px,1fr) auto;align-items:end}.receive-form-panel .form-actions{margin:0}.product-sheet{width:100%!important;max-width:none!important}.product-sheet .product-detail-body{padding-bottom:24px}.catalog-panel{width:100%;max-width:none}
@media(max-width:900px){.product-editor .compact-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.product-editor .compact-fields .full-field{grid-column:1/-1}.receive-form-panel form{grid-template-columns:1fr 1fr}.receive-form-panel .form-actions{grid-column:1/-1}}
@media(max-width:700px){.catalog-form-panel{border-radius:10px}.product-edit-dialog form{padding:0 14px 14px}.product-editor .editor-tabs{overflow-x:auto;grid-template-columns:repeat(5,minmax(82px,1fr))}.product-editor .compact-fields{grid-template-columns:1fr}.product-editor .compact-fields .full-field{grid-column:auto}.product-editor .stock-editor{padding:10px}.receive-form-panel form{grid-template-columns:1fr;padding:8px 14px 16px}.product-edit-dialog .form-actions{padding:0 14px 16px}}

/* Product catalog — approved wide mockup refinement */
.catalog-form-panel{padding:0 22px 20px}.catalog-form-panel>h2{padding:16px 0 4px}.product-edit-dialog form{padding:0}.product-editor .editor-tabs{margin:8px 0 20px}.product-editor .editor-tabs button{height:52px;font-size:14px}.product-editor .compact-fields{grid-template-columns:repeat(12,minmax(0,1fr));gap:16px}.product-editor .compact-fields>.field{grid-column:span 4}.product-editor .compact-fields>.full-field{grid-column:span 8}.product-editor .compact-fields>.category-field{grid-column:span 4}.category-entry{display:flex;gap:8px}.category-entry input{flex:1;min-width:0}.category-add-button{white-space:nowrap;padding:8px 12px}.category-field small{font-size:13px;font-weight:400;color:#73849a;line-height:1.35}.product-editor-page[data-tab="0"]{padding:4px 0 12px}.product-editor-page[data-tab="2"] .warehouse-pager{margin-bottom:4px}.product-editor .stock-editor{margin:0;background:#fff9f6;padding:14px}.product-editor .stock-table-wrap{border-radius:7px;overflow:hidden}.product-editor .stock-editor th{height:36px}.product-editor .stock-editor td{height:56px}.product-edit-dialog .form-actions{padding:14px 0 0}.product-edit-dialog .form-actions .primary{min-width:160px}.receive-form-panel{padding:0 22px 20px}.receive-form-panel form{padding:8px 0 0}.product-sheet{padding:0 22px 20px}.product-sheet-header{padding-left:0;padding-right:0}.product-sheet .product-detail-body{padding-left:0;padding-right:0}.catalog-panel{border-radius:12px}.catalog-toolbar{padding:14px 18px}.catalog-row{padding:14px 18px}.catalog-product .product-photo{border-radius:9px}
@media(max-width:1100px){.product-editor .compact-fields>.field{grid-column:span 6}.product-editor .compact-fields>.full-field{grid-column:1/-1}.product-editor .compact-fields>.category-field{grid-column:span 6}}
@media(max-width:700px){.catalog-form-panel{padding:0 14px 16px}.product-editor .compact-fields>.field,.product-editor .compact-fields>.full-field,.product-editor .compact-fields>.category-field{grid-column:1/-1}.category-entry{align-items:stretch}.product-editor .stock-editor{padding:10px}.product-edit-dialog .form-actions{padding-top:12px}}

/* Category creation dialog */
body.modal-open{overflow:hidden}.category-modal[hidden]{display:none}.category-modal{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:20px}.category-modal-backdrop{position:absolute;inset:0;background:rgba(10,18,29,.72)}.category-modal-card{position:relative;width:min(620px,100%);background:#fff;border-radius:14px;padding:18px;box-shadow:0 24px 70px rgba(0,0,0,.28)}.category-modal-card h3{margin:0 0 14px;font-size:18px;color:#172238}.category-modal-fields{display:grid;grid-template-columns:1fr 1fr;gap:16px}.category-modal-fields label{font-size:13px;font-weight:600;color:#52647b}.category-modal-fields select,.category-modal-fields input{display:block;width:100%;height:44px;margin-top:7px;border:1px solid #cfd9e6;border-radius:9px;padding:0 12px;background:#fff;color:#172238;font-size:14px}.category-modal-fields input:focus,.category-modal-fields select:focus{outline:2px solid rgba(47,139,211,.25);border-color:#2f8bd3}.category-modal-actions{display:grid;grid-template-columns:auto 1fr;gap:10px;margin-top:22px}.category-modal-actions button{min-height:46px}.category-modal-actions .primary{width:100%}@media(max-width:600px){.category-modal-fields{grid-template-columns:1fr}.category-modal-actions{grid-template-columns:1fr}.category-modal-card{padding:16px}}

/* Stock editor readability — labels and usable field widths */
.product-editor-page[data-tab="2"] .stock-editor table{table-layout:auto!important}.product-editor-page[data-tab="2"] .stock-editor th,.product-editor-page[data-tab="2"] .stock-editor td{width:auto!important}.product-editor-page[data-tab="2"] .stock-editor th:nth-child(1),.product-editor-page[data-tab="2"] .stock-editor td:nth-child(1){min-width:240px}.product-editor-page[data-tab="2"] .stock-editor th:nth-child(2),.product-editor-page[data-tab="2"] .stock-editor td:nth-child(2){min-width:150px}.product-editor-page[data-tab="2"] .stock-editor th:nth-child(3),.product-editor-page[data-tab="2"] .stock-editor td:nth-child(3){min-width:190px}.product-editor-page[data-tab="2"] .stock-editor th:nth-child(4),.product-editor-page[data-tab="2"] .stock-editor td:nth-child(4){min-width:190px}.product-editor-page[data-tab="2"] .stock-editor th:nth-child(5),.product-editor-page[data-tab="2"] .stock-editor td:nth-child(5){min-width:130px}.product-editor-page[data-tab="2"] .stock-table-wrap{overflow-x:auto}.product-editor-page[data-tab="2"] .stock-field-label{display:block!important;margin-bottom:6px;font-size:13px;font-weight:650;color:#52647b}.product-editor-page[data-tab="2"] .stock-editor td{vertical-align:top}.product-editor-page[data-tab="2"] .stock-editor select,.product-editor-page[data-tab="2"] .stock-editor input{display:block!important;width:100%!important;min-width:120px!important;height:42px!important;padding:8px 10px!important;font-size:14px!important;line-height:22px!important;color:#172238!important;background:#fff!important;border:1px solid #cfd9e6!important;border-radius:7px!important}.product-editor-page[data-tab="2"] .stock-editor select{min-width:210px!important}.product-editor-page[data-tab="2"] .stock-markup{padding-top:8px!important;font-size:15px;font-weight:700;color:#24364d}.product-editor-page[data-tab="2"] .stock-markup .stock-field-label{font-weight:650}.product-editor-page[data-tab="2"] .stock-editor-actions{padding-top:4px}
@media(max-width:700px){.product-editor-page[data-tab="2"] .stock-table-wrap{overflow:visible}.product-editor-page[data-tab="2"] .stock-editor select,.product-editor-page[data-tab="2"] .stock-editor input{min-width:0!important}.product-editor-page[data-tab="2"] .stock-editor th,.product-editor-page[data-tab="2"] .stock-editor td{min-width:0!important}}

/* Stock editor desktop height fix: one clean row, no nested vertical clipping */
@media(min-width:701px){.product-editor-page[data-tab="2"] .stock-editor{overflow:visible}.product-editor-page[data-tab="2"] .stock-table-wrap{overflow-x:auto!important;overflow-y:visible!important;padding-bottom:6px}.product-editor-page[data-tab="2"] .stock-editor table{min-width:900px!important}.product-editor-page[data-tab="2"] .stock-editor thead tr{height:38px!important}.product-editor-page[data-tab="2"] .stock-editor tbody tr{height:auto!important;min-height:78px}.product-editor-page[data-tab="2"] .stock-editor th{height:38px!important;padding:9px 10px!important;vertical-align:middle}.product-editor-page[data-tab="2"] .stock-editor td{height:auto!important;min-height:72px;padding:10px!important;vertical-align:top!important;overflow:visible!important}.product-editor-page[data-tab="2"] .stock-field-label{height:17px;line-height:17px;margin:0 0 6px!important}.product-editor-page[data-tab="2"] .stock-editor select,.product-editor-page[data-tab="2"] .stock-editor input{height:42px!important;min-height:42px!important;max-height:42px!important;box-sizing:border-box!important;margin:0!important}.product-editor-page[data-tab="2"] .stock-markup{height:auto!important;min-height:72px!important;padding:10px!important}.product-editor-page[data-tab="2"] .stock-markup>.stock-field-label{margin-bottom:10px!important}}

/* Stock editor final desktop alignment */
@media(min-width:701px){.product-editor-page[data-tab="2"] .stock-table-wrap{overflow:visible!important;padding:0!important}.product-editor-page[data-tab="2"] .stock-editor table{width:100%!important;min-width:0!important;table-layout:fixed!important;border-collapse:separate!important;border-spacing:0!important}.product-editor-page[data-tab="2"] .stock-editor th,.product-editor-page[data-tab="2"] .stock-editor td{min-width:0!important;width:auto!important;padding-left:8px!important;padding-right:8px!important}.product-editor-page[data-tab="2"] .stock-editor th:nth-child(1),.product-editor-page[data-tab="2"] .stock-editor td:nth-child(1){width:27%!important}.product-editor-page[data-tab="2"] .stock-editor th:nth-child(2),.product-editor-page[data-tab="2"] .stock-editor td:nth-child(2){width:14%!important}.product-editor-page[data-tab="2"] .stock-editor th:nth-child(3),.product-editor-page[data-tab="2"] .stock-editor td:nth-child(3){width:20%!important}.product-editor-page[data-tab="2"] .stock-editor th:nth-child(4),.product-editor-page[data-tab="2"] .stock-editor td:nth-child(4){width:20%!important}.product-editor-page[data-tab="2"] .stock-editor th:nth-child(5),.product-editor-page[data-tab="2"] .stock-editor td:nth-child(5){width:19%!important}.product-editor-page[data-tab="2"] .stock-editor select,.product-editor-page[data-tab="2"] .stock-editor input{width:100%!important;min-width:0!important}.product-editor-page[data-tab="2"] .stock-field-label{display:none!important}.product-editor-page[data-tab="2"] .stock-markup{vertical-align:middle!important;padding:8px!important}.product-editor-page[data-tab="2"] .stock-markup::before{content:"Націнка";display:block;margin-bottom:6px;font-size:13px;font-weight:650;color:#52647b}.product-editor-page[data-tab="2"] .stock-markup{font-size:15px!important;font-weight:700!important}.product-editor-page[data-tab="2"] .stock-editor tbody td+td{border-left:8px solid transparent}.product-editor-page[data-tab="2"] .stock-editor-actions{margin-top:12px!important}}

/* Stock editor — stable grid, no conflicting table sizing */
.product-editor-page[data-tab="2"] .stock-editor{padding:14px!important;overflow:visible!important}.product-editor-page[data-tab="2"] .stock-table-wrap{overflow:visible!important;padding:0!important}.product-editor-page[data-tab="2"] .stock-editor table{width:100%!important;min-width:0!important;table-layout:fixed!important;border-collapse:collapse!important}.product-editor-page[data-tab="2"] .stock-editor thead th{height:38px!important;padding:8px 10px!important;background:#f7f9fc!important;text-align:left!important}.product-editor-page[data-tab="2"] .stock-editor tbody td{height:62px!important;min-height:0!important;padding:10px!important;vertical-align:middle!important;border:0!important}.product-editor-page[data-tab="2"] .stock-editor th:nth-child(1),.product-editor-page[data-tab="2"] .stock-editor td:nth-child(1){width:28%!important}.product-editor-page[data-tab="2"] .stock-editor th:nth-child(2),.product-editor-page[data-tab="2"] .stock-editor td:nth-child(2){width:14%!important}.product-editor-page[data-tab="2"] .stock-editor th:nth-child(3),.product-editor-page[data-tab="2"] .stock-editor td:nth-child(3){width:20%!important}.product-editor-page[data-tab="2"] .stock-editor th:nth-child(4),.product-editor-page[data-tab="2"] .stock-editor td:nth-child(4){width:20%!important}.product-editor-page[data-tab="2"] .stock-editor th:nth-child(5),.product-editor-page[data-tab="2"] .stock-editor td:nth-child(5){width:18%!important}.product-editor-page[data-tab="2"] .stock-field-label{display:none!important}.product-editor-page[data-tab="2"] .stock-editor select,.product-editor-page[data-tab="2"] .stock-editor input{display:block!important;width:100%!important;min-width:0!important;height:42px!important;min-height:42px!important;max-height:42px!important;margin:0!important;padding:8px 10px!important;box-sizing:border-box!important}.product-editor-page[data-tab="2"] .stock-markup{height:62px!important;min-height:0!important;padding:10px!important;vertical-align:middle!important;font-size:15px!important}.product-editor-page[data-tab="2"] .stock-markup::before{content:""!important;display:none!important}.product-editor-page[data-tab="2"] .stock-editor-actions{margin-top:10px!important}
@media(max-width:700px){.product-editor-page[data-tab="2"] .stock-table-wrap{overflow-x:auto!important}.product-editor-page[data-tab="2"] .stock-editor table{min-width:720px!important}}


/* Product stock editor — final clear field layout */
.product-editor-page[data-tab="2"] .stock-table-wrap{overflow:visible!important}
.product-editor-page[data-tab="2"] .stock-editor table,
.product-editor-page[data-tab="2"] .stock-editor tbody{display:block!important;width:100%!important}
.product-editor-page[data-tab="2"] .stock-editor thead{display:none!important}
.product-editor-page[data-tab="2"] .stock-editor tbody tr.product-stock-row{display:grid!important;grid-template-columns:minmax(220px,1.5fr) minmax(120px,.75fr) minmax(150px,1fr) minmax(150px,1fr) minmax(110px,.65fr)!important;gap:16px!important;width:100%!important;height:auto!important;min-height:0!important;padding:4px 0!important;align-items:end!important}
.product-editor-page[data-tab="2"] .stock-editor tbody tr.product-stock-row>td{display:block!important;width:auto!important;height:auto!important;min-height:0!important;padding:0!important;border:0!important;vertical-align:bottom!important}
.product-editor-page[data-tab="2"] .stock-field-label{display:block!important;height:auto!important;margin:0 0 7px!important;font-size:13px!important;line-height:1.25!important;font-weight:650!important;color:#52647b!important}
.product-editor-page[data-tab="2"] .stock-editor select,
.product-editor-page[data-tab="2"] .stock-editor input{display:block!important;width:100%!important;height:42px!important;min-height:42px!important;max-height:42px!important;margin:0!important;padding:8px 10px!important;border:1px solid #cfd9e6!important;border-radius:7px!important;background:#fff!important;box-sizing:border-box!important}
.product-editor-page[data-tab="2"] .stock-markup{display:flex!important;flex-direction:column!important;justify-content:flex-end!important;height:auto!important;min-height:0!important;padding:0!important;font-size:15px!important;font-weight:700!important}
.product-editor-page[data-tab="2"] .stock-markup::before{display:none!important;content:none!important}
.product-editor-page[data-tab="2"] .stock-markup .stock-field-label{display:block!important}
@media(max-width:900px){.product-editor-page[data-tab="2"] .stock-editor tbody tr.product-stock-row{grid-template-columns:1fr 1fr!important}.product-editor-page[data-tab="2"] .stock-markup{min-height:62px!important}}
@media(max-width:560px){.product-editor-page[data-tab="2"] .stock-editor tbody tr.product-stock-row{grid-template-columns:1fr!important;gap:12px!important}.product-editor-page[data-tab="2"] .stock-markup{min-height:0!important}}


/* Supplies — legacy Obлік 2 visual language */
.supply-editor-panel{overflow:hidden;padding:0 18px 18px}
.supply-editor-panel>.panel-heading{margin:0 -18px 0;padding:16px 18px;background:#f5f8fc;border-bottom:1px solid #dbe3ee;display:flex;align-items:center;justify-content:space-between}
.supply-editor-panel>.panel-heading h2{margin:0}
.supply-editor-panel>.panel-heading small{display:block;margin-top:4px;color:#59677a}
.supply-editor-panel>.supply-steps{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0 18px;font-size:13px}
.supply-editor-panel>.supply-steps span{padding:7px 10px;border-radius:20px;background:#f0f2f5;color:#52637b}
.supply-editor-panel>.supply-steps span[aria-current]{background:#fff0e3;color:#974008;font-weight:700}
.supply-editor-panel .form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 18px}
.supply-editor-panel label{font-size:13px;font-weight:600;color:#52637b}
.supply-editor-panel label input,.supply-editor-panel label select,.supply-editor-panel label textarea{display:block;width:100%;margin-top:6px}
.supply-editor-panel h3{margin:20px 0 8px}
.supply-editor-panel #supply-lines{border-top:1px solid #e5e9ee}
.supply-editor-panel #supply-lines .sale-line{display:grid;grid-template-columns:minmax(280px,2fr) 130px 160px 42px;gap:10px;padding:12px 0;border-bottom:1px solid #e5e9ee;align-items:center}
.supply-editor-panel #supply-lines .sale-line select,.supply-editor-panel #supply-lines .sale-line input{width:100%;height:42px}
.supply-editor-panel .form-actions{margin-top:18px}
.supply-toolbar{margin:18px 0 12px}
.supply-list-panel{overflow:hidden}
.supply-list-panel>.panel-heading{padding:15px 18px;background:#f5f8fc;border-bottom:1px solid #dbe3ee}
.supply-list-panel>.panel-heading h2{margin:0}
.supply-list-table{width:100%}
.supply-list-table th{background:#f8fafc;color:#52637b;font-size:13px;font-weight:650}
.supply-list-table td{padding:16px 14px;vertical-align:top;border-top:1px solid #e5e9ee}
.supply-list-table tbody tr:hover{background:#fbfcfe}
.supply-list-table details{border-top:1px solid #e5e9ee;padding-top:8px}
.supply-list-table summary{cursor:pointer;color:#243d60;font-weight:650}
.supply-inline-form{padding:12px 0}
.supply-inline-form .compact-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.supply-inline-form label{font-size:13px;font-weight:600;color:#52637b}
.supply-inline-form input,.supply-inline-form select{width:100%;margin-top:5px}
.supply-edit-lines .sale-line,.supply-expenses .sale-line{display:grid;grid-template-columns:minmax(220px,2fr) 120px 150px;gap:10px;margin:10px 0}
.supply-shortage-confirm{display:flex!important;gap:8px;align-items:center;padding:12px;margin:10px 0;background:#fff7e6;border-radius:10px}
.supply-summary-body{display:grid;gap:8px;padding:12px 0}
.supply-summary-body>div{display:flex;justify-content:space-between;gap:18px}
.supply-summary-total{padding-top:8px;border-top:1px solid #e5e9ee}
.supply-delete-form .danger{background:#fce9eb;border-color:#e2a8af;color:#9b2535}
@media(max-width:800px){.supply-editor-panel .form-grid{grid-template-columns:1fr}.supply-editor-panel #supply-lines .sale-line{grid-template-columns:1fr 1fr}.supply-editor-panel #supply-lines .sale-line select{grid-column:1/-1}.supply-inline-form .compact-fields{grid-template-columns:1fr 1fr}.supply-list-panel .table-wrap{overflow-x:auto}.supply-list-table{min-width:780px}}
@media(max-width:520px){.supply-inline-form .compact-fields,.supply-editor-panel #supply-lines .sale-line{grid-template-columns:1fr}}


/* Settings — legacy Obлік 2 */
.settings-page[hidden],.directory-section[hidden]{display:none!important}
.settings-tabs{display:flex;gap:8px;margin-bottom:24px;border-bottom:1px solid #dfe6ef;flex-wrap:wrap}
.settings-tabs button{padding:13px 18px;color:#596d86;border:0;border-bottom:3px solid transparent;background:transparent;font-weight:600;cursor:pointer}
.settings-tabs button.active{color:#b95322;border-bottom-color:#f58445}
.settings-card{max-width:760px}
.settings-card>h2{padding:18px 22px;margin:0;border-bottom:1px solid #dbe3ee;background:#f5f8fc}
.settings-card>.form-grid{padding:22px}
.directory-panel{padding:28px;max-width:1050px}
.directory-title{display:flex;gap:15px;align-items:center;margin-bottom:28px}
.directory-book-icon{display:grid;place-items:center;width:34px;height:34px;color:#df7a42;font-size:25px}
.directory-title h2{font-size:22px;margin:0}.directory-title p{color:#60748c;margin:6px 0 0}
.directory-tabs{display:flex;gap:10px;border-bottom:1px solid #e2e8ef;margin-bottom:24px;flex-wrap:wrap}
.directory-tabs button{display:flex;align-items:center;gap:9px;padding:13px;border:0;border-bottom:3px solid transparent;background:transparent;color:#63758c;cursor:pointer}
.directory-tabs button[aria-selected=true]{color:#ae542b;border-bottom-color:#ed8a51;background:#fff8f3}
.directory-tabs button span{font-size:13px;background:#edf1f5;padding:2px 6px;border-radius:5px}
.directory-tools{display:flex;gap:14px;justify-content:space-between;margin-bottom:20px}
.directory-tools input,.directory-editor input{border:1px solid #dbe2ea;border-radius:8px;padding:10px;background:#fff;color:#273b53;min-width:0}
.directory-tools input{width:min(65%,400px)}
.directory-editor{display:flex;gap:12px;align-items:end;flex-wrap:wrap;background:#f6f8fb;padding:20px;border-radius:12px;margin:20px 0}
.directory-editor .field{flex:1;min-width:170px}
.directory-row{display:flex;align-items:center;gap:14px;padding:17px 8px;border-bottom:1px solid #edf1f6}
.directory-row>div{flex:1}.directory-row b{font-size:15px}.directory-row small{display:block;color:#6b7b90;margin-top:5px}
.directory-entry-icon{background:#f0f4f8;color:#64809e;border-radius:9px;padding:10px;display:flex;min-width:39px;justify-content:center}
.warehouse-setting{display:grid;grid-template-columns:minmax(220px,1fr) 150px auto;gap:12px;align-items:center;padding:14px 8px;border-bottom:1px solid #edf1f6}
.warehouse-setting input{width:100%;border:1px solid #dbe2ea;border-radius:8px;padding:10px}
.loyalty-settings>.panel-heading{background:#f5f8fc;border-bottom:1px solid #dbe3ee;padding:18px 22px}
.loyalty-settings>h2{padding:18px 22px;margin:0;border-bottom:1px solid #dbe3ee;background:#f5f8fc}
.loyalty-settings form{padding:24px}
.loyalty-settings fieldset{min-width:0;border:0;padding:0}
.loyalty-settings .form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.loyalty-settings label{color:#52637b}
#organizations>.panel-heading{background:#f5f8fc;border-bottom:1px solid #dbe3ee;padding:16px 18px}
#organizations #orgEditor{padding:20px;border-bottom:1px solid #e5e9ee;background:#fbfcfe}
#organizations>.customer-row{padding:18px}
@media(max-width:700px){.settings-tabs button{flex:1 1 140px;padding:11px 8px}.directory-panel{padding:18px}.directory-tabs{gap:2px}.directory-tabs button{flex:1 1 120px;justify-content:center}.directory-tools{align-items:stretch;flex-direction:column}.directory-tools input{width:100%}.warehouse-setting{grid-template-columns:1fr}.loyalty-settings .form-grid{grid-template-columns:1fr}}

/* Settings directory action polish */
.directory-row .icon-button{width:38px;height:38px;display:grid;place-items:center;border:1px solid #dce4ed;border-radius:9px;background:#fff;color:#49617b;font-size:18px;flex:0 0 auto}
.directory-row .icon-button:hover{background:#f4f7fa}
.directory-row .icon-button.danger{color:#a23845;background:#fff7f8;border-color:#f0d2d6}
.directory-delete-form{margin:0;display:block;flex:0 0 auto}
.directory-list>.empty{padding:34px 12px;color:#6b7b90;text-align:center}
#directory .primary{display:inline-flex;align-items:center;justify-content:center;min-height:40px}
@media(max-width:520px){.directory-row{gap:9px}.directory-row .icon-button{width:36px;height:36px}.directory-entry-icon{padding:8px;min-width:35px}.directory-title{margin-bottom:18px}}

/* Supplier manager — legacy Obлік 2 */
.supplier-manager{max-width:1050px}.supplier-toolbar{display:flex;justify-content:space-between;gap:14px;margin-bottom:12px}.supplier-toolbar>input{width:min(520px,65%);border:1px solid #dbe2ea;border-radius:9px;padding:11px 13px;background:#fff}.supplier-manager>.muted{color:#66788e;margin:0 0 20px}.supplier-groups{display:grid;gap:16px}.supplier-card{border:1px solid #e0e6ed;border-radius:13px;background:#fff;overflow:hidden}.supplier-card>header{display:flex;gap:12px;align-items:center;padding:16px 18px;background:#f8fafc;border-bottom:1px solid #e5eaf0}.supplier-card>header>div{flex:1;min-width:0}.supplier-card h3{margin:0;font-size:16px}.supplier-card header small{display:block;color:#718096;margin-top:4px}.supplier-logo{display:grid;place-items:center;width:42px;height:42px;border-radius:10px;background:#edf3f8;color:#5f7895;font-size:20px}.supplier-note{padding:12px 18px;margin:0;color:#617389;background:#fcfdfe;border-bottom:1px solid #edf1f5}.supplier-entities article{display:flex;align-items:center;gap:12px;padding:15px 18px;border-bottom:1px solid #edf1f5}.supplier-entities article:last-child{border-bottom:0}.supplier-entities article>div{flex:1;min-width:0}.supplier-entities article b{display:block}.supplier-entities article small{display:block;color:#6b7b90;margin-top:4px}.supplier-kind{font-size:13px;font-weight:700;padding:5px 8px;border-radius:7px;background:#eef3f8;color:#4f6680;min-width:45px;text-align:center}.supplier-empty{padding:22px 18px;color:#748398}.supplier-entity-editor{margin-top:18px;padding:22px;border:1px solid #dfe6ee;border-radius:13px;background:#f8fafc}.supplier-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 18px}.supplier-form-grid label{font-size:13px;font-weight:600;color:#52637b}.supplier-form-grid input,.supplier-form-grid select{display:block;width:100%;margin-top:6px;border:1px solid #dbe2ea;border-radius:8px;padding:10px;background:#fff}.supplier-full{grid-column:1/-1}.supplier-entity-editor .form-actions{margin-top:18px}
@media(max-width:700px){.supplier-toolbar{flex-direction:column}.supplier-toolbar>input{width:100%}.supplier-card>header{flex-wrap:wrap}.supplier-card>header>div{min-width:150px}.supplier-card>header>.outline{width:100%}.supplier-entities article{align-items:flex-start;flex-wrap:wrap}.supplier-entities article>div{min-width:180px}.supplier-form-grid{grid-template-columns:1fr}.supplier-full{grid-column:auto}}

/* Profile + loyalty exact legacy styling */
.settings-layout{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(260px,.8fr);gap:20px;align-items:start}.settings-card{max-width:none}.settings-card>.panel-heading{display:flex;align-items:center;justify-content:space-between;padding:18px 22px;background:#f5f8fc;border-bottom:1px solid #dbe3ee}.settings-card>.panel-heading h2{margin:0}.settings-heading-icon{font-size:20px;color:#647b94}.settings-card>form{padding:22px}.settings-card>form.form-grid{display:grid;grid-template-columns:1fr;gap:16px}.settings-card>form label{font-size:13px;font-weight:600;color:#52637b}.settings-card>form input{display:block;width:100%;margin-top:6px}.settings-currency{display:flex;justify-content:space-between;gap:20px;padding:14px 16px;background:#f6f8fb;border-radius:10px;color:#62748b}.settings-currency b{color:#2d435e}.settings-security{padding:24px;text-align:left}.settings-security-icon{display:grid;place-items:center;width:44px;height:44px;border-radius:12px;background:#edf7f1;color:#34805a;font-size:22px;font-weight:800}.settings-security h3{margin:16px 0 10px}.settings-security p{color:#65768b;line-height:1.55}.loyalty-settings{max-width:760px}.loyalty-settings>.panel-heading{padding:18px 22px}.loyalty-settings>.panel-heading h2{margin:0}.loyalty-settings>.panel-heading p{margin:5px 0 0}.loyalty-settings form{padding:24px}.loyalty-settings fieldset{border:0;margin:0;padding:0}.loyalty-toggle{display:flex!important;align-items:center;gap:12px;font-size:15px!important;color:#314860!important;margin-bottom:22px}.switch-control{position:relative;width:42px;height:24px;display:inline-flex;flex:0 0 auto}.switch-control input{position:absolute;opacity:0;pointer-events:none}.switch-control span{width:42px;height:24px;border-radius:20px;background:#cfd7e1;position:relative;transition:.18s}.switch-control span:after{content:"";position:absolute;width:18px;height:18px;left:3px;top:3px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0003;transition:.18s}.switch-control input:checked+span{background:#f18448}.switch-control input:checked+span:after{transform:translateX(18px)}.loyalty-settings .field{display:block;max-width:360px;font-size:13px;font-weight:600;color:#52637b}.loyalty-settings .field input{display:block;width:100%;margin-top:6px}.loyalty-example{margin:18px 0;padding:15px 17px;background:#fff7ef;border:1px solid #f3dfce;border-radius:10px;color:#654c3d}.loyalty-rules{margin:20px 0;padding-left:22px;color:#607188;line-height:1.65}.loyalty-rules li+li{margin-top:5px}.loyalty-extra{margin:18px 0;border-top:1px solid #e6ebf1;padding-top:14px}.loyalty-extra summary{cursor:pointer;color:#5b6e84;font-weight:600}.loyalty-extra .field{margin-top:14px}
@media(max-width:850px){.settings-layout{grid-template-columns:1fr}.settings-security{order:2}}@media(max-width:520px){.settings-card>form,.loyalty-settings form{padding:18px}.settings-currency{flex-direction:column;gap:5px}}

/* Warehouses — legacy directory styling */
.warehouse-editor{grid-template-columns:minmax(180px,1fr) minmax(220px,1.4fr) auto auto}.directory-default{display:inline-block!important;width:max-content;margin-top:7px!important;padding:3px 7px;border-radius:6px;background:#eef7f1;color:#367a58!important;font-size:13px!important;font-weight:700}.directory-section[data-directory-page="warehouses"] .directory-entry-icon{background:#edf4f8;color:#52738e}.directory-section[data-directory-page="warehouses"] .directory-row small:not(.directory-default){max-width:650px;overflow-wrap:anywhere}
@media(max-width:700px){.warehouse-editor{grid-template-columns:1fr}.warehouse-editor .field{min-width:0}}

/* Organizations — legacy settings styling */
.organizations-panel{max-width:980px;overflow:hidden}.organizations-panel>.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 22px;background:#f5f8fc;border-bottom:1px solid #dbe3ee}.organizations-panel>.panel-heading h2{margin:0}.organizations-panel>.panel-heading p{margin:5px 0 0}.organization-hint{display:flex;gap:14px;align-items:flex-start;margin:20px 22px;padding:15px 17px;background:#f6f9fc;border:1px solid #e2e8ef;border-radius:11px}.organization-hint>span{font-size:21px;color:#617b96}.organization-hint b{color:#334b65}.organization-hint p{margin:5px 0 0;color:#66788e;line-height:1.45}.organization-editor{margin:20px 22px;padding:20px;border:1px solid #dfe6ee;border-radius:12px;background:#fbfcfe}.organization-editor-title{display:flex;justify-content:space-between;align-items:start;gap:15px;margin-bottom:18px}.organization-editor-title h3{margin:0}.organization-editor-title small{display:block;color:#6c7d91;margin-top:5px}.organization-editor .form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 18px}.organization-editor label{font-size:13px;font-weight:600;color:#52637b}.organization-editor label input{display:block;width:100%;margin-top:6px}.organization-list{border-top:1px solid #e5eaf0}.organization-card{display:flex;gap:15px;align-items:flex-start;padding:19px 22px;border-bottom:1px solid #e9edf2}.organization-card:hover{background:#fbfcfe}.organization-icon{display:grid;place-items:center;width:42px;height:42px;flex:0 0 42px;border-radius:10px;background:#edf3f8;color:#607a95;font-size:20px}.organization-main{flex:1;min-width:0}.organization-name{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.organization-name b{font-size:15px}.organization-default{font-size:13px;font-weight:700;padding:4px 7px;border-radius:6px;background:#edf7f1;color:#337858}.organization-main p{margin:6px 0 0;color:#536a82;font-size:13px}.organization-main small{display:block;color:#728196;margin-top:5px;overflow-wrap:anywhere}.organization-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.organization-actions form{margin:0}.organization-empty{padding:42px 20px!important;text-align:center}.organization-empty>span{display:block;font-size:30px;color:#8ca0b4;margin-bottom:10px}.organization-empty>b{display:block;color:#40566e}.organization-empty>p{color:#718197;margin:6px 0 0}
@media(max-width:720px){.organizations-panel>.panel-heading{align-items:stretch;flex-direction:column}.organization-hint{margin:16px}.organization-editor{margin:16px}.organization-editor .form-grid{grid-template-columns:1fr}.organization-editor .span2{grid-column:auto}.organization-card{padding:16px;flex-wrap:wrap}.organization-main{min-width:200px}.organization-actions{width:100%;padding-left:57px}}@media(max-width:480px){.organization-actions{padding-left:0}.organization-actions>*{flex:1}.organization-actions button{width:100%}}

/* Settings final interaction polish */
.settings-tabs{position:sticky;top:0;z-index:8;background:var(--page-bg,#fff);padding-top:2px}.settings-tabs button{white-space:nowrap}.settings-page{animation:settingsFade .16s ease-out}@keyframes settingsFade{from{opacity:.35;transform:translateY(3px)}to{opacity:1;transform:none}}.directory-tabs button,.settings-tabs button,.icon-button,.primary,.outline{transition:background-color .15s,border-color .15s,color .15s,box-shadow .15s}.directory-row:focus-within,.supplier-card:focus-within,.organization-card:focus-within{outline:2px solid #f2b28d;outline-offset:-2px}.settings-page input:focus,.settings-page select:focus,.settings-page textarea:focus{outline:none;border-color:#e98a54;box-shadow:0 0 0 3px #fbe9df}.notice,.alert{scroll-margin-top:80px}
@media(max-width:700px){.settings-tabs{overflow-x:auto;flex-wrap:nowrap;scrollbar-width:thin}.settings-tabs button{flex:0 0 auto;min-width:max-content}.directory-tabs{overflow-x:auto;flex-wrap:nowrap}.directory-tabs button{flex:0 0 auto;min-width:max-content}}

/* Settings links compatibility */
.settings-tabs a{display:inline-flex;align-items:center;padding:13px 18px;color:#596d86;border-bottom:3px solid transparent;font-weight:600;text-decoration:none;white-space:nowrap}
.settings-tabs a.active{color:#b95322;border-bottom-color:#f58445}
.directory-tabs a{display:flex;align-items:center;gap:9px;padding:13px;border-bottom:3px solid transparent;color:#63758c;text-decoration:none}
.directory-tabs a[aria-selected="true"]{color:#ae542b;border-bottom-color:#ed8a51;background:#fff8f3}
.directory-tabs a span{font-size:13px;background:#edf1f5;padding:2px 6px;border-radius:5px}
@media(max-width:700px){.settings-tabs a,.directory-tabs a{flex:0 0 auto;min-width:max-content}}

/* Settings visibility: do not depend on the HTML hidden attribute */
.settings-page{display:none!important}
.settings-page.settings-page-active{display:block!important}
.settings-layout.settings-page.settings-page-active{display:grid!important}
.directory-section{display:none!important}
.directory-section.directory-section-active{display:block!important}

/* Directory settings — polished category cards and editors */
.directory-panel{max-width:1120px!important;border-radius:18px!important;overflow:hidden!important}
.directory-title{display:flex!important;align-items:center!important;gap:14px!important;padding:24px 26px!important;background:linear-gradient(180deg,#fff,#fbfcfe)!important;border-bottom:1px solid #e7ebf2!important}
.directory-title .directory-book-icon{display:grid!important;place-items:center!important;width:42px!important;height:42px!important;border-radius:12px!important;background:#fff0e9!important;color:#dc643b!important;font-size:20px!important;flex:0 0 auto!important}
.directory-title h2{margin:0 0 4px!important;font-size:22px!important}.directory-title p{margin:0!important;color:#7a879a!important}
.directory-tabs{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important;padding:16px 22px!important;background:#fff!important;border-bottom:1px solid #e9edf3!important}
.directory-tabs a{min-height:58px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;padding:12px 14px!important;border:1px solid #e4e9f1!important;border-radius:12px!important;background:#fafbfe!important;color:#52627a!important;font-weight:650!important}
.directory-tabs a:hover{background:#fff7f2!important;border-color:#f0c3ae!important;color:#c85831!important}
.directory-tabs a[aria-selected="true"]{background:#fff0e9!important;border-color:#f0b99f!important;color:#c9552e!important;box-shadow:0 4px 12px #df6a3820!important}
.directory-tabs a span{display:grid!important;place-items:center!important;min-width:24px!important;height:24px!important;padding:0 7px!important;border-radius:999px!important;background:#fff!important;border:1px solid #e5eaf1!important;font-size:13px!important}
.directory-section-active{padding:22px!important;background:#fff!important}
.directory-tools,.supplier-toolbar{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:12px!important;margin:0 0 16px!important;padding:14px!important;border:1px solid #e7ebf2!important;border-radius:14px!important;background:#f8fafc!important}
.directory-tools input,.supplier-toolbar input{width:100%!important;min-height:44px!important;padding:11px 14px!important;background:#fff!important}
.directory-tools .primary,.supplier-toolbar .primary{min-height:44px!important;padding:0 18px!important}
.directory-editor{display:grid!important;grid-template-columns:minmax(220px,1fr) auto auto!important;gap:12px!important;align-items:end!important;margin:0 0 16px!important;padding:16px!important;border:1px solid #f0d4c7!important;border-radius:14px!important;background:#fff9f5!important}
.directory-editor[hidden]{display:none!important}.directory-editor .field{display:grid!important;gap:7px!important;color:#607087!important;font-size:13px!important;font-weight:650!important}.directory-editor input{min-height:42px!important}
.warehouse-editor{grid-template-columns:minmax(180px,1fr) minmax(240px,1.5fr) auto auto!important}
.directory-list{display:grid!important;gap:10px!important}
.directory-row{display:grid!important;grid-template-columns:44px minmax(0,1fr) 42px 42px!important;gap:12px!important;align-items:center!important;min-height:70px!important;padding:12px 14px!important;border:1px solid #e7ebf2!important;border-radius:14px!important;background:#fff!important;transition:transform .15s,box-shadow .15s,border-color .15s!important}
.directory-row:hover{transform:translateY(-1px)!important;border-color:#d9e0ea!important;box-shadow:0 7px 18px #1722380b!important}
.directory-entry-icon{display:grid!important;place-items:center!important;width:40px!important;height:40px!important;border-radius:11px!important;background:#f3f5f9!important;color:#d45d35!important;font-size:17px!important;font-weight:750!important}
.directory-row b{display:block!important;color:#26364d!important;font-size:14px!important}.directory-row small{display:block!important;margin-top:4px!important;color:#8290a3!important}
.directory-default{display:inline-flex!important;width:max-content!important;padding:3px 8px!important;border-radius:999px!important;background:#eaf6ef!important;color:#31875c!important;font-size:13px!important;font-weight:700!important}
.directory-row .icon-button{width:38px!important;height:38px!important;border:1px solid #e0e6ee!important;border-radius:10px!important;background:#fff!important;color:#56667c!important;cursor:pointer!important}.directory-row .icon-button:hover{background:#f4f6fa!important}
.directory-row .icon-button.danger{color:#b64343!important;background:#fff7f7!important;border-color:#f0d7d7!important}
.directory-delete-form{margin:0!important}
.directory-list .empty,.supplier-groups>.empty{padding:44px 18px!important;border:1px dashed #dce3ec!important;border-radius:14px!important;background:#fafbfc!important;color:#8592a4!important}
.supplier-manager>.muted{margin:-3px 2px 18px!important;color:#7b899c!important}
.supplier-groups{display:grid!important;gap:14px!important}
.supplier-card{border:1px solid #e5eaf1!important;border-radius:16px!important;background:#fff!important;overflow:hidden!important;box-shadow:0 4px 14px #17223808!important}
.supplier-card>header{display:grid!important;grid-template-columns:46px minmax(0,1fr) 40px auto!important;gap:12px!important;align-items:center!important;padding:16px 18px!important;background:#fbfcfe!important;border-bottom:1px solid #edf0f5!important}
.supplier-logo{display:grid!important;place-items:center!important;width:42px!important;height:42px!important;border-radius:12px!important;background:#fff0e9!important;color:#d45d35!important}.supplier-card h3{margin:0 0 3px!important;color:#26364d!important}.supplier-card header small{color:#8491a3!important}
.supplier-note{margin:14px 18px 0!important;padding:10px 12px!important;border-radius:10px!important;background:#f6f8fb!important;color:#65758b!important}
.supplier-entities{display:grid!important;gap:8px!important;padding:14px 18px 18px!important}.supplier-entities article{display:grid!important;grid-template-columns:auto minmax(0,1fr) 38px 38px!important;gap:12px!important;align-items:center!important;padding:12px!important;border:1px solid #e8ecf2!important;border-radius:12px!important}.supplier-kind{padding:5px 8px!important;border-radius:999px!important;background:#eef3f8!important;color:#51647c!important;font-size:13px!important;font-weight:750!important}.supplier-entities small{display:block!important;margin-top:3px!important;color:#8390a2!important}.supplier-empty{padding:24px!important;text-align:center!important;border:1px dashed #dce3ec!important;border-radius:12px!important;color:#8390a2!important;background:#fafbfc!important}
.supplier-entity-editor{margin:16px 0 0!important;padding:18px!important;border:1px solid #f0d4c7!important;border-radius:16px!important;background:#fff9f5!important}.supplier-entity-editor[hidden]{display:none!important}.supplier-form-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important}.supplier-form-grid label{display:grid!important;gap:7px!important;font-size:13px!important;font-weight:650!important;color:#607087!important}.supplier-form-grid input,.supplier-form-grid select{min-height:42px!important;padding:10px 12px!important}.supplier-full{grid-column:1/-1!important}
@media(max-width:760px){.directory-tabs{grid-template-columns:repeat(2,minmax(0,1fr))!important;padding:12px!important}.directory-section-active{padding:14px!important}.directory-tools,.supplier-toolbar{grid-template-columns:1fr!important}.directory-editor,.warehouse-editor{grid-template-columns:1fr!important}.directory-editor .primary,.directory-editor .outline{width:100%!important}.supplier-card>header{grid-template-columns:42px minmax(0,1fr) 38px!important}.supplier-card>header>.outline{grid-column:1/-1!important}.supplier-form-grid{grid-template-columns:1fr!important}.supplier-full{grid-column:auto!important}}
@media(max-width:480px){.directory-tabs{grid-template-columns:1fr!important}.directory-row{grid-template-columns:40px minmax(0,1fr) 38px 38px!important;padding:10px!important}.supplier-entities article{grid-template-columns:auto minmax(0,1fr) 36px!important}.supplier-entities article form{grid-column:3!important}}

/* Settings content width/alignment — keep Store Profile unchanged */
.settings-page:not(#profile){width:100%!important;max-width:none!important}
#directory.directory-panel,#loyalty.loyalty-settings,#organizations.organizations-panel{width:100%!important;max-width:none!important;margin:0!important;box-sizing:border-box!important}
#directory .directory-title{display:flex!important;flex-direction:column!important;justify-content:center!important;align-items:center!important;text-align:center!important;gap:8px!important;padding:26px 24px 22px!important}
#directory .directory-title .directory-book-icon{margin:0 auto 2px!important}
#directory .directory-title>div:last-child{width:100%!important;text-align:center!important}
#directory .directory-title h2,#directory .directory-title p{text-align:center!important}
#directory .directory-tabs,#directory .directory-section-active{width:100%!important;box-sizing:border-box!important}
#loyalty .settings-section-title,#organizations .settings-section-title,#loyalty>header,#organizations>header{text-align:center!important}
#loyalty h2,#loyalty h3,#organizations h2,#organizations h3{text-align:center!important}
@media(min-width:900px){#directory.directory-panel,#loyalty.loyalty-settings,#organizations.organizations-panel{min-width:0!important}}

/* Customers — ported from the legacy Obлік 2 UI */
.page-embedded .page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:18px}
.page-embedded .page-head h1{margin:0}
.page-embedded>.sales-tabs{display:flex;gap:6px;margin:0 0 14px;padding:5px;width:max-content;max-width:100%;border:1px solid #e5e9f1;border-radius:11px;background:#fff}
.page-embedded>.sales-tabs a{display:inline-flex;align-items:center;justify-content:center;min-width:110px;padding:9px 14px;border-radius:8px;color:#77869a;text-decoration:none;font-size:13px;font-weight:600}
.page-embedded>.sales-tabs a.active{background:#fff0e9;color:#c95b34}
.page-embedded>.search{display:grid;grid-template-columns:minmax(0,420px) auto;gap:9px;margin:0 0 14px}
.page-embedded>.search input{height:42px;border:1px solid #dfe5ed;border-radius:9px;padding:0 13px;background:#fff;color:#33465f}
.page-embedded>.search button{height:42px;padding:0 16px;border:1px solid #e0e6ee;border-radius:9px;background:#fff;color:#405069;font-weight:600}
.page-embedded>.panel:last-of-type{overflow:hidden}
.customer-row{display:grid!important;grid-template-columns:minmax(260px,1.35fr) minmax(420px,1fr) auto!important;align-items:center!important;gap:22px!important;padding:18px 22px!important;border-bottom:1px solid #edf1f5!important;background:#fff!important}
.customer-row:last-of-type{border-bottom:0!important}
.customer-row:hover{background:#fbfcfe!important}
.customer-row>div:first-child{min-width:0}
.customer-row>div:first-child b{display:block;color:#26364d;font-size:15px;font-weight:650}
.customer-row>div:first-child p{margin:5px 0 0;color:#68798e;font-size:13px;overflow-wrap:anywhere}
.customer-row>div:first-child small{display:block;margin-top:5px;color:#8996a7;font-size:13px;line-height:1.5}
.customer-loyalty-stats{display:grid!important;grid-template-columns:repeat(3,minmax(105px,1fr))!important;gap:18px!important;margin:0!important}
.customer-loyalty-stats>div{min-width:0}
.customer-loyalty-stats dt{margin:0 0 5px;color:#8a97a8;font-size:13px;font-weight:500}
.customer-loyalty-stats dd{margin:0;color:#40516a;font-size:13px;font-weight:650;overflow-wrap:anywhere}
.customer-row>.outline{white-space:nowrap}
.page-embedded .catalog-pagination{display:flex;align-items:center;justify-content:flex-end;gap:9px;padding:14px 20px;border-top:1px solid #edf1f5;color:#8491a4;font-size:13px}
.page-embedded .catalog-pagination>span:first-child{margin-right:auto}
.page-embedded .catalog-pagination .outline{min-width:38px;min-height:36px;padding:7px 10px;text-decoration:none}
.page-embedded .catalog-pagination .disabled{pointer-events:none;opacity:.42}
#editor.panel.editor{max-width:760px;margin:0 0 16px;padding:0;border-radius:16px;overflow:hidden;background:#fff}
#editor.panel.editor>h2{margin:0;padding:20px 24px 8px;font-size:21px;letter-spacing:-.4px}
#editor.panel.editor>.form-grid{padding:12px 24px 22px;display:grid;grid-template-columns:1fr 1fr;gap:15px 18px}
#editor.panel.editor>.form-grid>label{display:flex;flex-direction:column;gap:7px;color:#65758b;font-size:13px;font-weight:500}
#editor.panel.editor>.form-grid input,#editor.panel.editor>.form-grid select,#editor.panel.editor>.form-grid textarea{width:100%;min-height:42px;border:1px solid #dce5e7;border-radius:8px;padding:9px 11px;background:#fff;color:#233d47}
#editor.panel.editor>.form-grid textarea{min-height:80px;resize:vertical}
#editor.panel.editor>.form-grid input:focus,#editor.panel.editor>.form-grid select:focus,#editor.panel.editor>.form-grid textarea:focus{outline:2px solid #90bba6;outline-offset:1px;box-shadow:none}
#editor.panel.editor>.form-grid .span2{grid-column:1/-1}
#editor.panel.editor>.form-grid .form-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:10px;margin-top:8px;padding-top:18px;border-top:1px solid #e6edef}
@media(max-width:1050px){.customer-row{grid-template-columns:minmax(220px,1fr) minmax(330px,1fr)!important}.customer-row>.outline{grid-column:1/-1;justify-self:end}.customer-loyalty-stats{grid-template-columns:repeat(3,1fr)!important}}
@media(max-width:700px){.page-embedded .page-head{align-items:stretch;flex-direction:column}.page-embedded .page-head .primary{width:100%}.page-embedded>.sales-tabs{width:100%}.page-embedded>.sales-tabs a{flex:1;min-width:0}.page-embedded>.search{grid-template-columns:1fr}.customer-row{grid-template-columns:1fr!important;gap:15px!important;padding:17px!important}.customer-loyalty-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}.customer-row>.outline{grid-column:auto;justify-self:stretch}.page-embedded .catalog-pagination{flex-wrap:wrap}.page-embedded .catalog-pagination>span:first-child{width:100%;margin:0 0 3px;text-align:center}#editor.panel.editor{max-width:none}#editor.panel.editor>.form-grid{grid-template-columns:1fr;padding:12px 17px 18px}#editor.panel.editor>.form-grid .span2{grid-column:auto}}

/* Sales — legacy Obлік 2 visual parity */
.page-embedded .page-head>div>a{display:inline-flex;margin-bottom:8px;color:#8b98aa;text-decoration:none;font-size:13px}
.page-embedded .page-head>div>a:hover{color:#d15e37}
.page-embedded .notice{margin:0 0 16px;padding:13px 16px;border:1px solid #dceee4;border-radius:10px;background:#eef8f2;color:#3b805d;font-size:13px}
.page-embedded .alert{margin:0 0 16px;padding:13px 16px;border:1px solid #f1d9d3;border-radius:10px;background:#fff2ef;color:#a55642;font-size:13px}
#editor.panel.editor form{padding:10px 24px 24px}
#editor.panel.editor form>.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px 18px;padding:0}
#editor.panel.editor form>.form-grid label,#editor.panel.editor .compact-fields label{display:flex;flex-direction:column;gap:7px;color:#65758b;font-size:13px;font-weight:500}
#editor.panel.editor form input,#editor.panel.editor form select,#editor.panel.editor form textarea{width:100%;min-height:42px;border:1px solid #dce5e7;border-radius:8px;padding:9px 11px;background:#fff;color:#233d47}
#editor.panel.editor form input:focus,#editor.panel.editor form select:focus,#editor.panel.editor form textarea:focus{outline:2px solid #90bba6;outline-offset:1px;box-shadow:none}
#editor.panel.editor form>.form-grid .full-field{grid-column:1/-1}
#editor.panel.editor form>h3{margin:25px 0 12px;color:#31445f;font-size:15px}
#sale-lines{display:flex;flex-direction:column;gap:12px;margin-bottom:12px}
#sale-lines .sale-line{display:grid!important;grid-template-columns:minmax(260px,1fr) 90px 120px 42px!important;align-items:center!important;gap:10px!important;padding:12px!important;border:1px solid #e7ebf1!important;border-radius:11px!important;background:#fbfcfe!important}
#sale-lines .sale-line select,#sale-lines .sale-line input{margin:0}
#sale-lines .sale-line button{display:grid;place-items:center;width:40px;height:40px;border:1px solid #f0d7d7;border-radius:9px;background:#fff7f7;color:#b64343;font-size:19px;cursor:pointer}
#editor.panel.editor .ghost{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:8px 14px;border:1px solid #e0e6ee;border-radius:9px;background:#fff;color:#405069;font-size:13px;font-weight:600}
#editor.panel.editor .ghost:hover{background:#f6f8fb}
.sale-expense{margin-top:22px;padding:15px;border:1px solid #e7ebf1;border-radius:11px;background:#f8fafc}
.sale-expense>label{display:flex;align-items:center;gap:9px;color:#52647b;font-size:13px;font-weight:600}
.sale-expense>label input{width:16px!important;min-height:16px!important;height:16px!important}
.sale-expense .compact-fields{display:grid;grid-template-columns:1fr 180px;gap:14px;margin-top:14px}
#editor.panel.editor form>.form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px;padding-top:20px;border-top:1px solid #e6edef}
#editor.panel.editor form>.form-actions button:not(.primary){display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:9px 15px;border:1px solid #e0e6ee;border-radius:10px;background:#fff;color:#405069}
.page-embedded>.panel .table-wrap{overflow:auto}
.page-embedded>.panel table{width:100%;border-collapse:collapse}
.page-embedded>.panel table thead th{height:46px;padding:12px 18px;background:#fafbfe;border-bottom:1px solid #e9edf3;color:#8490a4;text-align:left;font-size:13px;font-weight:600;white-space:nowrap}
.page-embedded>.panel table tbody td{padding:16px 18px;border-bottom:1px solid #edf1f2;color:#4a5b73;font-size:13px;vertical-align:middle}
.page-embedded>.panel table tbody tr:last-child td{border-bottom:0}
.page-embedded>.panel table tbody tr:hover td{background:#fbfcfe}
.page-embedded>.panel table tbody td>b{color:#33465f;font-weight:650}
.page-embedded>.panel .doc-actions{min-width:300px;color:#a0a9b6}
.page-embedded>.panel .doc-actions a{color:#d15e37;text-decoration:none;white-space:nowrap}
.page-embedded>.panel .doc-actions a:hover{text-decoration:underline}
.page-embedded>.panel table td:nth-child(5){font-weight:600;color:#31875c}
.page-embedded>.panel table td:nth-child(6){font-variant-numeric:tabular-nums;color:#263950}
@media(max-width:760px){#editor.panel.editor form{padding:8px 17px 18px}#editor.panel.editor form>.form-grid{grid-template-columns:1fr}#editor.panel.editor form>.form-grid .full-field{grid-column:auto}#sale-lines .sale-line{grid-template-columns:minmax(0,1fr) 76px 100px!important}#sale-lines .sale-line select{grid-column:1/-1}#sale-lines .sale-line button{width:38px;height:38px}.sale-expense .compact-fields{grid-template-columns:1fr}.page-embedded>.panel table thead th,.page-embedded>.panel table tbody td{padding:12px 13px}}

/* Sale receipt actions */
.sale-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;min-width:330px}.sale-actions .inline-action{display:inline-flex;margin:0}.sale-actions .outline.small{min-height:34px;padding:6px 10px;border-radius:8px;font-size:13px;font-weight:600;cursor:pointer}.sale-actions button.danger{color:#b24646;border-color:#efd8d8;background:#fffafa}.print-menu{position:relative}.print-menu>summary{list-style:none;user-select:none}.print-menu>summary::-webkit-details-marker{display:none}.print-menu[open]>summary{background:#f4f6fa}.print-menu>div{position:absolute;z-index:30;right:0;top:calc(100% + 6px);display:flex;flex-direction:column;min-width:180px;padding:6px;border:1px solid #e2e7ef;border-radius:10px;background:#fff;box-shadow:0 12px 30px #1420371a}.print-menu>div a{display:block!important;padding:9px 10px!important;border-radius:7px!important;color:#405069!important;text-decoration:none!important;font-size:13px!important;white-space:nowrap}.print-menu>div a:hover{background:#fff0e9!important;color:#c95b34!important}.sale-status-cell{font-weight:600;color:#40516a}
@media(max-width:760px){.sale-actions{min-width:260px}.print-menu>div{left:0;right:auto}}

/* Legacy sale editor structure */
#editor.panel.editor{max-width:820px}
#editor .sale-editor-item{padding:14px;margin-bottom:12px;border:1px solid #e7ebf1;border-radius:11px;background:#fbfcfe}
#editor .sale-editor-item>.full-field{display:flex;flex-direction:column;gap:7px}
#editor .sale-editor-item-fields{display:grid;grid-template-columns:minmax(180px,1fr) 110px 130px 42px;gap:10px;align-items:end;margin-top:11px}
#editor .sale-editor-item-fields .icon-button{height:42px;width:42px}
#editor .sale-summary-row{display:grid;grid-template-columns:180px 1fr;gap:18px;align-items:end;margin:20px 0}
#editor .sale-summary-row>label{display:flex;flex-direction:column;gap:7px;color:#65758b;font-size:13px}
#editor .sale-total{display:flex;align-items:center;justify-content:space-between;min-height:64px;padding:14px 18px;border-radius:10px;background:#f3f5f9;color:#68788e}
#editor .sale-total strong{font-size:22px;color:#1d2d46}
#editor .sale-fulfilment-tabs{display:flex;gap:6px;padding:5px;margin:6px 0 18px;border:1px solid #e5e9f1;border-radius:11px;background:#fff}
#editor .sale-fulfilment-tabs button{flex:1;padding:10px;border:0;border-radius:8px;background:transparent;color:#77869a;font-weight:600;cursor:pointer}
#editor .sale-fulfilment-tabs button.active{background:#fff0e9;color:#c95b34}
#editor .sale-customer-block>label{display:flex;flex-direction:column;gap:7px;color:#65758b;font-size:13px}
#editor .sale-delivery-fields,#editor .sale-extra-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px 18px;margin-top:16px}
#editor .sale-delivery-fields[hidden]{display:none}
#editor .sale-delivery-fields .full-field,#editor .sale-extra-fields .full-field{grid-column:1/-1}
#editor .sale-extra-fields label{display:flex;flex-direction:column;gap:7px;color:#65758b;font-size:13px}
#editor .loyalty-sale-note{margin:13px 0;color:#718197;font-size:13px;line-height:1.6}
#editor .loyalty-sale-note p{margin:3px 0}
@media(max-width:700px){#editor .sale-editor-item-fields{grid-template-columns:1fr 1fr 42px}#editor .sale-editor-item-fields label:first-child{grid-column:1/-1}#editor .sale-summary-row{grid-template-columns:1fr}#editor .sale-fulfilment-tabs{flex-direction:column}#editor .sale-delivery-fields,#editor .sale-extra-fields{grid-template-columns:1fr}#editor .sale-delivery-fields .full-field,#editor .sale-extra-fields .full-field{grid-column:auto}}

/* Shared searchable product picker for sales, supplies and documents */
.product-picker-ui{position:relative;width:100%}.product-picker-native{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}.product-picker-input-row{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:9px;width:100%;min-height:50px;padding:5px 8px;border:1px solid #dce5e7;border-radius:9px;background:#fff}.product-picker-selected-media{display:grid;place-items:center;width:40px;height:40px;border-radius:8px;overflow:hidden;background:#f4f6f9;flex:0 0 auto}.product-picker-selected-media[hidden]{display:none}.product-picker-selected-media img,.product-picker-selected-placeholder{width:40px;height:40px;object-fit:contain}.product-picker-selected-placeholder{display:grid;place-items:center;font-size:18px}.product-picker-search{width:100%;height:38px;border:0!important;border-radius:7px;padding:0 4px;background:transparent;box-shadow:none!important;outline:none}.product-picker-input-row:focus-within{border-color:#efb194;box-shadow:0 0 0 3px rgba(239,177,148,.12)}.product-picker-list{display:grid;gap:7px;max-height:280px;overflow:auto;margin-top:8px;padding:2px}.product-picker-list[hidden]{display:none!important}.product-picker-card{display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:11px;width:100%;padding:8px;border:1px solid #e5eaf1;border-radius:10px;background:#fff;text-align:left;cursor:pointer}.product-picker-card:hover,.product-picker-card.selected{border-color:#efb194;background:#fff9f6}.product-picker-card img,.product-picker-no-photo{width:48px;height:48px;border-radius:8px;object-fit:contain;background:#f4f6f9}.product-picker-no-photo{display:grid;place-items:center;font-size:20px}.product-picker-info{display:flex;min-width:0;align-self:stretch;flex-direction:column;align-items:flex-start;justify-content:center;text-align:left}.product-picker-info b{display:block;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#33465f;font-size:13px;text-align:left}.product-picker-info small{display:block;width:100%;margin-top:3px;color:#8a98aa;font-size:13px;text-align:left}.product-picker-stock{display:block!important;width:auto!important;margin:3px 0 0!important;padding:0!important;background:none!important;border:0!important;color:#2f7a55;font-size:13px;font-weight:700;line-height:1.25;text-align:left!important}.product-picker-stock.is-empty{color:#a35a50}.product-picker-card>strong{color:#d15e37;font-size:13px;white-space:nowrap}.product-picker-empty{padding:18px;text-align:center;color:#8b98aa;font-size:13px}
.supply-product-line{padding:14px;margin-bottom:12px;border:1px solid #e7ebf1;border-radius:11px;background:#fbfcfe}.supply-product-fields{display:grid;grid-template-columns:130px 170px 42px;gap:10px;align-items:end;margin-top:12px}.supply-product-fields label{display:flex;flex-direction:column;gap:7px;color:#65758b;font-size:13px}.supply-product-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:10px}.quick-product-card{margin:16px 0;padding:20px;border:1px solid #e2e8f0;border-radius:13px;background:#fff}.quick-product-card h3{margin:0 0 5px!important}.quick-product-card .compact-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:16px}.quick-product-card .compact-fields label{display:flex;flex-direction:column;gap:7px;color:#65758b;font-size:13px}
@media(max-width:650px){.product-picker-card{grid-template-columns:44px minmax(0,1fr)}.product-picker-card img,.product-picker-no-photo{width:44px;height:44px}.product-picker-card>strong{grid-column:2}.supply-product-fields{grid-template-columns:1fr 1fr 42px}.quick-product-card .compact-fields{grid-template-columns:1fr}}

/* Product identity in stock processes */
.inventory-product{display:flex;align-items:center;gap:10px;min-width:230px}.inventory-product img,.inventory-product>.product-picker-no-photo{width:42px;height:42px;border-radius:8px;object-fit:contain;background:#f4f6f9;flex:0 0 auto}.inventory-product>div{min-width:0}.inventory-product b{display:block;color:#33465f}.inventory-product small{display:block;margin-top:3px;color:#d15e37;font-size:13px;font-weight:600}
#writeoff-lines .product-picker-ui,.supply-product-line .product-picker-ui,#invoice-lines .product-picker-ui{min-width:320px}
@media(max-width:650px){#writeoff-lines .product-picker-ui,.supply-product-line .product-picker-ui,#invoice-lines .product-picker-ui{min-width:0}.inventory-product{min-width:190px}}

/* Full-width operation forms + sale cost/markup */
.page.page-embedded{width:100%;max-width:none}
.page-embedded>section.panel.editor,#editor.panel.editor{width:100%!important;max-width:none!important;box-sizing:border-box}
.page-embedded .panel.editor form{width:100%;box-sizing:border-box}
#editor .sale-editor-cost{display:flex;align-items:center;gap:18px;flex-wrap:wrap;margin:10px 0 2px;padding:9px 11px;border-radius:8px;background:#f5f7fa;color:#718197;font-size:13px}
#editor .sale-editor-cost b{color:#40516a;font-variant-numeric:tabular-nums}
#editor .sale-editor-cost .sale-markup-value{color:#2f8a60}
#editor .sale-editor-cost .sale-markup-value.negative{color:#b84e4e}
#editor .sale-editor-item-fields{grid-template-columns:minmax(220px,1fr) 130px 160px 42px}
#editor .sale-total strong{font-variant-numeric:tabular-nums}
body>.page,.shell>.content,.shell>.content>.page{max-width:none}
@media(max-width:700px){#editor .sale-editor-cost{gap:10px;justify-content:space-between}#editor .sale-editor-item-fields{grid-template-columns:1fr 1fr 42px}}

/* Full-width business operation forms */
.page-embedded>section.panel.editor,.page-embedded>section[id^="new"],.page-embedded .supply-editor-panel{width:100%!important;max-width:none!important;margin-left:0!important;margin-right:0!important;box-sizing:border-box!important}
.page-embedded>section.panel.editor>form,.page-embedded>section[id^="new"]>form,.page-embedded .supply-editor-panel>form{width:100%!important;max-width:none!important;box-sizing:border-box!important}
.document-total{display:flex;align-items:center;justify-content:space-between;gap:20px;width:100%;margin:16px 0;padding:15px 18px;border:1px solid #e3e8ef;border-radius:10px;background:#f5f7fa;color:#68788e;box-sizing:border-box}.document-total strong{color:#1d2d46;font-size:20px;font-variant-numeric:tabular-nums}
#invoice-lines .sale-line,#writeoff-lines .sale-line{width:100%;box-sizing:border-box}
@media(max-width:650px){.document-total{padding:13px 14px}.document-total strong{font-size:17px}}

/* Global content width: keep operation forms wide, but preserve a comfortable right/left gutter */
.shell>.content{min-width:0}
.shell>.content>.page,.shell>.content>.page.page-embedded{width:calc(100% - 48px)!important;max-width:none!important;margin-left:auto!important;margin-right:auto!important;box-sizing:border-box!important}
.page-embedded>section.panel.editor,.page-embedded>section[id^="new"],.page-embedded .supply-editor-panel{width:100%!important;max-width:100%!important}
@media(max-width:900px){.shell>.content>.page,.shell>.content>.page.page-embedded{width:calc(100% - 28px)!important}}
@media(max-width:600px){.shell>.content>.page,.shell>.content>.page.page-embedded{width:calc(100% - 20px)!important}}

/* Correction: outer page keeps its original width; gutter applies only to forms nested inside the main form/editor */
.shell>.content>.page,.shell>.content>.page.page-embedded{width:auto!important;max-width:var(--page-max,none)!important;margin-left:0!important;margin-right:0!important}
.page-embedded>section.panel.editor>form,.page-embedded>section[id^="new"]>form,.page-embedded .supply-editor-panel>form,
.page-embedded .editor .form-grid,.page-embedded .editor .sale-editor-items,.page-embedded .editor #sale-lines,
.page-embedded .editor #invoice-lines,.page-embedded .editor #writeoff-lines,.page-embedded .editor #supply-lines{
 width:calc(100% - 48px)!important;max-width:none!important;margin-left:auto!important;margin-right:auto!important;box-sizing:border-box!important
}
@media(max-width:900px){.page-embedded>section.panel.editor>form,.page-embedded>section[id^="new"]>form,.page-embedded .supply-editor-panel>form,.page-embedded .editor .form-grid,.page-embedded .editor .sale-editor-items,.page-embedded .editor #sale-lines,.page-embedded .editor #invoice-lines,.page-embedded .editor #writeoff-lines,.page-embedded .editor #supply-lines{width:calc(100% - 28px)!important}}
@media(max-width:600px){.page-embedded>section.panel.editor>form,.page-embedded>section[id^="new"]>form,.page-embedded .supply-editor-panel>form,.page-embedded .editor .form-grid,.page-embedded .editor .sale-editor-items,.page-embedded .editor #sale-lines,.page-embedded .editor #invoice-lines,.page-embedded .editor #writeoff-lines,.page-embedded .editor #supply-lines{width:calc(100% - 20px)!important}}

.sale-total small{display:block;margin-top:5px;color:#68788e;font-weight:500}.sale-total small b{color:#1d2d46}.sale-total small b.negative{color:#c62828}
#customer-phone-result{display:flex;flex-wrap:wrap;gap:6px;margin:5px 0 10px}.customer-phone-match{border:1px solid #dce3ec;background:#fff;border-radius:8px;padding:7px 10px;cursor:pointer;text-align:left}.customer-phone-match:hover{border-color:#f05a32}

/* Integrations — legacy directory visual parity */
.integrations-page{padding-bottom:40px}.integration-hero{display:flex;align-items:center;justify-content:space-between;gap:30px;min-height:235px;margin-bottom:28px;padding:34px 40px;border:1px solid #e3e8ef;border-radius:18px;background:linear-gradient(135deg,#fff 0%,#f7fafc 70%,#fff2eb 100%);overflow:hidden}.integration-hero>div:first-child>span{color:#df6038;font-size:13px;font-weight:800;letter-spacing:.12em}.integration-hero h2{margin:11px 0 9px;color:#172b49;font-size:32px;line-height:1.12}.integration-hero p{margin:0;color:#718197;font-size:14px}.integration-orbit{display:flex;align-items:center;gap:15px;padding:22px;border-radius:999px;background:#fff;box-shadow:0 16px 50px #25364e18}.integration-orbit b{display:grid;place-items:center;width:65px;height:65px;border-radius:50%;background:#f3f6f9;color:#1d3557;font-size:18px}.integration-orbit i{font-style:normal;font-size:22px}.directory-heading{display:flex;align-items:center;justify-content:space-between;margin:0 0 13px}.directory-heading h2{margin:0;color:#263b58;font-size:18px}.directory-heading span{color:#8b98aa;font-size:13px}.integration-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.integration-card{display:block;padding:23px;border:1px solid #e1e7ef;border-radius:15px;background:#fff;color:inherit;text-decoration:none;transition:.18s ease}.integration-card:hover{transform:translateY(-2px);border-color:#efb194;box-shadow:0 14px 34px #24324b12}.integration-card-top,.integration-brand-row{display:flex;align-items:center;gap:14px}.integration-card-top .badge,.integration-brand-row .badge{margin-left:auto}.hp-mark,.np-mark{display:grid;place-items:center;width:48px;height:48px;border-radius:12px;background:#152b4c;color:#fff;font-size:19px;font-weight:800;font-style:normal}.hp-mark em{color:#f05f35;font-style:normal}.np-mark{background:#e73d34}.badge{display:inline-flex;align-items:center;padding:5px 9px;border-radius:999px;font-size:13px;font-weight:700}.badge.green{background:#eaf7ef;color:#278356}.badge.gray{background:#f0f2f5;color:#7c8999}.integration-card h3{margin:18px 0 7px;color:#263b58;font-size:19px}.integration-card>p{min-height:42px;margin:0;color:#748297;font-size:13px;line-height:1.55}.integration-tags{display:flex;gap:7px;flex-wrap:wrap;margin:17px 0}.integration-tags span{padding:6px 9px;border-radius:7px;background:#f5f7fa;color:#66768c;font-size:13px}.integration-card-bottom{display:flex;justify-content:space-between;padding-top:15px;border-top:1px solid #edf0f4;color:#d65d36;font-size:13px}.integration-back{display:inline-flex;margin:0 0 15px;color:#66778d;text-decoration:none;font-size:13px}.integration-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:18px}.integration-main,.np-panel{padding:26px!important}.integration-brand-row h2{margin:0;color:#263b58}.integration-brand-row p{margin:3px 0 0;color:#8290a1;font-size:13px}.import-steps{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:25px 0}.import-steps>div{display:flex;align-items:center;gap:8px;padding:10px;border-radius:9px;background:#f5f7fa;color:#8a97a8;font-size:13px}.import-steps>div.active{background:#fff0e9;color:#c95b34;font-weight:650}.import-steps span{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#fff;font-size:13px}.connect-form{max-width:650px;margin:20px auto;padding:24px;text-align:center}.feature-icon{display:grid;place-items:center;width:52px;height:52px;margin:0 auto 12px;border-radius:14px;background:#fff0e9;font-size:23px}.connect-form h3{margin:5px 0;color:#2d405b}.connect-form p{color:#718197;line-height:1.55}.connect-form form{max-width:520px;margin:18px auto 0;text-align:left}.connect-form label,.np-grid label{display:flex;flex-direction:column;gap:7px;color:#64758a;font-size:13px;font-weight:600}.connect-form input,.np-grid input{width:100%;min-height:43px;border:1px solid #dce5e7;border-radius:9px;padding:9px 11px;background:#fff;box-sizing:border-box}.connect-form button{width:100%;margin-top:12px}.credential-note{margin-top:13px;color:#7f8da0;font-size:13px}.integration-action{display:inline-flex!important;margin-top:10px;text-decoration:none}.integration-side{display:flex;flex-direction:column;gap:15px}.integration-side .panel{padding:20px}.import-help h3{margin-top:0}.import-help ul{display:grid;gap:10px;padding:0;list-style:none;color:#64758a;font-size:13px}.disconnect-button{width:100%;min-height:40px;border:1px solid #efd6d6;border-radius:9px;background:#fffafa;color:#b74d4d;cursor:pointer}.np-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:25px}.np-wide{grid-column:1/-1}.np-grid small{color:#8b98aa;font-weight:400}.np-note{padding:15px;border:1px solid #e5eaf0;border-radius:10px;background:#f7f9fb;color:#4d6078}.np-note p{margin:5px 0 0;color:#7a899b;font-size:13px}.np-actions{display:flex;justify-content:flex-end;gap:9px;padding-top:6px}.np-actions button{min-width:170px}.np-disconnect{margin-top:22px;padding-top:18px;border-top:1px solid #edf0f4}.np-disconnect .disconnect-button{width:auto;padding:0 18px}
@media(max-width:900px){.integration-layout{grid-template-columns:1fr}.integration-side{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.integration-hero{padding:28px}.integration-orbit{display:none}}
@media(max-width:650px){.integration-cards,.np-grid{grid-template-columns:1fr}.np-wide{grid-column:auto}.integration-hero{min-height:0;padding:23px}.integration-hero h2{font-size:25px}.integration-side{display:flex}.import-steps{grid-template-columns:1fr}.np-actions{flex-direction:column}.np-actions button{width:100%}}

/* HugeProfit integration workspace */
.hugeprofit-page>.page-head{margin-bottom:16px}.hugeprofit-page>.panel{margin-bottom:18px}.hugeprofit-page>.panel.editor{max-width:none!important}.hugeprofit-page>.panel.editor>h2,.hugeprofit-page>.panel>h2{margin:0;padding:22px 24px 6px;color:#293e5a;font-size:18px}.hugeprofit-page>.panel.editor>.sub{margin:0;padding:0 24px 10px;color:#7a899b;font-size:13px}.hugeprofit-page>.panel.editor>.form-grid{width:calc(100% - 48px)!important;margin:8px auto 22px!important;padding:18px!important;border:1px solid #e7ebf1;border-radius:12px;background:#fafbfd;box-sizing:border-box}.hugeprofit-page .form-grid label{display:flex;flex-direction:column;gap:7px;color:#64758a;font-size:13px;font-weight:600}.hugeprofit-page .form-grid select,.hugeprofit-page .form-grid input{min-height:42px;border:1px solid #dce5e7;border-radius:9px;padding:8px 10px;background:#fff}.hp-client-import{overflow:hidden}.hp-client-import .panel-heading{display:flex;align-items:center;justify-content:space-between;padding:21px 24px 10px}.hp-client-import .panel-heading h2{margin:0;color:#293e5a;font-size:18px}.hp-client-import .panel-heading p{margin:4px 0 0}.hp-client-body{padding:4px 24px 23px;color:#65758b;font-size:13px}.hp-client-body>p{max-width:820px;line-height:1.6}.hp-client-confirm{display:flex;align-items:flex-start;gap:12px;margin:17px 0;padding:14px 16px;border:1px solid #f0dfc7;border-radius:10px;background:#fffaf1;color:#665640}.hp-client-confirm>span{font-size:18px}.hp-client-confirm b,.hp-client-confirm small{display:block}.hp-client-confirm small{margin-top:4px;color:#8b7a66}.hp-client-body .form-actions{display:flex;justify-content:flex-end}.hp-skipped{margin-top:15px;padding:12px 14px;border:1px solid #eadede;border-radius:9px;background:#fffafa}.hp-skipped summary{cursor:pointer;color:#a64c4c;font-weight:600}.hp-skipped p{margin:8px 0;color:#7b5b5b;font-size:13px}.hugeprofit-page>.panel>.table-wrap{padding-top:8px}
@media(max-width:650px){.hugeprofit-page>.panel.editor>.form-grid{width:calc(100% - 20px)!important;padding:13px!important}.hp-client-import .panel-heading,.hp-client-body{padding-left:15px;padding-right:15px}.hp-client-body .form-actions .primary{width:100%}}

/* HugeProfit sync modes and history */
.badge.amber{background:#fff4dc;color:#a36a16}.badge.red{background:#fff0ee;color:#ad4539;border-color:#f1c8c2}.hp-sync-history{overflow:hidden}.hp-sync-history .panel-heading{display:flex;align-items:center;justify-content:space-between;padding:20px 24px 8px}.hp-sync-history .panel-heading h2{margin:0;color:#293e5a;font-size:18px}.hp-sync-history .panel-heading p{margin:4px 0 0}.hp-sync-history .table-wrap{padding:7px 0 4px}.hp-sync-history td,.hp-sync-history th{padding-left:20px;padding-right:20px}.hp-sync-history td b,.hp-sync-history td small{display:block}.hp-sync-history td small{margin-top:3px;color:#8491a1;font-size:13px}
@media(max-width:750px){.hp-sync-history .table-wrap{overflow-x:auto}.hp-sync-history table{min-width:720px}.hp-sync-history .panel-heading{padding-left:15px;padding-right:15px}}

/* Nova Poshta capabilities */
.np-capabilities{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.np-capabilities>div{display:flex;flex-direction:column;gap:4px;padding:13px 14px;border:1px solid #e5eaf0;border-radius:10px;background:#fbfcfd}.np-capabilities b{color:#435875;font-size:13px}.np-capabilities span{color:#8390a1;font-size:13px;line-height:1.45}
@media(max-width:650px){.np-capabilities{grid-template-columns:1fr}}

/* Nova Poshta inside sale editor */
.np-sale-delivery{margin:14px 0;padding:16px;border:1px solid #e4e9ef;border-radius:12px;background:#fafbfd}.np-sale-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;color:#354b68}.np-sale-head span{padding:4px 8px;border-radius:999px;background:#eef2f6;color:#708096;font-size:13px}.np-delivery-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;position:relative}.np-delivery-grid label{display:flex;flex-direction:column;gap:6px;color:#68788d;font-size:13px;font-weight:600}.np-delivery-grid input:not([type=checkbox]){min-height:40px;border:1px solid #dce4ec;border-radius:8px;padding:8px 10px;background:#fff}.np-default{grid-column:1/-1;flex-direction:row!important;align-items:center}.np-search-results{grid-column:1/-1;display:flex;flex-direction:column;gap:3px;margin-top:-7px;max-height:210px;overflow:auto}.np-search-results:empty{display:none}.np-search-results button{border:1px solid #e6eaf0;border-radius:7px;padding:8px 10px;background:#fff;color:#4c607a;text-align:left;cursor:pointer}.np-search-results button:hover{border-color:#efb092;background:#fffaf7}.np-profile-chip{display:inline-flex;flex-direction:column;gap:2px;margin:0 6px 10px 0;padding:8px 10px;border:1px solid #dfe5ec;border-radius:9px;background:#fff;color:#52657d;text-align:left;cursor:pointer}.np-profile-chip.default{border-color:#efb194;background:#fff9f5}.np-profile-chip b{font-size:13px}.np-profile-chip span{max-width:300px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;color:#8190a2}
@media(max-width:650px){.np-delivery-grid{grid-template-columns:1fr}.np-default{grid-column:auto}.np-sale-head{align-items:flex-start;flex-direction:column}}


/* Nova Poshta tracking in sales list */
.np-ttn-cell{min-width:245px}.np-ttn-stack{display:flex;flex-direction:column;gap:8px}.np-ttn-card{display:flex;flex-direction:column;align-items:flex-start;gap:5px;padding:9px 10px;border:1px solid #e3e9f0;border-radius:10px;background:#fbfcfe}.np-ttn-line{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%}.np-ttn-line b{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:13px;color:#263a55;letter-spacing:.02em}.np-copy{border:0;background:transparent;padding:2px;color:#7b899a;font-size:13px;cursor:pointer}.np-copy:hover{color:#c85f39}.np-track-status{display:inline-flex;max-width:100%;padding:4px 7px;border-radius:7px;font-size:13px;font-weight:700;line-height:1.35}.np-track-status.active{background:#fff4e8;color:#a55a20}.np-track-status.final{background:#edf8f0;color:#39744b}.np-track-status.error{background:#fff0f0;color:#a12828}.np-ttn-updated{color:#8a96a7;font-size:13px}.np-refresh{margin-top:2px!important;min-height:29px!important;padding:4px 8px!important;font-size:13px!important}.np-ttn-empty{display:flex;flex-direction:column;align-items:flex-start;gap:5px;color:#8793a3;font-size:13px}.np-ttn-empty a{color:#c85f39;font-weight:700;text-decoration:none}.np-ttn-empty a:hover{text-decoration:underline}
@media(max-width:760px){.np-ttn-cell{min-width:220px}.np-ttn-card{padding:8px}.np-track-status{white-space:normal}}

.np-ttn-actions{display:flex;align-items:center;gap:5px;flex-wrap:wrap;margin-top:3px}.np-ttn-actions .outline.small{min-height:28px;padding:4px 7px;border-radius:7px;font-size:13px;text-decoration:none;white-space:nowrap}.np-ttn-actions .danger{color:#b24646;border-color:#efd8d8;background:#fffafa}.np-ttn-actions .danger:hover{background:#fff2f2}
@media(max-width:760px){.np-ttn-actions{align-items:stretch}.np-ttn-actions .outline.small{flex:1 1 auto;text-align:center}}

/* Nova Poshta TTN edit */
.np-edit-panel{max-width:920px}.np-edit-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:18px}.np-edit-summary>div{display:flex;flex-direction:column;gap:4px;padding:12px 14px;border:1px solid #e3e9f0;border-radius:10px;background:#fbfcfe}.np-edit-summary span{font-size:13px;color:#8290a3}.np-edit-summary b{font-size:14px;color:#2d405b}.np-edit-panel .form-actions a.outline{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
@media(max-width:650px){.np-edit-summary{grid-template-columns:1fr}.np-edit-panel .form-actions{display:grid;grid-template-columns:1fr}.np-edit-panel .form-actions>*{width:100%}}

/* Sales delivery filters and aggregate Nova Poshta status */
.sales-filter-bar{display:grid;grid-template-columns:minmax(220px,1.4fr) minmax(145px,.75fr) minmax(155px,.8fr) minmax(135px,.7fr) auto;gap:10px;align-items:end;margin-bottom:14px}.sales-filter-bar label{display:flex;flex-direction:column;gap:5px;font-size:13px;color:#718096}.sales-filter-bar input,.sales-filter-bar select{min-height:39px}.sales-filter-actions{display:flex;gap:7px;align-items:center}.sales-filter-actions .outline{display:inline-flex;align-items:center;justify-content:center;min-height:39px;text-decoration:none}.sale-fulfilment-cell{display:flex;flex-direction:column;align-items:flex-start;gap:5px}.sale-delivery-state{display:inline-flex;align-items:center;min-height:22px;padding:2px 7px;border-radius:999px;font-size:13px;font-weight:700;line-height:1.2;background:#eef2f7;color:#56657a;white-space:nowrap}.delivery-state-waiting_ttn{background:#f3f4f6;color:#697586}.delivery-state-created{background:#eef4ff;color:#4264a8}.delivery-state-shipped,.delivery-state-in_transit{background:#fff5df;color:#9a6412}.delivery-state-arrived{background:#eef7ff;color:#2271a8}.delivery-state-received{background:#eaf8ef;color:#247247}.delivery-state-returning,.delivery-state-attention{background:#fff0e8;color:#a45122}.delivery-state-cancelled{background:#f7eeee;color:#9a4242}
@media(max-width:900px){.sales-filter-bar{grid-template-columns:1fr 1fr}.sales-filter-actions{grid-column:1/-1}}
@media(max-width:620px){.sales-filter-bar{grid-template-columns:1fr}.sales-filter-actions{grid-column:auto}.sales-filter-actions>*{flex:1}}

.sale-dashboard-status{display:flex;align-items:flex-start;gap:5px;flex-wrap:wrap}.sale-dashboard-status .sale-delivery-state{margin-top:1px}

/* Problem deliveries */
.delivery-issues-page{padding-bottom:34px}.delivery-issues-total{display:inline-flex;align-items:center;padding:7px 10px;border-radius:999px;background:#fff0e8;color:#a45122;font-size:13px;font-weight:800}.delivery-issue-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin:0 0 14px}.delivery-issue-stats a{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 12px;border:1px solid #e3e9ef;border-radius:10px;background:#fff;color:#627287;text-decoration:none;font-size:13px}.delivery-issue-stats a b{display:grid;place-items:center;min-width:25px;height:25px;padding:0 6px;border-radius:999px;background:#f2f5f8;color:#40516a;font-size:13px}.delivery-issue-stats a.active{border-color:#efb194;background:#fff8f4;color:#b95631}.delivery-issue-stats a.active b{background:#ffeadf;color:#b95631}.delivery-issues-panel{padding:16px!important}.delivery-issues-filter{display:grid;grid-template-columns:minmax(240px,1fr) auto auto;gap:8px;margin-bottom:14px}.delivery-issues-filter input{min-height:40px}.delivery-issues-filter .outline{display:inline-flex;align-items:center;justify-content:center;min-height:40px;text-decoration:none}.delivery-issue-list{display:flex;flex-direction:column;gap:10px}.delivery-issue-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;padding:15px 16px;border:1px solid #e5eaf0;border-left-width:4px;border-radius:11px;background:#fff}.delivery-issue-card.issue-warning{border-left-color:#e8a23b}.delivery-issue-card.issue-danger{border-left-color:#cf5e5e;background:#fffdfd}.delivery-issue-main{min-width:0}.delivery-issue-title{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.delivery-issue-title>b{color:#273d59;font-size:14px}.delivery-issue-title small{color:#8a97a8;font-size:13px}.delivery-issue-badge{display:inline-flex;padding:4px 7px;border-radius:7px;background:#fff1df;color:#9a6319;font-size:13px;font-weight:800}.issue-danger .delivery-issue-badge{background:#fff0f0;color:#a14343}.delivery-issue-customer{display:flex;gap:8px;align-items:center;margin-top:7px;color:#52657b;font-size:13px}.delivery-issue-customer span{color:#8a96a5}.delivery-issue-card p{margin:8px 0;color:#6f7e91;font-size:13px;line-height:1.45}.delivery-issue-ttn{display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:8px 10px;border-radius:8px;background:#f7f9fb;color:#576a82;font-size:13px}.delivery-issue-ttn b{font-family:ui-monospace,SFMono-Regular,Consolas,monospace}.delivery-issue-ttn small{color:#8b98a8}.delivery-issue-actions{display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:6px;min-width:135px}.delivery-issue-actions .small{display:inline-flex;align-items:center;justify-content:center;min-height:31px;text-decoration:none;white-space:nowrap}.delivery-issues-empty{padding:34px 15px;text-align:center;color:#8290a1}.delivery-issues-empty b{display:block;color:#40516a;font-size:15px}.delivery-issues-empty p{margin:6px 0 0;font-size:13px}
@media(max-width:900px){.delivery-issue-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.delivery-issue-card{grid-template-columns:1fr}.delivery-issue-actions{flex-direction:row;flex-wrap:wrap;justify-content:flex-start}.delivery-issue-actions .small{flex:1 1 130px}}
@media(max-width:620px){.delivery-issue-stats{grid-template-columns:1fr}.delivery-issues-filter{grid-template-columns:1fr}.delivery-issue-card{padding:13px}.delivery-issue-actions{display:grid;grid-template-columns:1fr}.delivery-issue-actions .small{width:100%}}

.dashboard-delivery-alert{display:flex;align-items:center;gap:12px;margin:0 0 16px;padding:13px 15px;border:1px solid #f0d7bd;border-radius:11px;background:#fff9f2;color:#6f573d;text-decoration:none}.dashboard-delivery-alert>span{display:grid;place-items:center;width:34px;height:34px;border-radius:9px;background:#fff0dc;font-size:17px}.dashboard-delivery-alert>div{display:flex;flex:1;flex-direction:column;gap:2px}.dashboard-delivery-alert b{color:#8a5528;font-size:13px}.dashboard-delivery-alert small{color:#89745f;font-size:13px}.dashboard-delivery-alert strong{color:#b85b31;font-size:13px;white-space:nowrap}.dashboard-delivery-alert:hover{border-color:#e7bd92;background:#fff6ec}
@media(max-width:620px){.dashboard-delivery-alert{align-items:flex-start}.dashboard-delivery-alert strong{display:none}}

.sales-head-actions{display:flex;align-items:center;gap:8px}.sales-head-actions .outline{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
@media(max-width:620px){.sales-head-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}.sales-head-actions>*{width:100%}}

/* Dashboard notification center */
.dashboard-notification-center{margin:0 0 17px;border:1px solid #e2e8ef;border-radius:13px;background:#fff;overflow:hidden}.dashboard-notification-center.has-alerts{border-color:#ead8c4}.dashboard-notification-head{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:13px 15px;border-bottom:1px solid #edf0f4;background:#fbfcfd}.dashboard-notification-center.has-alerts .dashboard-notification-head{background:#fffaf5}.dashboard-notification-title{display:flex;align-items:center;gap:10px}.notification-bell{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#eef3f8;color:#40556f;font-size:21px;font-weight:800}.has-alerts .notification-bell{background:#fff0df;color:#ae6030}.dashboard-notification-title>div{display:flex;flex-direction:column;gap:2px}.dashboard-notification-title b{color:#2b405c;font-size:14px}.dashboard-notification-title small{color:#8390a1;font-size:13px}.dashboard-notification-head-actions{display:flex;align-items:center;gap:9px}.dashboard-notification-head-actions a{color:#c26039;font-size:13px;font-weight:700;text-decoration:none}.notification-count{display:grid;place-items:center;min-width:25px;height:25px;padding:0 7px;border-radius:999px;background:#d7673e;color:#fff;font-size:13px;font-weight:800}.dashboard-notification-list{display:flex;flex-direction:column}.dashboard-notification-item{display:grid;grid-template-columns:8px minmax(0,1fr) auto;gap:11px;padding:12px 15px;border-top:1px solid #f0f2f5}.dashboard-notification-item:first-child{border-top:0}.notification-dot{width:7px;height:7px;margin-top:6px;border-radius:50%;background:#e0a24d}.dashboard-notification-item.danger .notification-dot{background:#ce5a5a}.dashboard-notification-body{min-width:0}.dashboard-notification-row{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.dashboard-notification-row b{color:#3b506c;font-size:13px}.dashboard-notification-row small{margin-left:auto;color:#98a3b1;font-size:13px}.notification-new{padding:2px 5px;border-radius:5px;background:#fff0df;color:#ad5b2d;font-size:13px;font-weight:800;text-transform:uppercase}.dashboard-notification-sale{display:inline-block;margin-top:3px;color:#52677f;font-size:13px;font-weight:700;text-decoration:none}.dashboard-notification-sale:hover{color:#c05c36}.dashboard-notification-body p{margin:4px 0;color:#778598;font-size:13px;line-height:1.4}.dashboard-notification-ttn{display:block;max-width:760px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#8a96a5;font-size:13px}.dashboard-notification-actions{display:flex;align-items:center;gap:6px}.dashboard-notification-actions .small{display:inline-flex;align-items:center;justify-content:center;min-height:29px;padding:4px 8px;text-decoration:none;white-space:nowrap}.dashboard-notification-empty{display:flex;align-items:center;gap:10px;padding:17px 15px}.dashboard-notification-empty>span{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:#eaf7ef;color:#2c8255;font-weight:800}.dashboard-notification-empty>div{display:flex;flex-direction:column;gap:2px}.dashboard-notification-empty b{color:#40546e;font-size:13px}.dashboard-notification-empty small{color:#8794a4;font-size:13px}
@media(max-width:760px){.dashboard-notification-head{align-items:flex-start}.dashboard-notification-head-actions .notification-count{display:none}.dashboard-notification-item{grid-template-columns:8px 1fr}.dashboard-notification-actions{grid-column:2;justify-content:flex-start}.dashboard-notification-row small{width:100%;margin-left:0}.dashboard-notification-actions .small{flex:1}.dashboard-notification-ttn{white-space:normal}}
@media(max-width:520px){.dashboard-notification-head{gap:8px}.dashboard-notification-head-actions a{font-size:13px}.dashboard-notification-title small{max-width:210px}.dashboard-notification-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}}

.migration-topbar-actions{display:flex;align-items:center;gap:9px}.topbar-notification{position:relative;display:grid;place-items:center;width:34px;height:34px;border:1px solid #e0e6ee;border-radius:10px;background:#fff;color:#617188;text-decoration:none;font-size:20px;font-weight:800}.topbar-notification:hover{border-color:#d2dae5;background:#f8fafc}.topbar-notification.has-alerts{border-color:#efcfb1;background:#fff8f1;color:#b85c31}.topbar-notification b{position:absolute;top:-6px;right:-6px;display:grid;place-items:center;min-width:18px;height:18px;padding:0 4px;border:2px solid #fff;border-radius:999px;background:#d55f38;color:#fff;font-size:13px;line-height:1}.dashboard-notification-center{scroll-margin-top:18px}

/* Logistics workspace */
.logistics-page{padding-bottom:36px}.logistics-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:14px}.logistics-stats article{display:flex;align-items:center;justify-content:space-between;padding:14px 15px;border:1px solid #e2e8ef;border-radius:11px;background:#fff}.logistics-stats span{color:#76869a;font-size:13px}.logistics-stats b{color:#29405d;font-size:21px}.logistics-panel{padding:16px!important}.logistics-filters{display:grid;grid-template-columns:minmax(220px,1.5fr) minmax(160px,.8fr) minmax(150px,.7fr) auto;gap:9px;align-items:end;margin-bottom:15px}.logistics-filters label{display:flex;flex-direction:column;gap:5px;color:#718096;font-size:13px}.logistics-filters input,.logistics-filters select{min-height:40px}.logistics-filter-actions{display:flex;gap:7px;align-items:center}.logistics-filter-actions .outline{display:inline-flex;align-items:center;justify-content:center;min-height:40px;text-decoration:none}.logistics-list{display:flex;flex-direction:column;gap:10px}.logistics-card{padding:15px 16px;border:1px solid #e2e8ef;border-radius:12px;background:#fff}.logistics-card.is-returned{opacity:.72}.logistics-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding-bottom:11px;border-bottom:1px solid #edf1f5}.logistics-card-head>div{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.logistics-card-head b{color:#2b405c;font-size:14px}.logistics-card-head small{color:#8a97a8;font-size:13px}.logistics-method{display:inline-flex;padding:4px 7px;border-radius:7px;background:#f1f4f7;color:#5f7188;font-size:13px;font-weight:800}.logistics-card-grid{display:grid;grid-template-columns:1.1fr 1.5fr .7fr .9fr;gap:14px;padding:13px 0}.logistics-card-grid>div{display:flex;min-width:0;flex-direction:column;gap:3px}.logistics-card-grid span{color:#8996a6;font-size:13px;text-transform:uppercase;letter-spacing:.04em}.logistics-card-grid b{overflow:hidden;text-overflow:ellipsis;color:#3b506b;font-size:13px}.logistics-card-grid small{color:#77879a;font-size:13px;line-height:1.4}.logistics-card-grid em{margin-top:4px;color:#9b6a42;font-size:13px;font-style:normal}.logistics-card-actions{display:flex;justify-content:flex-end;gap:7px;flex-wrap:wrap;padding-top:10px;border-top:1px solid #edf1f5}.logistics-card-actions form{margin:0}.logistics-card-actions .small{display:inline-flex;align-items:center;justify-content:center;min-height:31px;text-decoration:none}.logistics-empty,.logistics-integration-empty{padding:32px 18px;text-align:center}.logistics-empty b,.logistics-integration-empty b{display:block;color:#3d526d;font-size:15px}.logistics-empty p,.logistics-integration-empty p{margin:6px auto 14px;max-width:560px;color:#8491a2;font-size:13px;line-height:1.5}.logistics-integration-empty .primary{display:inline-flex;text-decoration:none}.delivery-state-pending{background:#fff5df;color:#9a6412}.delivery-state-delivered{background:#eaf8ef;color:#247247}
@media(max-width:980px){.logistics-filters{grid-template-columns:1fr 1fr}.logistics-filter-actions{grid-column:1/-1}.logistics-card-grid{grid-template-columns:1fr 1fr}}
@media(max-width:650px){.logistics-stats{grid-template-columns:1fr}.logistics-filters{grid-template-columns:1fr}.logistics-filter-actions{grid-column:auto}.logistics-filter-actions>*{flex:1}.logistics-card-grid{grid-template-columns:1fr}.logistics-card-head{flex-direction:column}.logistics-card-actions{display:grid;grid-template-columns:1fr}.logistics-card-actions .small,.logistics-card-actions form,.logistics-card-actions form button{width:100%}}

@media(max-width:650px){.product-picker-input-row{min-height:48px}.product-picker-selected-media,.product-picker-selected-media img,.product-picker-selected-placeholder{width:38px;height:38px}}

/* Nova Poshta automatic sender setup */
.np-auto-setup{padding:14px;border:1px solid #dde6ef;border-radius:12px;background:#f9fbfd}.np-auto-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.np-auto-head>div{display:flex;min-width:0;flex-direction:column;gap:3px}.np-auto-head b{color:#2f4663;font-size:13px}.np-auto-head span{color:#8190a3;font-size:13px;line-height:1.4}.np-auto-head span.error{color:#b64f45}.np-auto-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.np-auto-grid label,.np-city-fallback label{display:flex;flex-direction:column;gap:5px;color:#66778c;font-size:13px}.np-auto-grid select,.np-city-fallback input,.np-city-fallback select{min-height:40px;background:#fff}.np-auto-hint{margin:11px 0 0;color:#7d8b9c;font-size:13px;line-height:1.5}.np-city-fallback{display:grid;grid-template-columns:1fr;gap:7px;margin-top:10px;padding:10px;border:1px dashed #d8e0e9;border-radius:9px;background:#fff}.np-tech-fields{margin-top:2px;border:1px solid #e6ebf1;border-radius:10px;background:#fff}.np-tech-fields summary{cursor:pointer;padding:10px 12px;color:#7c8a9b;font-size:13px;font-weight:700}.np-tech-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;padding:0 12px 12px}.np-tech-grid label{display:flex;flex-direction:column;gap:4px;color:#758497;font-size:13px}.np-tech-grid input{min-height:36px;background:#fafbfd;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:13px}
@media(max-width:720px){.np-auto-head{align-items:flex-start;flex-direction:column}.np-auto-head button{width:100%}.np-auto-grid,.np-tech-grid{grid-template-columns:1fr}}

/* Sale payments, bonuses and Nova Poshta COD */
.sale-payment-box{margin:14px 0;padding:15px;border:1px solid #e2e8ef;border-radius:12px;background:#fbfcfe}.sale-payment-title{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}.sale-payment-title b{color:#304762;font-size:13px}.sale-payment-title span{color:#8290a2;font-size:13px}.sale-payment-grid{display:grid;grid-template-columns:minmax(180px,.8fr) minmax(180px,.8fr) minmax(260px,1.2fr);gap:10px;align-items:end}.sale-payment-grid>label{display:flex;flex-direction:column;gap:5px;color:#68798e;font-size:13px}.sale-payment-grid input[type=number]{min-height:40px}.sale-payment-grid small{color:#8a97a8;font-size:13px}.sale-payment-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;padding:9px 10px;border:1px solid #e7ebf0;border-radius:9px;background:#fff}.sale-payment-summary span{display:flex;flex-direction:column;gap:2px;color:#8a97a8;font-size:13px;text-transform:uppercase}.sale-payment-summary b,.sale-payment-summary strong{color:#354c68;font-size:13px;text-transform:none}.sale-payment-summary strong{color:#b25532}.np-cod-control{grid-column:1/-1;display:flex!important;flex-direction:row!important;align-items:center;gap:8px!important;padding:10px 12px;border:1px solid #f0d7bd;border-radius:9px;background:#fff9f2;color:#78593d!important}.np-cod-control input{width:auto}.np-cod-control b{margin-left:auto;color:#b75c31}.sale-payment-cell{min-width:190px}.sale-payment-state{display:flex;flex-direction:column;gap:2px;padding:7px 8px;border-radius:8px;background:#f5f7f9}.sale-payment-state b{font-size:13px}.sale-payment-state small{color:#7c8999;font-size:13px;line-height:1.35}.sale-payment-state strong{font-size:13px}.sale-payment-state.paid{background:#edf8f1}.sale-payment-state.paid b{color:#28744a}.sale-payment-state.partial{background:#fff7e8}.sale-payment-state.partial b,.sale-payment-state.partial strong{color:#9c681b}.sale-payment-state.unpaid{background:#fff0ee}.sale-payment-state.unpaid b,.sale-payment-state.unpaid strong{color:#ad493f}.sale-add-payment{position:relative;margin-top:5px}.sale-add-payment>summary{display:inline-flex;cursor:pointer;list-style:none}.sale-add-payment>summary::-webkit-details-marker{display:none}.sale-add-payment>form{position:absolute;z-index:30;right:0;top:34px;width:250px;padding:12px;border:1px solid #dfe6ee;border-radius:10px;background:#fff;box-shadow:0 14px 35px rgba(31,45,67,.16)}.sale-add-payment form label{display:flex;flex-direction:column;gap:4px;margin-bottom:8px;color:#6c7b8e;font-size:13px}.sale-add-payment form input,.sale-add-payment form select{min-height:36px}.sale-add-payment form button{width:100%}.np-payment-control{padding:13px;border:1px solid #e2e8ef;border-radius:11px;background:#fafbfd}.np-payment-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:12px}.np-payment-summary>div{display:flex;flex-direction:column;gap:3px;padding:9px 10px;border-radius:8px;background:#fff;border:1px solid #e8edf2}.np-payment-summary span{color:#8794a4;font-size:13px;text-transform:uppercase}.np-payment-summary b{color:#344a65;font-size:13px}.np-payment-summary .due{border-color:#f0d3bd;background:#fffaf4}.np-payment-summary .due b{color:#b65a31}.np-payment-summary .paid{background:#f1faf4}.np-payment-summary .paid b{color:#28764b}.np-cod-switch{display:flex!important;flex-direction:row!important;align-items:center;gap:8px!important;padding:10px 12px;border:1px solid #ead9c7;border-radius:9px;background:#fff}.np-cod-switch input{width:auto}.np-payment-control>label:not(.np-cod-switch){margin-top:10px}
@media(max-width:900px){.sale-payment-grid{grid-template-columns:1fr 1fr}.sale-payment-summary{grid-column:1/-1}.np-payment-summary{grid-template-columns:1fr 1fr}}
@media(max-width:620px){.sale-payment-grid{grid-template-columns:1fr}.sale-payment-summary{grid-column:auto}.np-payment-summary{grid-template-columns:1fr 1fr}.sale-add-payment>form{position:fixed;left:12px;right:12px;bottom:12px;top:auto;width:auto}}

.finance-payment-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.finance-payment-metrics article.has-debt{border-color:#efd6c8;background:#fffaf6}.finance-payment-metrics article.has-debt strong{color:#b25532}
@media(max-width:900px){.finance-payment-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.finance-payment-metrics{grid-template-columns:1fr}}

.sale-payment-state.returned{background:#f1f3f6}.sale-payment-state.returned b{color:#677689}.sale-payment-history{margin-top:5px}.sale-payment-history>summary{cursor:pointer;color:#718096;font-size:13px;font-weight:700;list-style:none}.sale-payment-history>summary::-webkit-details-marker{display:none}.sale-payment-history>div{margin-top:5px;padding:6px 7px;border:1px solid #e5eaf0;border-radius:8px;background:#fff}.sale-payment-history p{display:grid;grid-template-columns:1fr auto;gap:2px 8px;margin:0;padding:5px 0;border-bottom:1px solid #eef1f4}.sale-payment-history p:last-child{border-bottom:0}.sale-payment-history span{color:#8a96a6;font-size:13px}.sale-payment-history b{font-size:13px;color:#35506e}.sale-payment-history small{grid-column:1/-1;color:#7a899b;font-size:13px}.sale-payment-history p.negative b{color:#b75043}.sale-cod-alert{margin-top:5px;padding:6px 7px;border:1px solid #efd1b4;border-radius:7px;background:#fff8ef;color:#9a602c;font-size:13px;line-height:1.4}

.np-ttn-cod{display:block;margin-top:3px;color:#7b6655;font-size:13px}.np-cod-mismatch{margin-top:5px;padding:6px 7px;border:1px solid #efc8ae;border-radius:7px;background:#fff7ef;color:#a0572e;font-size:13px;line-height:1.4}.logistics-payment-due{display:inline-flex;margin-top:4px;padding:3px 6px;border-radius:6px;background:#fff4e8;color:#a15b28!important;font-size:13px!important;font-weight:700;font-style:normal!important}

.customer-bonus-history{min-width:190px}.customer-bonus-history>summary{cursor:pointer;color:#6f7f93;font-size:13px;font-weight:700;list-style:none}.customer-bonus-history>summary::-webkit-details-marker{display:none}.customer-bonus-history>div{margin-top:6px;max-height:220px;overflow:auto;padding:6px 8px;border:1px solid #e4eaf0;border-radius:8px;background:#fff}.customer-bonus-history p{display:grid;grid-template-columns:1fr auto;gap:2px 8px;margin:0;padding:6px 0;border-bottom:1px solid #edf1f4}.customer-bonus-history p:last-child{border-bottom:0}.customer-bonus-history span{color:#8793a3;font-size:13px}.customer-bonus-history b{font-size:13px}.customer-bonus-history small{grid-column:1/-1;color:#748397;font-size:13px;line-height:1.35}.customer-bonus-history .positive b{color:#28734b}.customer-bonus-history .negative b{color:#b14e43}

/* Business documents workspace */
.document-editor{padding:0!important;overflow:hidden}.document-editor-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:20px 22px;border-bottom:1px solid #e8edf3;background:linear-gradient(180deg,#fff 0%,#fbfcfe 100%)}.document-editor-head>div{display:flex;flex-direction:column;gap:3px}.document-editor-head>div>span{color:#dc633d;font-size:13px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.document-editor-head h2{margin:0!important;color:#213750;font-size:20px!important}.document-editor-head p{margin:2px 0 0;color:#7d8b9d;font-size:13px}.document-form{padding:18px 22px 22px}.document-section{margin:0 0 15px;padding:14px;border:1px solid #e4e9f0;border-radius:11px;background:#fbfcfe}.document-section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:11px}.document-section-title b{color:#334a66;font-size:13px}.document-section-title span{color:#8a97a7;font-size:13px}.document-party-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.document-party-grid label,.document-note{display:flex;flex-direction:column;gap:6px;color:#697b91;font-size:13px;font-weight:650}.document-party-grid input,.document-party-grid select,.document-party-grid textarea,.document-note textarea{width:100%;border:1px solid #dce4ed;border-radius:9px;background:#fff;padding:10px 11px;color:#30465f;font:inherit}.document-party-grid textarea{min-height:98px;resize:vertical}.document-note textarea{min-height:68px;resize:vertical}.document-lines-head{display:grid;grid-template-columns:minmax(280px,1.5fr) minmax(170px,.8fr) 110px 130px 42px;gap:8px;padding:0 5px 5px;color:#8794a5;font-size:13px;text-transform:uppercase;letter-spacing:.04em}.document-lines{display:grid;gap:8px}.document-line{grid-template-columns:minmax(280px,1.5fr) minmax(170px,.8fr) 110px 130px 42px!important;margin:0!important;padding:8px;border:1px solid #e5eaf0;border-radius:10px;background:#fff}.document-line select,.document-line input{min-height:42px;border-color:#dce4ed!important}.document-line button{min-height:42px}.document-add-line{margin-top:9px}.document-summary-section{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,.55fr);gap:14px;align-items:start}.document-summary-section .document-total{margin:0;height:100%;min-height:94px}.document-form-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:4px}.document-form-actions .outline{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}.document-list-panel{padding:0!important;overflow:hidden}.document-list-head{display:flex;align-items:center;justify-content:space-between;padding:14px 17px;border-bottom:1px solid #e9edf3;background:#fbfcfd}.document-list-head>div{display:flex;align-items:baseline;gap:9px}.document-list-head b{color:#334a66;font-size:13px}.document-list-head span{color:#8c98a8;font-size:13px}.document-card-list{display:flex;flex-direction:column}.document-card{display:grid;grid-template-columns:minmax(260px,1.4fr) 150px 120px minmax(220px,.8fr) auto;gap:12px;align-items:center;padding:13px 16px;border:0;border-bottom:1px solid #edf0f4;border-radius:0;background:#fff}.document-card:last-child{border-bottom:0}.document-card:hover{background:#fbfcfe}.document-card-main{display:flex;align-items:center;gap:10px;min-width:0}.document-card-main>div:last-child{display:flex;min-width:0;flex-direction:column;gap:2px}.document-card-main b{color:#2d435f;font-size:13px}.document-card-main span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#66788e;font-size:13px}.document-card-main small{color:#97a2b0;font-size:13px}.document-card-icon{display:grid;place-items:center;width:38px;height:38px;flex:0 0 38px;border-radius:9px;background:#fff0e9;color:#d45d37;font-size:13px;font-weight:900}.document-card-icon.delivery-icon{background:#edf4fb;color:#42698d}.document-card-total{display:flex;flex-direction:column;gap:2px}.document-card-total span{color:#8b97a7;font-size:13px;text-transform:uppercase}.document-card-total b{color:#314964;font-size:13px}.document-status-form{display:grid;grid-template-columns:minmax(120px,1fr) auto;gap:6px;align-items:center}.document-status-form select{min-height:34px;border:1px solid #dfe6ee;border-radius:8px;background:#fff;padding:5px 8px;color:#52667f;font-size:13px}.document-card-actions{display:flex;justify-content:flex-end}.document-card-actions .outline{display:inline-flex;text-decoration:none;white-space:nowrap}.invoice-status{display:inline-flex;align-items:center;justify-content:center;min-height:27px;padding:4px 8px;border-radius:999px;background:#f1f4f7;color:#617288;font-size:13px;font-weight:800;white-space:nowrap}.status-1{background:#f2f4f7;color:#64758a}.status-2,.status-3{background:#eef4fb;color:#486b8d}.status-4{background:#fff5df;color:#95621a}.status-5{background:#eef7ef;color:#39734b}.status-6{background:#eaf8ef;color:#26734b}.status-7{background:#f3f3f5;color:#6f6f77}.document-empty{display:flex;flex-direction:column;gap:4px}.document-empty b{color:#40546d}.document-empty span{color:#8a96a5;font-size:13px}
.delivery-card{display:block!important;padding:0!important}.delivery-card>summary{display:grid!important;grid-template-columns:minmax(260px,1fr) auto auto!important;gap:12px!important;align-items:center;padding:13px 16px}.delivery-card[open]>summary{margin:0!important;padding-bottom:13px!important;background:#fbfcfe}.document-open-hint{color:#8a97a8;font-size:13px}.document-delivery-form{padding:15px 16px 17px}.document-delivery-form .document-section{margin-bottom:10px}.document-delivery-form .document-form-actions{padding-top:3px}
@media(max-width:1050px){.document-card{grid-template-columns:minmax(240px,1fr) 120px 105px minmax(190px,.8fr)}.document-card-actions{grid-column:4}.document-lines-head,.document-line{grid-template-columns:minmax(230px,1.4fr) minmax(150px,.8fr) 95px 110px 38px!important}}
@media(max-width:760px){.document-party-grid,.document-summary-section{grid-template-columns:1fr}.document-lines-head{display:none}.document-line{grid-template-columns:1fr 1fr 90px 110px 38px!important}.document-line>.product-picker-ui{grid-column:1/-1}.document-card{grid-template-columns:minmax(0,1fr) auto;gap:8px 10px}.document-card-total{grid-column:1}.document-card .invoice-status{grid-column:2;grid-row:1}.document-status-form{grid-column:1/-1}.document-card-actions{grid-column:1/-1;justify-content:flex-start}.delivery-card>summary{grid-template-columns:minmax(0,1fr) auto!important}.delivery-card>summary .document-open-hint{grid-column:1/-1}.document-form-actions{display:grid;grid-template-columns:1fr 1fr}.document-form-actions>*{width:100%}}
@media(max-width:520px){.document-editor-head{padding:15px;flex-direction:column}.document-form{padding:12px}.document-section{padding:11px}.document-line{grid-template-columns:1fr 1fr!important}.document-line>.product-picker-ui{grid-column:1/-1}.document-line select[name="warehouse_id[]"]{grid-column:1/-1}.document-line button{grid-column:2;grid-row:3}.document-form-actions{grid-template-columns:1fr}.document-card{padding:12px}.document-status-form{grid-template-columns:1fr}.delivery-card>summary{padding:12px}.document-delivery-form{padding:12px}}

/* Catalog metrics like HugeProfit */
.catalog-metrics{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin:14px 0 16px}
.catalog-metrics article{display:flex;min-width:0;min-height:92px;flex-direction:column;justify-content:center;gap:4px;padding:15px 16px;border:1px solid #e3e8ef;border-radius:13px;background:#fff;box-shadow:0 2px 8px rgba(31,45,66,.035)}
.catalog-metrics span{color:#8491a2;font-size:13px;font-weight:800;letter-spacing:.055em;text-transform:uppercase}
.catalog-metrics strong{overflow:hidden;text-overflow:ellipsis;color:#20344d;font-size:21px;line-height:1.08;white-space:nowrap}
.catalog-metrics small{color:#8d99a8;font-size:13px;line-height:1.25}
.catalog-metrics article:nth-child(2) strong,.catalog-metrics article:nth-child(3) strong{color:#2f6d50}
.catalog-metrics article:nth-child(5) strong{color:#dc633d}
@media(max-width:1180px){.catalog-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.catalog-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.catalog-metrics article{min-height:82px;padding:12px}.catalog-metrics strong{font-size:18px}}
@media(max-width:480px){.catalog-metrics{grid-template-columns:1fr}}

/* Hierarchical category directory */
.category-editor{display:grid!important;grid-template-columns:minmax(240px,1fr) minmax(240px,1fr) auto!important;gap:14px!important;align-items:end!important}
.category-editor select{width:100%;min-height:42px;border:1px solid #dbe2ea;border-radius:9px;background:#fff;padding:9px 11px;color:#334960}
.category-editor-actions{display:flex;gap:8px;align-items:center}
.category-tree{gap:0!important;border:1px solid #e5eaf1;border-radius:12px;overflow:hidden;background:#fff}
.category-tree-row{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto 38px 38px!important;gap:10px!important;min-height:48px!important;margin:0!important;padding:8px 12px 8px calc(12px + var(--category-depth,0) * 22px)!important;border:0!important;border-bottom:1px solid #edf1f5!important;border-radius:0!important;box-shadow:none!important}
.category-tree-row:last-child{border-bottom:0!important}
.category-tree-row:hover{transform:none!important;background:#fbfcfe!important;box-shadow:none!important}
.category-tree-branch{min-width:12px;color:#a3afbd;font-size:13px;letter-spacing:-2px}
.category-tree-main{min-width:0}
.category-tree-main b{font-size:13px!important;color:#2d4058!important}
.category-tree-main small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px!important;color:#96a1af!important}
.category-source-badges{display:flex!important;flex:0 0 auto!important;gap:5px!important;justify-content:flex-end}
.category-source-badges span{display:inline-flex;padding:3px 7px;border-radius:999px;background:#eef4fb;color:#4b6e91;font-size:13px;font-weight:750}
@media(max-width:780px){.category-editor{grid-template-columns:1fr!important}.category-editor-actions{display:grid;grid-template-columns:1fr 1fr}.category-tree-row{grid-template-columns:auto minmax(0,1fr) 34px 34px!important;padding-left:calc(9px + var(--category-depth,0) * 14px)!important}.category-source-badges{grid-column:2}.category-tree-main small{white-space:normal}}

.oc-mark{display:grid;place-items:center;width:42px;height:42px;border-radius:11px;background:#168ed8;color:#fff;font-size:14px;font-weight:900;letter-spacing:-.03em}
.oc-connect-form .form-grid{display:grid;grid-template-columns:1fr 180px;gap:12px;text-align:left}
.oc-connect-form .form-grid label{display:flex;flex-direction:column;gap:6px;color:#607087;font-size:13px;font-weight:700}
.oc-connect-form .form-grid input{width:100%;min-height:42px;border:1px solid #dce4ed;border-radius:9px;background:#fff;padding:9px 11px;color:#30465f}
.oc-connect-form .form-grid small{color:#8794a5}
@media(max-width:700px){.oc-connect-form .form-grid{grid-template-columns:1fr}.oc-connect-form .form-grid .span2{grid-column:auto}}

/* OpenCart synchronization */
.oc-auto-sync{display:flex!important;flex-direction:row!important;align-items:center!important;gap:9px!important;padding:10px 12px;border:1px solid #dfe6ee;border-radius:9px;background:#fbfcfe}
.oc-auto-sync input{width:18px!important;height:18px!important;min-height:0!important;flex:0 0 18px}
.oc-auto-sync span{color:#41566f;font-size:13px;font-weight:650}
.opencart-page .page-head p{margin:4px 0 0;color:#7f8d9f;font-size:13px}
.oc-metrics{margin-top:0}
.oc-sync-panel{display:flex;flex-direction:column;gap:16px}
.oc-sync-flow{display:flex;align-items:center;justify-content:center;gap:12px;margin:6px 0 14px}
.oc-sync-flow span{display:inline-flex;align-items:center;justify-content:center;min-width:120px;padding:12px 16px;border:1px solid #dfe6ee;border-radius:11px;background:#fbfcfe;color:#314962;font-size:13px;font-weight:800}
.oc-sync-flow b{color:#96a2b1;font-size:18px}
.oc-sync-main{display:block;min-width:320px;margin:0 auto}
.oc-sync-secondary{display:flex;justify-content:center;gap:8px}
.oc-sync-secondary form{margin:0}
.oc-rules{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.oc-rules>div{display:flex;flex-direction:column;gap:5px;padding:13px 14px;border:1px solid #e3e9f0;border-radius:10px;background:#fbfcfe}
.oc-rules b{color:#2f455f;font-size:13px}
.oc-rules span{color:#738197;font-size:13px;line-height:1.45}
.oc-errors summary{cursor:pointer;font-weight:800;color:#8b5f22}
.oc-errors p{margin:6px 0;color:#7a5960;font-size:13px}
@media(max-width:760px){.oc-sync-flow{flex-wrap:wrap}.oc-sync-flow span{min-width:0;flex:1 1 110px}.oc-sync-main{min-width:0;width:100%}.oc-sync-secondary{display:grid;grid-template-columns:1fr}.oc-sync-secondary button{width:100%}.oc-rules{grid-template-columns:1fr}}

/* Writeoff documents */
.writeoff-editor[hidden]{display:none!important}
.writeoff-reason-grid{grid-template-columns:minmax(260px,520px)!important}
.writeoff-lines-head{grid-template-columns:minmax(280px,1.5fr) minmax(170px,.8fr) 110px 42px!important}
.writeoff-line{grid-template-columns:minmax(280px,1.5fr) minmax(170px,.8fr) 110px 42px!important}
.writeoff-line-spacer{display:block}
.writeoff-total{display:flex;min-height:94px;flex-direction:column;justify-content:center;gap:4px;padding:14px 16px;border:1px solid #e3e9f0;border-radius:10px;background:#f7f9fb}
.writeoff-total>span{color:#8491a2;font-size:13px;text-transform:uppercase}
.writeoff-total>strong{color:#263d57;font-size:20px}
.writeoff-total>small{color:#93a0af;font-size:13px}
.writeoff-card{grid-template-columns:minmax(260px,1.35fr) 150px 110px minmax(300px,1fr)!important}
.writeoff-icon{background:#fff2ec!important;color:#d6603b!important}
.writeoff-card-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;min-width:0}
.writeoff-action-form{display:flex;gap:6px;align-items:center;margin:0}
.writeoff-edit{position:relative}
.writeoff-edit>summary{cursor:pointer;list-style:none}
.writeoff-edit>summary::-webkit-details-marker{display:none}
.writeoff-edit-box{position:absolute;z-index:40;right:0;top:38px;width:min(900px,80vw);padding:0;border:1px solid #dfe6ee;border-radius:12px;background:#fff;box-shadow:0 18px 45px rgba(31,45,67,.18)}
.writeoff-edit-form{padding:14px!important}
.writeoff-edit-form .document-section:last-of-type{margin-bottom:8px}
@media(max-width:1050px){.writeoff-card{grid-template-columns:minmax(220px,1fr) 130px 100px!important}.writeoff-card-actions{grid-column:1/-1;justify-content:flex-start}.writeoff-edit-box{left:0;right:auto;width:min(860px,88vw)}}
@media(max-width:760px){.writeoff-lines-head{display:none}.writeoff-line{grid-template-columns:1fr 1fr 90px 38px!important}.writeoff-line>.product-picker-ui{grid-column:1/-1}.writeoff-card{grid-template-columns:minmax(0,1fr) auto!important}.writeoff-card-total{grid-column:1}.writeoff-card .invoice-status{grid-column:2;grid-row:1}.writeoff-card-actions{grid-column:1/-1;flex-wrap:wrap}.writeoff-edit{position:static}.writeoff-edit-box{position:fixed;left:12px;right:12px;top:70px;bottom:12px;width:auto;max-height:calc(100vh - 82px);overflow:auto}.writeoff-action-form{flex-wrap:wrap}}
@media(max-width:520px){.writeoff-reason-grid{grid-template-columns:1fr!important}.writeoff-line{grid-template-columns:1fr 1fr!important}.writeoff-line>.product-picker-ui{grid-column:1/-1}.writeoff-line select[name="warehouse_id[]"]{grid-column:1/-1}.writeoff-line input[name="qty[]"]{grid-column:1}.writeoff-line button{grid-column:2}.writeoff-card-actions,.writeoff-action-form{display:grid;grid-template-columns:1fr;width:100%}.writeoff-card-actions button,.writeoff-card-actions summary{width:100%;justify-content:center}.writeoff-edit{width:100%}}

/* Sales KPI and date filter */
.sales-period-panel{margin:0 0 12px;padding:11px 12px;border:1px solid #e3e8ef;border-radius:13px;background:#fff}
.sales-date-filter{display:flex;align-items:end;gap:12px;flex-wrap:wrap}
.sales-date-fields{display:flex;align-items:end;gap:8px}
.sales-date-fields>span{padding-bottom:11px;color:#9aa5b3}
.sales-date-fields label{display:flex;flex-direction:column;gap:5px;color:#6f8094;font-size:13px;font-weight:700}
.sales-date-fields input{min-width:150px;min-height:38px;border:1px solid #dce4ed;border-radius:9px;background:#fff;padding:7px 10px;color:#30465f}
.sales-period-presets{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.sales-period-presets button{min-height:32px;padding:5px 9px;border:0;background:transparent;color:#4f75b7;font-size:13px;font-weight:700;cursor:pointer}
.sales-period-presets button:hover{background:#f2f6fb;border-radius:7px}
.sales-date-apply{margin-left:auto;min-height:38px}
.sales-kpi-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin:0 0 14px}
.sales-kpi-grid article{display:flex;min-width:0;min-height:82px;flex-direction:column;justify-content:center;gap:4px;padding:13px 14px;border:1px solid #e3e8ef;border-radius:13px;background:#fff;box-shadow:0 2px 7px rgba(31,45,66,.035)}
.sales-kpi-grid span{color:#8793a2;font-size:13px;font-weight:800;letter-spacing:.055em;text-transform:uppercase}
.sales-kpi-grid strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#20344d;font-size:19px;line-height:1.08}
.sales-kpi-grid small{color:#8d99a8;font-size:13px}
.sales-kpi-grid article:nth-child(3) strong{color:#2f8c5b}
.sales-kpi-grid article:nth-child(4) strong{color:#b6672d}
.sales-kpi-grid article:nth-child(5) strong{color:#2f7b57}
.sales-kpi-grid strong.debt{color:#b65343!important}
.sales-kpi-grid strong.negative{color:#b65343!important}
@media(max-width:1220px){.sales-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:780px){.sales-date-filter{align-items:stretch}.sales-date-fields{width:100%}.sales-date-fields label{flex:1}.sales-date-fields input{min-width:0;width:100%}.sales-period-presets{width:100%}.sales-date-apply{margin-left:0;width:100%}.sales-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:460px){.sales-date-fields{display:grid;grid-template-columns:1fr auto 1fr;align-items:end}.sales-kpi-grid{grid-template-columns:1fr}}

/* Product availability filter */
.catalog-toolbar{display:block!important;padding:18px!important}
.catalog-search-row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.catalog-search-row>input,.catalog-search-row>select{height:42px;border:1px solid #dce3ec;border-radius:9px;padding:0 12px;background:#fff;color:#2c415b;font-size:14px;min-width:0}
.catalog-search-row>input{flex:2;min-width:220px}
.catalog-search-row>select{flex:1;min-width:170px;max-width:320px}
.catalog-search-row>label{display:flex;gap:8px;align-items:center;font-size:13px;color:#52647b;white-space:nowrap}
.catalog-availability{display:flex;align-items:center;gap:18px;margin-top:13px;padding:0 2px}
.catalog-availability label{display:inline-flex;align-items:center;gap:6px;color:#596c84;font-size:13px;cursor:pointer;white-space:nowrap}
.catalog-availability input{width:14px;height:14px;margin:0;accent-color:#2f75db}
.catalog-availability label.active{color:#245fc4;font-weight:700}
@media(max-width:760px){.catalog-search-row{display:grid;grid-template-columns:1fr}.catalog-search-row>input,.catalog-search-row>select{width:100%;max-width:none}.catalog-availability{gap:12px;overflow-x:auto;padding-bottom:2px}.catalog-availability label{font-size:13px}}

.supply-prev-cost{display:block;margin-top:4px;color:#7f8fa3;font-size:13px;font-weight:600}

/* Production migration */
.production-migration-page .page-head p{margin:5px 0 0;color:#7e8c9d;font-size:13px}
.production-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-bottom:14px}
.production-summary article{display:flex;min-width:0;min-height:84px;flex-direction:column;justify-content:center;gap:4px;padding:13px 14px;border:1px solid #e1e7ef;border-radius:12px;background:#fff}
.production-summary span{color:#8895a5;font-size:13px;font-weight:800;letter-spacing:.055em;text-transform:uppercase}
.production-summary strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#243b54;font-size:18px}
.production-summary strong.ok{color:#27744b}.production-summary strong.warning{color:#a56726}
.production-summary small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#929eac;font-size:13px}
.production-warning{display:flex;align-items:flex-start;gap:12px;padding:14px 16px!important;border-color:#f0d7ae!important;background:#fffaf1!important}
.production-warning-icon{display:grid;place-items:center;width:34px;height:34px;flex:0 0 34px;border-radius:9px;background:#fff0ce;color:#a56516;font-size:18px;font-weight:900}
.production-warning b{color:#6d4b1a}.production-warning p{margin:4px 0 0;color:#887051;font-size:13px;line-height:1.45}
.production-step{padding:0!important;overflow:hidden}
.production-step-head{display:grid;grid-template-columns:36px minmax(0,1fr) auto;gap:12px;align-items:center;padding:15px 17px;border-bottom:1px solid #e8edf3;background:#fbfcfd}
.production-step-head>span{display:grid;place-items:center;width:32px;height:32px;border-radius:9px;background:#eef3f8;color:#425d79;font-size:13px;font-weight:900}
.production-step-head h2{margin:0!important;color:#2f465f;font-size:15px!important}.production-step-head p{margin:3px 0 0;color:#8793a2;font-size:13px}
.production-state{display:inline-flex;align-items:center;justify-content:center;min-height:27px;padding:4px 9px;border-radius:999px;background:#f1f4f7;color:#68798c;font-size:13px;font-weight:800;white-space:nowrap}
.production-state.ok{background:#eaf7ef;color:#2a7049}.production-state.bad{background:#fff0ef;color:#a8493f}.production-state.pending{background:#fff5df;color:#98661f}
.production-checks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:14px 17px}
.production-check{display:flex;align-items:flex-start;gap:9px;padding:10px 11px;border:1px solid #e5eaf0;border-radius:9px;background:#fff}
.production-check>span{display:grid;place-items:center;width:22px;height:22px;flex:0 0 22px;border-radius:50%;font-size:13px;font-weight:900}
.production-check>div{display:flex;min-width:0;flex-direction:column;gap:2px}.production-check b{color:#40556d;font-size:13px}.production-check small{color:#8794a4;font-size:13px;line-height:1.35;overflow-wrap:anywhere}
.production-check.ok>span{background:#e8f7ee;color:#267249}.production-check.bad>span{background:#fff0ef;color:#ae4d42}.production-check.warn>span{background:#fff5df;color:#9b6820}
.production-backup-meta{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:14px 17px 0}
.production-backup-meta>div{display:flex;min-width:0;flex-direction:column;gap:3px;padding:10px;border:1px solid #e5eaf0;border-radius:9px;background:#fbfcfe}
.production-backup-meta span{color:#8a97a6;font-size:13px;text-transform:uppercase}.production-backup-meta b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#3d526a;font-size:13px}.production-backup-meta code{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#52657b;font-size:13px}
.production-actions,.production-confirm{display:flex;align-items:end;gap:10px;padding:14px 17px}
.production-confirm label{display:flex;min-width:280px;flex-direction:column;gap:6px;color:#6f7f92;font-size:13px}.production-confirm input,.production-rollback input{min-height:40px;border:1px solid #dce4ed;border-radius:8px;padding:8px 10px}
.production-confirm button:disabled,.production-confirm input:disabled{cursor:not-allowed;opacity:.5}
.production-pending{margin:14px 17px 0;padding:11px 12px;border:1px solid #e5eaf0;border-radius:9px;background:#fbfcfe}.production-pending summary{cursor:pointer;color:#52667e;font-size:13px;font-weight:800}.production-pending>div{display:flex;gap:6px;flex-wrap:wrap;margin-top:9px}.production-pending code{padding:4px 6px;border-radius:6px;background:#eef3f8;color:#4d6279;font-size:13px}
.production-all-current{margin:14px 17px 0;padding:11px 12px;border-radius:9px;background:#edf8f1;color:#2a7049;font-size:13px;font-weight:700}
.production-hint{margin:0;padding:0 17px 14px;color:#8c98a7;font-size:13px}.production-hint.danger{color:#a94c43}
.production-rollback{padding:14px 17px!important;border-color:#eed3d0!important}.production-rollback summary{cursor:pointer;color:#9a4e47;font-weight:800}.production-rollback p{color:#826b69;font-size:13px}.production-rollback form{display:flex;align-items:end;gap:10px}.production-rollback label{display:flex;flex-direction:column;gap:5px;color:#6f7f91;font-size:13px}.production-rollback .danger{border:1px solid #e0b9b5;background:#fff3f2;color:#a34840;border-radius:8px;padding:11px 14px;font-weight:750;cursor:pointer}
.production-done{margin:0 0 20px;padding:11px 13px;border-radius:9px;background:#edf8f1;color:#2b6f49;font-size:13px}
@media(max-width:1100px){.production-summary{grid-template-columns:repeat(3,minmax(0,1fr))}.production-checks{grid-template-columns:1fr}.production-backup-meta{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.production-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.production-step-head{grid-template-columns:34px minmax(0,1fr)}.production-step-head .production-state{grid-column:2;justify-self:start}.production-backup-meta{grid-template-columns:1fr}.production-confirm,.production-actions,.production-rollback form{display:grid;grid-template-columns:1fr}.production-confirm label{min-width:0}.production-confirm button,.production-actions button,.production-rollback button{width:100%}}
@media(max-width:440px){.production-summary{grid-template-columns:1fr}}

.production-import-form{display:grid;grid-template-columns:minmax(260px,1.2fr) minmax(220px,.8fr) auto;gap:12px;align-items:end;padding:14px 17px}
.production-import-form label{display:flex;flex-direction:column;gap:6px;color:#6f7f92;font-size:13px}
.production-import-form input[type="file"],.production-import-form input[type="text"],.production-import-form input:not([type]){min-height:40px;border:1px solid #dce4ed;border-radius:8px;background:#fff;padding:8px 10px;color:#364c65}
.production-import-form input[type="file"]{padding:7px}
.production-import-form button:disabled,.production-import-form input:disabled{cursor:not-allowed;opacity:.5}
.production-note{margin:0;padding:0 17px 14px;color:#8794a4;font-size:13px;line-height:1.45}
.production-actions a.outline{display:inline-flex;align-items:center;justify-content:center;min-height:40px;text-decoration:none}
@media(max-width:850px){.production-import-form{grid-template-columns:1fr 1fr}.production-import-form button{grid-column:1/-1}}
@media(max-width:650px){.production-import-form{grid-template-columns:1fr}.production-import-form button{grid-column:auto;width:100%}.production-actions a.outline{width:100%}}

/* 2026-09-19 — HugeProfit-inspired mobile UI v3
   One final mobile layer that replaces the conflicting legacy drawer/bottom-nav rules. */
.nav-icon svg,.bottom-icon svg,.mobile-top-menu svg,.bottom-menu-circle svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.drawer-close,.mobile-appbar{display:none}
.nav-section{display:block}
.nav-section-title{display:none}
.nav-icon{display:none}

@media(max-width:700px){
 :root{--mobile-blue:#2f8fd6;--mobile-green:#42c990;--mobile-red:#ef5573;--mobile-ink:#172238;--mobile-muted:#7f8b9d;--mobile-bg:#f4f6f9;--mobile-line:#e3e8ef}
 html{-webkit-text-size-adjust:100%;background:var(--mobile-bg);overflow-x:hidden}
 body{width:100%;max-width:100%;margin:0!important;padding:64px 0 calc(82px + env(safe-area-inset-bottom))!important;background:var(--mobile-bg)!important;overflow-x:hidden!important}
 body.menu-open{overflow:hidden!important}
 .shell{display:block!important;width:100%!important;max-width:100%!important;min-width:0!important}
 .content,.page,.page-embedded,.migration-workspace{width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important;overflow-x:hidden!important}
 img{max-width:100%;height:auto}
 input,select,textarea,button{min-width:0;max-width:100%}

 /* Compact top app bar, inspired by the reference without copying it. */
 .mobile-appbar{display:grid!important;grid-template-columns:38px minmax(0,1fr) minmax(0,1fr) 42px;gap:8px;align-items:center;position:fixed;z-index:1170;left:0;right:0;top:0;height:64px;padding:8px 12px;background:#fff;border-bottom:1px solid #dfe4eb;box-shadow:0 2px 10px rgba(21,34,57,.08)}
 .mobile-brand{display:grid;place-items:center;width:38px;height:38px;border-radius:10px;background:linear-gradient(145deg,#45b7f3,#207ac6);color:#fff;text-decoration:none;box-shadow:0 3px 10px rgba(38,142,214,.22)}
 .mobile-brand b{font-size:20px;font-style:italic;line-height:1}
 .mobile-quick{display:flex;align-items:center;justify-content:center;gap:4px;height:40px;border-radius:12px;font-size:13px;font-weight:800;text-decoration:none;white-space:nowrap;overflow:hidden}
 .mobile-quick span{font-size:17px;line-height:1}
 .mobile-quick-sale{background:#42c990;color:#fff}
 .mobile-quick-expense{background:#ffe7ed;color:#e94b6b}
 .mobile-top-menu{display:grid!important;place-items:center;width:42px;height:42px;border-radius:12px;color:#303944;cursor:pointer;-webkit-tap-highlight-color:transparent}
 .mobile-top-menu svg{width:25px;height:25px}

 /* Restored side drawer. */
 .mobile-menu-toggle{position:fixed!important;opacity:0!important;pointer-events:none!important;width:1px!important;height:1px!important}
 .mobile-menu-backdrop{display:block!important;visibility:hidden!important;opacity:0!important;pointer-events:none!important;position:fixed!important;z-index:1180!important;inset:0!important;background:rgba(16,25,39,.42)!important;backdrop-filter:blur(2px);transition:opacity .18s ease,visibility .18s ease!important}
 .sidebar{display:block!important;position:fixed!important;z-index:1190!important;left:0!important;top:0!important;bottom:0!important;right:auto!important;width:min(88vw,360px)!important;height:100dvh!important;max-height:none!important;padding:12px 12px calc(28px + env(safe-area-inset-bottom))!important;background:#f5f6f9!important;color:var(--mobile-ink)!important;border:0!important;border-right:1px solid #e2e7ee!important;box-shadow:18px 0 46px rgba(19,31,50,.18)!important;overflow-y:auto!important;overflow-x:hidden!important;transform:translateX(-104%)!important;transition:transform .2s ease!important}
 .mobile-menu-toggle:checked~.mobile-menu-backdrop{visibility:visible!important;opacity:1!important;pointer-events:auto!important}
 .mobile-menu-toggle:checked~.sidebar{transform:translateX(0)!important}
 .drawer-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:4px 4px 12px}
 .sidebar .logo{display:flex!important;align-items:center!important;gap:10px!important;margin:0!important;padding:0!important;color:var(--mobile-ink)!important}
 .sidebar .logo b{display:grid!important;place-items:center!important;width:42px!important;height:42px!important;border-radius:11px!important;background:linear-gradient(145deg,#45b7f3,#207ac6)!important;color:#fff!important;font-size:20px!important}
 .sidebar .logo span{display:inline!important;color:#172238!important;font-size:17px!important;font-weight:800!important}
 .drawer-close{display:grid!important;place-items:center;width:40px;height:40px;border-radius:12px;color:#4a5360;font-size:28px;line-height:1;cursor:pointer}
 .sidebar nav{display:block!important;width:100%!important;height:auto!important}
 .nav-section{display:block!important;margin:0 0 12px!important;padding:8px!important;border:1px solid #e7ebf1!important;border-radius:18px!important;background:#fff!important;box-shadow:0 4px 16px rgba(28,42,61,.045)!important}
 .nav-section-title{display:block!important;padding:8px 10px 5px!important;color:#9aa4b3!important;font-size:13px!important;font-weight:800!important;letter-spacing:.07em!important;text-transform:uppercase!important}
 .sidebar .nav-group{display:block!important}
 .sidebar .nav-group>a{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:12px!important;width:100%!important;height:50px!important;min-height:50px!important;padding:0 12px!important;border:0!important;border-radius:12px!important;background:transparent!important;color:#1c2533!important;font-size:15px!important;font-weight:650!important;text-align:left!important}
 .sidebar .nav-group>a:hover{background:#f4f7fa!important}
 .sidebar .nav-group>a.active{background:#eaf4fb!important;color:#287fbe!important;box-shadow:none!important}
 .nav-icon{display:grid!important;place-items:center!important;width:26px!important;min-width:26px!important;height:26px!important;color:inherit!important}
 .nav-icon svg{width:22px;height:22px}
 .nav-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .sidebar .nav-sub{display:none!important;margin:0 0 6px 38px!important;padding:2px 0 2px 8px!important;border-left:1px solid #e1e7ee!important}
 .sidebar .nav-group.active>.nav-sub,.sidebar .nav-group.open>.nav-sub{display:flex!important;flex-direction:column!important;gap:2px!important}
 .sidebar .nav-sub a{display:flex!important;align-items:center!important;min-height:36px!important;padding:7px 10px!important;border:0!important;border-radius:9px!important;background:transparent!important;color:#758195!important;font-size:13px!important}
 .sidebar .nav-sub a.active{background:#f1f6fa!important;color:#287fbe!important;font-weight:750!important}

 /* Attractive bottom bar with a centered menu control. */
 .mobile-bottom-nav{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;position:fixed!important;z-index:1160!important;left:0!important;right:0!important;bottom:0!important;height:76px!important;padding:6px 6px calc(6px + env(safe-area-inset-bottom))!important;background:rgba(255,255,255,.98)!important;border-top:1px solid #dde3ea!important;box-shadow:0 -5px 18px rgba(22,36,59,.08)!important;overflow:visible!important}
 .mobile-bottom-nav>a,.mobile-bottom-nav>label{display:flex!important;position:relative!important;align-items:center!important;justify-content:center!important;flex-direction:column!important;gap:3px!important;min-width:0!important;height:62px!important;padding:4px 2px!important;border-radius:12px!important;background:transparent!important;color:#111820!important;font-size:13px!important;font-weight:650!important;text-align:center!important;white-space:nowrap!important;cursor:pointer!important}
 .mobile-bottom-nav>a.active{background:transparent!important;color:var(--mobile-blue)!important;box-shadow:none!important}
 .mobile-bottom-nav>a.active:after{content:"";position:absolute;bottom:1px;width:22px;height:3px;border-radius:999px;background:var(--mobile-blue)}
 .bottom-icon{display:grid;place-items:center;height:28px}
 .bottom-icon svg{width:25px;height:25px;stroke-width:2}
 .mobile-more-button{display:flex!important;position:static!important;right:auto!important;bottom:auto!important;width:auto!important;height:62px!important;border:0!important;border-radius:12px!important;background:transparent!important;box-shadow:none!important;color:#111820!important;font-size:13px!important;font-weight:650!important}
 .bottom-menu-circle{display:grid;place-items:center;width:46px;height:46px;margin-top:-22px;border:4px solid #fff;border-radius:50%;background:#15191f;color:#fff;box-shadow:0 5px 14px rgba(14,20,29,.18)}
 .bottom-menu-circle svg{width:21px;height:21px}
 .mobile-more-button>span:last-child{margin-top:-1px}
 .mobile-menu-button{display:none!important}

 /* Remove duplicate in-page top bars on phones; the global app bar is authoritative. */
 body .migration-workspace .migration-topbar{display:none!important}
 body .migration-workspace .migration-page{padding:14px 12px 22px!important}
 body .migration-workspace .migration-heading{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;margin:0 0 12px!important}
 body .migration-workspace .migration-heading>div{min-width:0!important}
 body .migration-workspace .migration-heading p{display:none!important}
 body .migration-workspace .migration-heading h1{margin:0!important;font-size:21px!important;line-height:1.2!important;letter-spacing:-.35px!important}
 body .migration-workspace .migration-heading>div>span{display:none!important}
 body .migration-workspace .migration-heading .primary{width:auto!important;min-height:40px!important;padding:9px 13px!important;border-radius:12px!important;white-space:nowrap!important}
 .page-embedded{padding:14px 12px 22px!important}
 .page-embedded .page-head{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;min-height:42px!important;margin:0 0 12px!important;padding:0!important}
 .page-embedded .page-head>div>a:first-child{display:none!important}
 .page-embedded .page-head h1{margin:0!important;font-size:21px!important;line-height:1.2!important}
 .page-embedded .page-head .primary{width:auto!important;min-height:40px!important;padding:9px 12px!important;border-radius:12px!important;white-space:nowrap!important}
 .sales-head-actions{display:flex!important;gap:7px!important;align-items:center!important}
 .sales-head-actions .outline{display:none!important}

 /* KPI cards: 2 columns like the reference, with a full-width final card where needed. */
 .catalog-metrics{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;margin:0 0 12px!important}
 .catalog-metrics article{min-width:0!important;min-height:88px!important;padding:13px 14px!important;border-radius:16px!important;background:#fff!important;border:1px solid #e2e7ed!important;box-shadow:0 2px 7px rgba(27,42,62,.045)!important}
 .catalog-metrics article:nth-child(5){grid-column:1/-1!important}
 .catalog-metrics span{font-size:13px!important}
 .catalog-metrics strong{font-size:20px!important;white-space:normal!important;overflow-wrap:anywhere!important}
 .catalog-metrics small{font-size:13px!important}
 body .migration-workspace .migration-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
 body .migration-workspace .migration-metrics .metric{padding:14px!important;border-radius:16px!important;min-width:0!important}
 body .migration-workspace .migration-metrics .metric strong{font-size:21px!important;white-space:normal!important;overflow-wrap:anywhere!important}

 /* Products: stable toolbar and card list. */
 .migration-workspace .sales-tabs{width:100%!important;margin:0 0 10px!important;padding:0!important;gap:7px!important;overflow-x:auto!important;scrollbar-width:none}
 .migration-workspace .sales-tabs::-webkit-scrollbar{display:none}
 .migration-workspace .sales-tabs a{min-height:38px!important;padding:8px 12px!important;border-radius:999px!important;white-space:nowrap!important}
 .migration-workspace .sales-tabs a.active{background:var(--mobile-blue)!important;border-color:var(--mobile-blue)!important;color:#fff!important}
 .catalog-panel{overflow:visible!important;border:0!important;background:transparent!important;box-shadow:none!important}
 .catalog-toolbar{display:block!important;margin:0 0 8px!important;padding:10px!important;border:1px solid #e1e6ed!important;border-radius:16px!important;background:#fff!important}
 .catalog-search-row{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}
 .catalog-search-row>input{grid-column:1/-1!important}
 .catalog-search-row>input,.catalog-search-row>select{width:100%!important;max-width:none!important;min-width:0!important;height:42px!important;border-radius:12px!important;font-size:13px!important}
 .catalog-search-row>label{grid-column:1/-1!important;min-height:34px!important;padding:0 2px!important;white-space:normal!important}
 .catalog-availability{display:flex!important;gap:7px!important;margin:9px 0 0!important;padding:0!important;overflow-x:auto!important;scrollbar-width:none!important}
 .catalog-availability::-webkit-scrollbar{display:none}
 .catalog-availability label{flex:0 0 auto!important;min-height:34px!important;padding:7px 11px!important;border:1px solid #dce3ea!important;border-radius:999px!important;background:#fff!important;font-size:13px!important}
 .catalog-availability label.active{border-color:#6caee0!important;background:#eff7fd!important;color:#277ebf!important}
 .catalog-availability input{display:none!important}
 .catalog-pagination{display:flex!important;justify-content:center!important;align-items:center!important;gap:7px!important;margin:0 0 8px!important;padding:6px 4px!important;border:0!important;background:transparent!important;font-size:13px!important}
 .catalog-pagination>span:first-child{margin:0 6px 0 0!important;font-size:13px!important}
 .catalog-pagination .outline{min-width:34px!important;height:34px!important;padding:6px 9px!important;border-radius:999px!important;text-align:center!important}
 .catalog-rows{display:block!important;border:0!important}
 .catalog-row{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px!important;margin:0 0 10px!important;padding:13px!important;border:1px solid #e4e9ef!important;border-radius:17px!important;background:#fff!important;box-shadow:0 3px 10px rgba(25,39,59,.045)!important;overflow:hidden!important}
 .catalog-product{display:grid!important;grid-template-columns:68px minmax(0,1fr)!important;gap:12px!important;align-items:center!important;min-width:0!important}
 .catalog-product .product-photo{width:68px!important;height:68px!important;border-radius:13px!important;background:#f8fafc!important}
 .catalog-product .product-photo img{width:100%!important;height:100%!important;object-fit:contain!important}
 .catalog-product>span:last-child{display:block!important;min-width:0!important}
 .catalog-product b{display:block!important;color:#2f85c5!important;font-size:15px!important;line-height:1.28!important;overflow-wrap:anywhere!important}
 .catalog-product small{display:block!important;margin-top:5px!important;color:#7d8794!important;font-size:13px!important;line-height:1.35!important;overflow-wrap:anywhere!important}
 .catalog-prices{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;order:2!important}
 .catalog-prices span{display:flex!important;min-width:0!important;min-height:52px!important;flex-direction:column!important;justify-content:center!important;gap:3px!important;padding:7px 8px!important;border-radius:11px!important;background:#f7f8fb!important;color:#8a94a3!important;font-size:13px!important}
 .catalog-prices b{margin:0!important;color:#25374f!important;font-size:13px!important;overflow-wrap:anywhere!important}
 .catalog-prices span:nth-child(2) b{color:#31b978!important;font-size:14px!important}
 .catalog-row .row-actions{display:grid!important;grid-template-columns:minmax(0,1fr) 38px 38px 38px!important;gap:7px!important;align-items:center!important;order:3!important}
 .catalog-row .row-actions form{width:38px!important;margin:0!important}
 .catalog-row .row-actions form button,.catalog-row .icon-button{width:38px!important;height:38px!important;border-radius:11px!important}
 .catalog-sell{display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;min-height:38px!important;margin:0!important;border-radius:11px!important}
 .catalog-form-panel,.product-sheet{border-radius:17px!important;box-shadow:0 3px 10px rgba(25,39,59,.045)!important}
 .product-sheet{padding:0 13px 15px!important}
 .product-sheet-header{padding:14px 0 6px!important}
 .product-sheet-header h2{font-size:18px!important;line-height:1.35!important}
 .product-sheet .product-detail-body{padding:6px 0 0!important}
 .compact-product-details>.editor-tabs{overflow-x:auto!important;grid-template-columns:repeat(4,minmax(82px,1fr))!important;scrollbar-width:none}
 .compact-product-details>.editor-tabs::-webkit-scrollbar{display:none}
 .compact-product-details .gallery-main{height:190px!important;border-radius:14px!important;background:#fafbfc!important}
 .compact-product-details .product-detail-stats{gap:8px!important;padding:9px!important}
 .compact-product-details .product-detail-stats>div{min-width:0;padding:9px;border-radius:11px;background:#fff}
 .compact-product-details .product-detail-stats b{font-size:17px!important;overflow-wrap:anywhere!important}
 .compact-product-details .compact-details>div{align-items:flex-start!important}
 .compact-product-details .compact-details dd{max-width:60%;overflow-wrap:anywhere!important}
 .compact-product-details .detail-actions{grid-template-columns:1fr 1fr!important;gap:8px!important}
 .product-edit-dialog{padding-left:12px!important;padding-right:12px!important}
 .product-editor .editor-tabs{border-radius:12px!important}
 .category-entry{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important}
 .category-add-button{padding-left:9px!important;padding-right:9px!important}

 /* Sales filters and KPI area. */
 .sales-period-panel{margin:0 0 10px!important;padding:9px!important;border-radius:16px!important}
 .sales-date-filter{display:block!important}
 .sales-date-fields{display:grid!important;grid-template-columns:minmax(0,1fr) 10px minmax(0,1fr)!important;gap:5px!important;width:100%!important}
 .sales-date-fields>span{padding:0 0 11px!important;text-align:center!important}
 .sales-date-fields label{min-width:0!important}
 .sales-date-fields input{width:100%!important;min-width:0!important;height:39px!important;border-radius:11px!important;font-size:13px!important}
 .sales-period-presets{display:flex!important;width:100%!important;gap:5px!important;margin-top:7px!important;overflow-x:auto!important;flex-wrap:nowrap!important;scrollbar-width:none!important}
 .sales-period-presets::-webkit-scrollbar{display:none}
 .sales-period-presets button{flex:0 0 auto!important;min-height:32px!important;padding:5px 9px!important;border:1px solid #6cace0!important;border-radius:9px!important;background:#fff!important;color:#2e83c3!important;font-size:13px!important}
 .sales-date-apply{width:100%!important;margin:7px 0 0!important;min-height:38px!important;border-radius:11px!important}
 .sales-kpi-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important;margin:0 0 10px!important}
 .sales-kpi-grid article{min-width:0!important;min-height:86px!important;padding:12px 13px!important;border-radius:16px!important}
 .sales-kpi-grid strong{white-space:normal!important;font-size:18px!important;overflow-wrap:anywhere!important}
 .sales-kpi-grid span,.sales-kpi-grid small{font-size:13px!important}
 .sales-list-panel{overflow:visible!important;border:0!important;background:transparent!important;box-shadow:none!important}
 .sales-filter-bar{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;margin:0 0 10px!important;padding:10px!important;border:1px solid #e2e7ed!important;border-radius:16px!important;background:#fff!important}
 .sales-filter-bar>label:first-of-type{grid-column:1/-1!important}
 .sales-filter-bar label{min-width:0!important;font-size:13px!important}
 .sales-filter-bar input,.sales-filter-bar select{width:100%!important;min-width:0!important;height:39px!important;border-radius:11px!important;font-size:13px!important}
 .sales-filter-actions{grid-column:1/-1!important;display:flex!important;gap:7px!important}
 .sales-filter-actions>*{flex:1!important;min-height:38px!important;border-radius:11px!important}

 /* Sales table becomes real mobile cards instead of a squeezed desktop table. */
 .sales-list-panel .table-wrap{overflow:visible!important;width:100%!important}
 .sales-list-panel table,.sales-list-panel tbody{display:block!important;width:100%!important;min-width:0!important}
 .sales-list-panel thead{display:none!important}
 .sales-list-panel tbody tr{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:5px 10px!important;width:100%!important;margin:0 0 10px!important;padding:13px 13px 12px!important;border:1px solid #e3e8ef!important;border-radius:17px!important;background:#fff!important;box-shadow:0 3px 10px rgba(24,38,58,.045)!important;overflow:hidden!important}
 .sales-list-panel tbody td{display:block!important;min-width:0!important;padding:0!important;border:0!important;background:transparent!important;color:#4b5c73!important;font-size:13px!important;white-space:normal!important;overflow-wrap:anywhere!important}
 .sale-number-cell{grid-column:1!important;grid-row:1!important;align-self:center!important}
 .sale-number-cell b{color:#2e83c3!important;font-size:15px!important}
 .sale-status-cell{grid-column:2!important;grid-row:1!important;align-self:center!important;min-width:104px!important;padding:7px 11px!important;border-radius:10px!important;background:#55dfa7!important;color:#173c2e!important;text-align:center!important;font-size:13px!important;font-weight:750!important}
 .sale-date-cell{grid-column:1/-1!important;grid-row:2!important;color:#8490a2!important;font-size:13px!important}
 .sale-customer-cell{grid-column:1/-1!important;grid-row:3!important;font-weight:700!important;color:#344961!important}
 .sale-fulfilment-cell-wrap{grid-column:1/-1!important;grid-row:4!important}
 .sale-fulfilment-cell{flex-direction:row!important;flex-wrap:wrap!important;gap:6px!important;align-items:center!important}
 .np-ttn-cell{grid-column:1/-1!important}
 .sale-payment-cell{grid-column:1/-1!important;margin-top:3px!important;padding:9px!important;border-radius:12px!important;background:#f7f8fb!important}
 .sale-payment-state{min-width:0!important}
 .sale-payment-state small,.sale-payment-state strong{overflow-wrap:anywhere!important}
 .sale-total-cell{grid-column:1/-1!important;padding-top:5px!important}
 .sale-total-cell b{color:#1f2f45!important;font-size:20px!important}
 .doc-actions{grid-column:1/-1!important;margin-top:3px!important;padding-top:9px!important;border-top:1px solid #edf0f4!important}
 .sale-actions{display:flex!important;gap:6px!important;overflow-x:auto!important;scrollbar-width:none!important;padding-bottom:2px!important}
 .sale-actions::-webkit-scrollbar{display:none}
 .sale-actions>*{flex:0 0 auto!important}
 .np-ttn-card{max-width:100%!important;overflow:hidden!important}
 .np-ttn-line{min-width:0!important}
 .np-ttn-line b{overflow-wrap:anywhere!important}

 /* General mobile anti-overflow safeguards. */
 .panel,.search,.settings-tabs,.document-section,.editor{max-width:100%!important}
 .form-grid,.compact-fields{min-width:0!important}
 .form-grid>*{min-width:0!important}
 .table-wrap{max-width:100%}
 .muted,.subtext,p,small,dd,td,th{overflow-wrap:anywhere}
}

@media(max-width:390px){
 .mobile-appbar{grid-template-columns:36px minmax(0,1fr) minmax(0,1fr) 38px;gap:5px;padding-left:8px;padding-right:8px}
 .mobile-brand{width:36px;height:36px}
 .mobile-quick{height:38px;font-size:13px;padding:0 5px}
 .mobile-top-menu{width:38px;height:38px}
 .catalog-search-row{grid-template-columns:1fr!important}
 .catalog-search-row>select{grid-column:1!important}
 .catalog-prices{gap:4px!important}
 .catalog-prices span{padding:6px!important}
 .catalog-row .row-actions{grid-template-columns:minmax(0,1fr) 36px 36px 36px!important}
 .sales-filter-bar{grid-template-columns:1fr!important}
 .sales-filter-bar>label{grid-column:1!important}
 .sales-filter-actions{grid-column:1!important}
}

/* 2026-09-19 — mobile UI v4 compact cleanup */
@media(max-width:700px){
 body{padding-top:54px!important;padding-bottom:calc(70px + env(safe-area-inset-bottom))!important}

 /* Header and footer density closer to the mobile reference. */
 .mobile-appbar{
  height:54px!important;
  grid-template-columns:34px minmax(0,1fr) minmax(0,1fr) 36px!important;
  gap:6px!important;
  padding:6px 10px!important
 }
 .mobile-brand{width:34px!important;height:34px!important;border-radius:9px!important}
 .mobile-brand b{font-size:18px!important}
 .mobile-quick{height:36px!important;border-radius:11px!important;font-size:13px!important}
 .mobile-quick span{font-size:15px!important}
 .mobile-top-menu{width:36px!important;height:36px!important;border-radius:10px!important}
 .mobile-top-menu svg{width:22px!important;height:22px!important}

 .mobile-bottom-nav{
  height:66px!important;
  padding:5px 5px calc(5px + env(safe-area-inset-bottom))!important
 }
 .mobile-bottom-nav>a,.mobile-bottom-nav>label{
  height:54px!important;
  gap:2px!important;
  padding:3px 2px!important;
  font-size:13px!important
 }
 .bottom-icon{height:24px!important}
 .bottom-icon svg{width:22px!important;height:22px!important}
 .bottom-menu-circle{
  width:42px!important;
  height:42px!important;
  margin-top:-19px!important;
  border-width:3px!important
 }
 .bottom-menu-circle svg{width:19px!important;height:19px!important}

 /* The fixed app bar must never collide with a page heading/action. */
 .page-embedded,.migration-page{padding-top:12px!important}
 .page-embedded .page-head{
  width:100%!important;
  min-width:0!important;
  align-items:center!important
 }
 .page-embedded .page-head>div{min-width:0!important}
 .page-embedded .page-head h1{
  min-width:0!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important
 }
 .page-embedded .page-head .primary{flex:0 0 auto!important}
 .sales-head-actions{min-width:0!important}
}

@media(max-width:520px){
 .page-embedded .page-head,
 body .migration-workspace .migration-heading{
  display:grid!important;
  grid-template-columns:1fr!important;
  align-items:stretch!important;
  gap:8px!important
 }
 .page-embedded .page-head .primary,
 body .migration-workspace .migration-heading .primary,
 .sales-head-actions .primary{
  width:100%!important;
  min-height:38px!important;
  justify-content:center!important
 }
 .sales-head-actions{display:grid!important;grid-template-columns:1fr!important;width:100%!important}
}

/* Compact customer list: independent cards instead of one stretched desktop panel. */
@media(max-width:700px){
 .customer-list-panel{
  padding:0!important;
  margin:0 0 12px!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  overflow:visible!important
 }
 .customer-list-panel .customer-row{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:10px!important;
  margin:0 0 9px!important;
  padding:13px 14px!important;
  border:1px solid #e3e8ef!important;
  border-radius:15px!important;
  background:#fff!important;
  box-shadow:0 2px 8px rgba(25,39,59,.04)!important
 }
 .customer-row>div:first-child b{font-size:15px!important;line-height:1.25!important}
 .customer-row>div:first-child p{margin:3px 0 0!important;font-size:13px!important;line-height:1.3!important}
 .customer-row>div:first-child small{margin-top:4px!important;font-size:13px!important;line-height:1.3!important}
 .customer-loyalty-stats{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:6px!important
 }
 .customer-loyalty-stats>div{
  min-width:0!important;
  padding:8px!important;
  border-radius:10px!important;
  background:#f7f8fb!important
 }
 .customer-loyalty-stats dt{
  margin:0 0 3px!important;
  color:#8793a3!important;
  font-size:13px!important;
  line-height:1.2!important
 }
 .customer-loyalty-stats dd{
  font-size:13px!important;
  line-height:1.25!important
 }
 .customer-row>.outline{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  min-height:36px!important;
  padding:7px 10px!important;
  border-radius:10px!important;
  font-size:13px!important
 }
 .customer-bonus-history{font-size:13px!important}
 .page-embedded>.sales-tabs{margin-bottom:9px!important}
 .page-embedded>.search{
  gap:7px!important;
  margin-bottom:10px!important;
  padding:9px!important;
  border-radius:14px!important
 }
 .page-embedded>.search input,
 .page-embedded>.search button{
  min-height:38px!important;
  font-size:13px!important
 }
}

/* Finance: keep the summary dense and render expenses as mobile cards. */
@media(max-width:700px){
 .period-row{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
  margin-bottom:10px!important
 }
 .period-row select{min-height:36px!important;max-width:190px!important;font-size:13px!important}
 .finance-payment-metrics{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:8px!important;
  margin-bottom:10px!important
 }
 .finance-payment-metrics article{
  min-height:82px!important;
  padding:12px!important;
  border-radius:14px!important
 }
 .finance-payment-metrics span{font-size:13px!important;margin-bottom:5px!important}
 .finance-payment-metrics strong{font-size:18px!important;line-height:1.1!important}
 .finance-payment-metrics p{margin:5px 0 0!important;font-size:13px!important;line-height:1.25!important}
 .finance-payment-metrics article.featured{grid-column:1/-1!important}

 .finance-chart{margin-bottom:10px!important;border-radius:15px!important}
 .finance-chart .panel-head{padding:13px 14px!important}
 .finance-chart .panel-head h2{margin:0!important;font-size:16px!important}
 .finance-bars{padding:10px 12px!important}
 .finance-bar-row{
  grid-template-columns:48px minmax(0,1fr)!important;
  gap:6px!important;
  margin:7px 0!important
 }
 .finance-bar-row>span{grid-row:1/3!important;font-size:13px!important}
 .finance-bar-row>div{
  grid-column:2!important;
  height:27px!important;
  border-radius:8px!important
 }
 .finance-bar-row small{
  padding:0 7px!important;
  font-size:13px!important;
  white-space:nowrap!important
 }
 .mobile-finance-note{
  margin:0 2px 10px!important;
  padding:0!important
 }
 .mobile-finance-note p{
  margin:0!important;
  color:#526278!important;
  font-size:13px!important;
  line-height:1.45!important
 }

 .finance-expense-panel{
  padding:0!important;
  margin-bottom:10px!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  overflow:visible!important
 }
 .finance-expense-panel>.panel-head{
  padding:11px 3px!important;
  border:0!important;
  background:transparent!important
 }
 .finance-expense-panel>.panel-head h2{margin:0!important;font-size:17px!important}
 .finance-expense-panel>.panel-head .muted{font-size:13px!important}
 .finance-expense-wrap{margin:0!important;overflow:visible!important}
 .finance-expense-table,
 .finance-expense-table tbody{display:block!important;width:100%!important;min-width:0!important}
 .finance-expense-table thead{display:none!important}
 .finance-expense-table tr{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  gap:5px 10px!important;
  width:100%!important;
  margin:0 0 8px!important;
  padding:12px 13px!important;
  border:1px solid #e3e8ef!important;
  border-radius:14px!important;
  background:#fff!important;
  box-shadow:0 2px 8px rgba(25,39,59,.04)!important
 }
 .finance-expense-table td{
  display:block!important;
  min-width:0!important;
  padding:0!important;
  border:0!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important
 }
 .finance-expense-date{
  grid-column:1!important;
  grid-row:1!important;
  color:#8490a2!important;
  font-size:13px!important
 }
 .finance-expense-amount{
  grid-column:2!important;
  grid-row:1/3!important;
  align-self:center!important;
  text-align:right!important
 }
 .finance-expense-amount b{font-size:15px!important;color:#1f3048!important}
 .finance-expense-purpose{
  grid-column:1!important;
  grid-row:2!important;
  color:#2d415a!important;
  font-size:13px!important;
  font-weight:750!important
 }
 .finance-expense-payment{
  grid-column:1!important;
  grid-row:3!important;
  color:#607189!important;
  font-size:13px!important
 }
 .finance-expense-note{
  grid-column:1/-1!important;
  grid-row:4!important;
  color:#8793a3!important;
  font-size:13px!important
 }
}

/* Keep sales header/buttons from colliding and tighten the filter/KPI stack. */
@media(max-width:520px){
 .sales-period-panel{padding:8px!important}
 .sales-kpi-grid{gap:7px!important}
 .sales-kpi-grid article{min-height:76px!important;padding:10px 11px!important}
 .sales-kpi-grid strong{font-size:16px!important}
 .sales-filter-bar{padding:8px!important}
}

/* Small devices need compact filters instead of forced wide rows. */
@media(max-width:390px){
 .customer-loyalty-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .customer-loyalty-stats>div:last-child{grid-column:1/-1!important}
 .finance-payment-metrics article{min-height:76px!important}
}

/* 2026-09-19 — mobile emergency fix v5
   Final anti-overflow layer: the desktop sidebar never reserves width on phones. */
@media(max-width:700px){
 html,body{
  width:100%!important;
  max-width:100%!important;
  overflow-x:hidden!important
 }
 body{
  padding-top:54px!important;
  padding-bottom:calc(74px + env(safe-area-inset-bottom))!important;
  background:#f4f6f9!important
 }

 .shell{
  display:block!important;
  grid-template-columns:1fr!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin:0!important;
  overflow-x:hidden!important
 }

 /* Drawer is completely removed from document flow while closed. */
 .sidebar{
  display:block!important;
  position:fixed!important;
  z-index:1200!important;
  top:0!important;
  left:0!important;
  right:auto!important;
  bottom:0!important;
  width:min(86vw,340px)!important;
  min-width:0!important;
  height:100dvh!important;
  max-height:none!important;
  margin:0!important;
  padding:12px 12px calc(28px + env(safe-area-inset-bottom))!important;
  transform:translate3d(-110%,0,0)!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  border:0!important;
  border-right:1px solid #e1e7ef!important;
  background:#f5f6f9!important;
  box-shadow:18px 0 40px rgba(20,30,45,.18)!important;
  transition:transform .2s ease!important;
  contain:layout paint
 }
 .mobile-menu-toggle:checked~.sidebar,
 body.menu-open .sidebar{transform:translate3d(0,0,0)!important}

 .content,
 .page,
 .page-embedded,
 .migration-workspace,
 .migration-page{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin:0!important;
  overflow-x:hidden!important
 }
 .content{padding-left:0!important;padding-right:0!important}
 .page-embedded,.migration-page{padding:12px!important}

 .panel,.editor,.search,.stats,.metrics,
 .settings-layout,.settings-card,.organizations-panel,
 .catalog-panel,.catalog-form-panel,.product-sheet,
 .document-section{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important
 }

 /* Page title/action can never overlap or be hidden under the app bar. */
 .page-embedded .page-head,
 body .migration-workspace .migration-heading{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  width:100%!important;
  min-width:0!important;
  min-height:0!important;
  gap:8px!important;
  align-items:stretch!important;
  margin:0 0 12px!important;
  padding:0!important
 }
 .page-embedded .page-head>div,
 body .migration-workspace .migration-heading>div{min-width:0!important}
 .page-embedded .page-head h1,
 body .migration-workspace .migration-heading h1{
  margin:0!important;
  min-width:0!important;
  font-size:20px!important;
  line-height:1.2!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important
 }
 .page-embedded .page-head .primary,
 body .migration-workspace .migration-heading .primary,
 .sales-head-actions .primary{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  max-width:100%!important;
  min-height:40px!important;
  padding:9px 12px!important;
  white-space:normal!important
 }
 .sales-head-actions{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  width:100%!important;
  min-width:0!important
 }

 /* Tabs are one-line horizontal strips instead of squeezed columns. */
 .settings-tabs,
 .editor-tabs,
 .sales-tabs,
 .product-kind-tabs{
  display:flex!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  flex-wrap:nowrap!important;
  gap:0!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  -webkit-overflow-scrolling:touch!important;
  scrollbar-width:none!important
 }
 .settings-tabs::-webkit-scrollbar,
 .editor-tabs::-webkit-scrollbar,
 .sales-tabs::-webkit-scrollbar,
 .product-kind-tabs::-webkit-scrollbar{display:none!important}
 .settings-tabs>a,
 .sales-tabs>a,
 .editor-tabs>button,
 .product-kind-tabs>button{
  flex:0 0 auto!important;
  min-width:128px!important;
  width:auto!important;
  max-width:none!important;
  white-space:nowrap!important
 }

 /* Sales date controls: never clip the last preset. */
 .sales-date-fields{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:7px!important;
  width:100%!important
 }
 .sales-date-fields>span{display:none!important}
 .sales-date-fields label{width:100%!important;min-width:0!important}
 .sales-date-fields input{width:100%!important;min-width:0!important}
 .sales-period-presets{
  display:flex!important;
  width:100%!important;
  max-width:100%!important;
  flex-wrap:nowrap!important;
  gap:6px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  padding-bottom:2px!important;
  -webkit-overflow-scrolling:touch!important;
  scrollbar-width:none!important
 }
 .sales-period-presets::-webkit-scrollbar{display:none!important}
 .sales-period-presets button{
  flex:0 0 auto!important;
  width:auto!important;
  min-width:max-content!important;
  max-width:none!important;
  white-space:nowrap!important
 }

 /* Forms and editors must use the viewport, not old desktop minimums. */
 .search,.form-grid,.compact-fields,.product-editor,.stock-editor,
 .category-entry,.reference-row,.brand-row,.warehouse-row{
  min-width:0!important;
  max-width:100%!important
 }
 .form-grid>*,
 .compact-fields>*{min-width:0!important}
 input,select,textarea{max-width:100%!important;min-width:0!important}
 .search{grid-template-columns:minmax(0,1fr)!important}

 .product-edit-dialog,
 .product-sheet,
 .product-editor,
 .catalog-form-panel,
 .hugeprofit-page>.panel.editor{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin-left:0!important;
  margin-right:0!important
 }
 .product-editor .editor-tabs,
 .hugeprofit-page .editor-tabs{
  display:flex!important;
  flex-wrap:nowrap!important;
  width:100%!important;
  overflow-x:auto!important
 }
 .product-editor .editor-tabs>button,
 .hugeprofit-page .editor-tabs>button{
  flex:0 0 auto!important;
  min-width:116px!important;
  width:auto!important
 }

 /* Reference/category rows: use full card width, no phantom sidebar column. */
 .reference-layout,
 .reference-list,
 .category-list,
 .dictionary-list{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important
 }
 .reference-row,
 .category-row,
 .dictionary-row{
  max-width:100%!important;
  min-width:0!important
 }

 .table-wrap{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important
 }
}

@media(max-width:420px){
 .settings-tabs>a,
 .sales-tabs>a,
 .editor-tabs>button,
 .product-kind-tabs>button{min-width:116px!important}
 .page-embedded .page-head h1,
 body .migration-workspace .migration-heading h1{font-size:18px!important}
 .mobile-quick{font-size:13px!important}
}

/* 2026-09-19 — mobile geometry v5 */
@media(max-width:700px){
  html,body{
    width:100%!important;
    max-width:100%!important;
    overflow-x:hidden!important
  }
  body{
    padding-top:54px!important;
    padding-bottom:calc(70px + env(safe-area-inset-bottom))!important
  }

  /* Kill every remaining desktop column/width constraint on phones. */
  .shell{
    display:block!important;
    grid-template-columns:1fr!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important
  }
  .shell>.content,
  .content,
  .migration-workspace{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
    overflow-x:hidden!important
  }
  .shell>.content>.page,
  .shell>.content>.page.page-embedded,
  .page,
  .page-embedded,
  .migration-page{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:12px!important;
    box-sizing:border-box!important;
    overflow-x:hidden!important
  }

  /* Drawer is completely outside document flow. */
  .sidebar{
    display:block!important;
    position:fixed!important;
    z-index:1190!important;
    top:0!important;
    bottom:0!important;
    left:0!important;
    right:auto!important;
    width:min(88vw,350px)!important;
    height:100dvh!important;
    max-height:none!important;
    margin:0!important;
    padding:12px 12px calc(24px + env(safe-area-inset-bottom))!important;
    transform:translateX(-105%)!important;
    overflow-y:auto!important;
    overflow-x:hidden!important
  }
  .mobile-menu-toggle:checked~.sidebar{transform:translateX(0)!important}

  /* Generic anti-overflow rules. */
  .panel,.editor,.search,.stats,.metrics,.settings-layout,.settings-card,
  .organizations-panel,.catalog-panel,.catalog-form-panel,.product-sheet,
  .product-editor,.editor-page,.product-editor-page,.stock-editor,
  .stock-table-wrap,.table-wrap,.directory-panel,.directory-section,
  .supplier-manager,.finance-chart,.sales-list-panel{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important
  }
  input,select,textarea,button{
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important
  }

  /* Page headers cannot collide with actions. */
  .page-embedded>.page-head,
  .page-embedded>header,
  .migration-heading{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:8px!important;
    align-items:stretch!important;
    width:100%!important;
    min-width:0!important;
    min-height:0!important;
    margin:0 0 10px!important;
    padding:0!important
  }
  .page-embedded>.page-head>div,
  .page-embedded>header>div,
  .migration-heading>div{min-width:0!important}
  .page-embedded>.page-head h1,
  .page-embedded>header h1,
  .migration-heading h1{
    margin:0!important;
    font-size:20px!important;
    line-height:1.2!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important
  }
  .page-embedded>header small{font-size:13px!important}
  .page-embedded>.page-head .primary,
  .page-embedded>header .ghost,
  .migration-heading .primary,
  .sales-head-actions .primary{
    width:100%!important;
    min-height:38px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    white-space:normal!important
  }

  /* Settings tabs: one clean horizontal scroller instead of cropped labels. */
  .settings-tabs{
    display:flex!important;
    flex-wrap:nowrap!important;
    gap:6px!important;
    width:100%!important;
    max-width:100%!important;
    margin:0 0 10px!important;
    padding:5px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    -webkit-overflow-scrolling:touch!important;
    scrollbar-width:none!important;
    scroll-snap-type:x proximity
  }
  .settings-tabs::-webkit-scrollbar{display:none!important}
  .settings-tabs a{
    flex:0 0 auto!important;
    min-width:118px!important;
    min-height:38px!important;
    padding:8px 10px!important;
    border-radius:9px!important;
    font-size:13px!important;
    line-height:1.15!important;
    justify-content:center!important;
    text-align:center!important;
    scroll-snap-align:start
  }

  /* Directory page: compact horizontal section tabs and stable full-width rows. */
  #directory.directory-panel{
    padding:0!important;
    border-radius:15px!important;
    overflow:hidden!important
  }
  #directory .directory-title{
    padding:16px 14px 14px!important;
    gap:5px!important
  }
  #directory .directory-title .directory-book-icon{
    width:36px!important;
    height:36px!important;
    border-radius:10px!important;
    font-size:16px!important
  }
  #directory .directory-title h2{font-size:19px!important}
  #directory .directory-title p{font-size:13px!important;line-height:1.35!important}

  #directory .directory-tabs{
    display:flex!important;
    grid-template-columns:none!important;
    flex-wrap:nowrap!important;
    gap:6px!important;
    width:100%!important;
    padding:8px 10px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    scrollbar-width:none!important;
    -webkit-overflow-scrolling:touch!important
  }
  #directory .directory-tabs::-webkit-scrollbar{display:none!important}
  #directory .directory-tabs a{
    flex:0 0 auto!important;
    min-width:auto!important;
    min-height:36px!important;
    padding:7px 10px!important;
    border-radius:10px!important;
    font-size:13px!important;
    white-space:nowrap!important
  }
  #directory .directory-tabs a span{
    min-width:20px!important;
    height:20px!important;
    padding:0 5px!important;
    font-size:13px!important
  }
  #directory .directory-section-active{padding:10px!important}
  .directory-tools,.supplier-toolbar{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:7px!important;
    padding:8px!important;
    margin:0 0 8px!important;
    border-radius:12px!important
  }
  .directory-tools input,.supplier-toolbar input,
  .directory-tools .primary,.supplier-toolbar .primary{
    width:100%!important;
    min-height:38px!important;
    padding:8px 10px!important
  }

  .directory-list,.category-tree{
    width:100%!important;
    min-width:0!important;
    overflow:hidden!important;
    border-radius:12px!important
  }
  .category-tree-row{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto auto!important;
    gap:7px!important;
    align-items:center!important;
    width:100%!important;
    min-width:0!important;
    min-height:54px!important;
    margin:0!important;
    padding:8px 8px 8px calc(8px + min(var(--category-depth,0),3) * 8px)!important;
    border-left:0!important;
    overflow:hidden!important
  }
  .category-tree-branch{display:none!important}
  .category-tree-main{
    min-width:0!important;
    grid-column:1!important
  }
  .category-tree-main b{
    font-size:13px!important;
    line-height:1.25!important;
    overflow-wrap:anywhere!important
  }
  .category-tree-main small{
    font-size:13px!important;
    line-height:1.25!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important
  }
  .category-source-badges{
    grid-column:1!important;
    justify-content:flex-start!important;
    min-width:0!important
  }
  .category-source-badges span{
    padding:2px 5px!important;
    font-size:13px!important
  }
  .category-tree-row>.icon-button{
    width:34px!important;
    height:34px!important;
    padding:0!important
  }
  .category-tree-row>.directory-delete-form{
    width:34px!important;
    margin:0!important
  }
  .category-tree-row>.directory-delete-form .icon-button{
    width:34px!important;
    height:34px!important;
    padding:0!important
  }

  /* Sales dates/presets never push the page wider than viewport. */
  .sales-date-fields{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 8px minmax(0,1fr)!important;
    width:100%!important;
    gap:4px!important
  }
  .sales-date-fields label,.sales-date-fields input{min-width:0!important;width:100%!important}
  .sales-period-presets{
    display:flex!important;
    flex-wrap:nowrap!important;
    width:100%!important;
    max-width:100%!important;
    gap:5px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    -webkit-overflow-scrolling:touch!important;
    scrollbar-width:none!important
  }
  .sales-period-presets::-webkit-scrollbar{display:none!important}
  .sales-period-presets button{
    flex:0 0 auto!important;
    width:auto!important;
    min-width:max-content!important
  }

  /* Product editor and stock tab must stay inside its card. */
  .catalog-form-panel{
    margin-left:0!important;
    margin-right:0!important;
    padding-left:10px!important;
    padding-right:10px!important;
    overflow:hidden!important
  }
  .product-editor{
    width:100%!important;
    min-width:0!important;
    overflow:hidden!important
  }
  .product-editor .editor-tabs{
    display:flex!important;
    grid-template-columns:none!important;
    flex-wrap:nowrap!important;
    width:100%!important;
    max-width:100%!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    scrollbar-width:none!important
  }
  .product-editor .editor-tabs::-webkit-scrollbar{display:none!important}
  .product-editor .editor-tabs button{
    flex:0 0 auto!important;
    width:auto!important;
    min-width:104px!important;
    height:42px!important;
    padding:8px 10px!important
  }
  .product-editor .editor-page,
  .product-editor-page,
  .product-editor .stock-editor,
  .product-editor .stock-table-wrap{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin-left:0!important;
    margin-right:0!important;
    overflow:hidden!important
  }
  .product-editor .stock-editor{padding:8px!important}
  .product-editor .stock-editor table,
  .product-editor .stock-editor tbody,
  .product-editor .stock-editor tr,
  .product-editor .stock-editor td{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important
  }
  .product-editor .stock-editor td{padding:5px 0!important}
  .product-editor .stock-editor select,
  .product-editor .stock-editor input{
    width:100%!important;
    max-width:100%!important
  }
  .warehouse-pager{
    width:100%!important;
    max-width:100%!important;
    gap:8px!important
  }
  .warehouse-pager .outline{
    width:36px!important;
    height:34px!important;
    padding:0!important;
    flex:0 0 36px!important
  }

  /* Bottom nav is fixed but must not overlap page controls. */
  .mobile-bottom-nav{height:66px!important}
}

@media(max-width:390px){
  .shell>.content>.page,
  .shell>.content>.page.page-embedded,
  .page,.page-embedded,.migration-page{padding:10px!important}
  .settings-tabs a{min-width:110px!important;font-size:13px!important}
  #directory .directory-section-active{padding:8px!important}
  .category-tree-row{padding-left:7px!important}
}

/* 2026-09-19 — supplies mobile v6 */
@media(max-width:700px){
 .supplies-page{padding-bottom:18px!important}
 .supplies-page>.page-head{margin-bottom:9px!important}
 .supplies-page>.page-head h1{font-size:19px!important}
 .supplies-page>.page-head .primary{
  min-height:38px!important;
  padding:8px 11px!important;
  border-radius:11px!important;
  font-size:13px!important
 }

 .mobile-supply-editor{
  padding:0!important;
  margin:0 0 10px!important;
  border-radius:15px!important;
  overflow:hidden!important
 }
 .mobile-supply-editor>.panel-heading{
  margin:0!important;
  padding:13px 14px!important;
  background:#fff!important
 }
 .mobile-supply-editor>.panel-heading h2{
  margin:0!important;
  font-size:17px!important;
  line-height:1.2!important
 }
 .mobile-supply-editor>.panel-heading small{
  display:block!important;
  margin-top:4px!important;
  font-size:13px!important;
  line-height:1.35!important
 }

 .mobile-supply-editor>.supply-steps{
  display:flex!important;
  flex-wrap:nowrap!important;
  width:100%!important;
  gap:6px!important;
  margin:0!important;
  padding:9px 10px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  -webkit-overflow-scrolling:touch!important;
  scrollbar-width:none!important;
  background:#fafbfd!important;
  border-top:1px solid #edf1f5!important;
  border-bottom:1px solid #edf1f5!important
 }
 .mobile-supply-editor>.supply-steps::-webkit-scrollbar{display:none!important}
 .mobile-supply-editor>.supply-steps span{
  flex:0 0 auto!important;
  min-width:max-content!important;
  padding:7px 10px!important;
  border-radius:999px!important;
  font-size:13px!important;
  white-space:nowrap!important
 }

 .mobile-supply-editor>form{
  width:100%!important;
  margin:0!important;
  padding:10px!important
 }
 .mobile-supply-editor .form-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:8px!important;
  width:100%!important
 }
 .mobile-supply-editor .form-grid label{
  min-width:0!important;
  font-size:13px!important;
  line-height:1.25!important
 }
 .mobile-supply-editor .form-grid label:nth-child(1),
 .mobile-supply-editor .form-grid label:nth-child(2),
 .mobile-supply-editor .form-grid label:nth-child(5),
 .mobile-supply-editor .form-grid label:nth-child(7){
  grid-column:1/-1!important
 }
 .mobile-supply-editor .form-grid input,
 .mobile-supply-editor .form-grid select{
  width:100%!important;
  min-height:38px!important;
  margin-top:4px!important;
  padding:7px 9px!important;
  border-radius:10px!important;
  font-size:13px!important
 }

 .mobile-supply-editor h3{
  margin:13px 0 7px!important;
  font-size:15px!important
 }
 .mobile-supply-editor #supply-lines{
  width:100%!important;
  margin:0!important;
  border-top:0!important
 }
 .mobile-supply-editor .supply-product-line{
  width:100%!important;
  min-width:0!important;
  margin:0 0 8px!important;
  padding:9px!important;
  border-radius:12px!important;
  background:#fafbfd!important
 }
 .mobile-supply-editor .supply-product-line>.field{
  display:block!important;
  margin:0!important;
  font-size:13px!important
 }
 .mobile-supply-editor .supply-product-line>.field select{
  width:100%!important;
  min-width:0!important;
  min-height:38px!important;
  margin-top:4px!important;
  padding:7px 9px!important;
  border-radius:10px!important;
  font-size:13px!important
 }
 .mobile-supply-editor .supply-product-fields{
  display:grid!important;
  grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr) 34px!important;
  gap:7px!important;
  align-items:end!important;
  width:100%!important;
  margin-top:8px!important
 }
 .mobile-supply-editor .supply-product-fields label{
  min-width:0!important;
  gap:4px!important;
  font-size:13px!important;
  line-height:1.2!important
 }
 .mobile-supply-editor .supply-product-fields input{
  width:100%!important;
  min-width:0!important;
  height:38px!important;
  padding:7px 8px!important;
  border-radius:10px!important;
  font-size:13px!important
 }
 .mobile-supply-editor .supply-prev-cost{
  display:none!important
 }
 .mobile-supply-editor .supply-product-fields .icon-button{
  width:34px!important;
  height:38px!important;
  min-width:34px!important;
  padding:0!important;
  border-radius:10px!important
 }

 .mobile-supply-editor .document-total{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  margin:7px 0 8px!important;
  padding:9px 10px!important;
  border-radius:11px!important
 }
 .mobile-supply-editor .document-total span{font-size:13px!important}
 .mobile-supply-editor .document-total strong{
  font-size:15px!important;
  white-space:nowrap!important
 }

 .mobile-supply-editor .supply-product-actions{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:7px!important;
  margin:0 0 9px!important
 }
 .mobile-supply-editor .supply-product-actions button{
  width:100%!important;
  min-height:36px!important;
  padding:7px 8px!important;
  border-radius:10px!important;
  font-size:13px!important;
  line-height:1.2!important;
  white-space:normal!important
 }

 .mobile-supply-editor>.form-actions,
 .mobile-supply-editor>form>.form-actions{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,.7fr)!important;
  gap:7px!important;
  margin:9px 0 0!important;
  padding-top:9px!important;
  border-top:1px solid #edf1f5!important
 }
 .mobile-supply-editor>form>.form-actions button{
  width:100%!important;
  min-height:39px!important;
  padding:8px 9px!important;
  border-radius:10px!important;
  font-size:13px!important;
  white-space:normal!important
 }

 .mobile-supply-editor .quick-product-card{
  margin:9px 0!important;
  padding:10px!important;
  border-radius:12px!important
 }
 .mobile-supply-editor .quick-product-card .compact-fields{
  grid-template-columns:1fr!important;
  gap:7px!important;
  margin-top:9px!important
 }

 /* Supply list becomes cards on phones instead of a squeezed 6-column table. */
 .mobile-supply-list{
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  overflow:visible!important
 }
 .mobile-supply-list>.panel-heading{
  padding:9px 2px!important;
  border:0!important;
  background:transparent!important
 }
 .mobile-supply-list>.panel-heading h2{font-size:16px!important}
 .mobile-supply-list .table-wrap{overflow:visible!important}
 .mobile-supply-list table,
 .mobile-supply-list tbody{
  display:block!important;
  width:100%!important;
  min-width:0!important
 }
 .mobile-supply-list thead{display:none!important}
 .mobile-supply-list tbody tr{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  gap:4px 10px!important;
  width:100%!important;
  min-width:0!important;
  margin:0 0 8px!important;
  padding:11px 12px!important;
  border:1px solid #e3e8ef!important;
  border-radius:14px!important;
  background:#fff!important;
  box-shadow:0 2px 8px rgba(25,39,59,.04)!important
 }
 .mobile-supply-list tbody td{
  display:block!important;
  min-width:0!important;
  padding:0!important;
  border:0!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important
 }
 .mobile-supply-list tbody td:nth-child(1){
  grid-column:1!important;
  grid-row:1!important;
  color:#2f83c3!important
 }
 .mobile-supply-list tbody td:nth-child(2){
  grid-column:2!important;
  grid-row:1!important;
  color:#8490a2!important;
  font-size:13px!important;
  text-align:right!important
 }
 .mobile-supply-list tbody td:nth-child(3){
  grid-column:1/-1!important;
  grid-row:2!important;
  font-size:13px!important;
  font-weight:700!important
 }
 .mobile-supply-list tbody td:nth-child(4){
  grid-column:1!important;
  grid-row:3!important;
  color:#68798e!important;
  font-size:13px!important
 }
 .mobile-supply-list tbody td:nth-child(5){
  grid-column:2!important;
  grid-row:3!important;
  color:#68798e!important;
  font-size:13px!important;
  text-align:right!important
 }
 .mobile-supply-list tbody td:nth-child(6){
  grid-column:1/-1!important;
  grid-row:4!important;
  margin-top:4px!important;
  padding-top:7px!important;
  border-top:1px solid #edf1f5!important
 }
 .mobile-supply-list tbody td:nth-child(6)>b{font-size:14px!important}
 .mobile-supply-list details{margin-top:6px!important}
 .mobile-supply-list .supply-inline-form{
  padding:8px!important;
  border-radius:10px!important
 }

 .supply-toolbar{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:7px!important;
  margin:0 0 9px!important
 }
 .supply-toolbar input,
 .supply-toolbar select,
 .supply-toolbar button,
 .supply-toolbar a{
  width:100%!important;
  min-height:38px!important;
  border-radius:10px!important;
  font-size:13px!important
 }
}

@media(max-width:390px){
 .mobile-supply-editor .form-grid{grid-template-columns:1fr!important}
 .mobile-supply-editor .form-grid label{grid-column:1!important}
 .mobile-supply-editor .supply-product-fields{
  grid-template-columns:minmax(0,1fr) 32px!important
 }
 .mobile-supply-editor .supply-product-fields label:first-child{
  grid-column:1!important
 }
 .mobile-supply-editor .supply-product-fields label:nth-child(2){
  grid-column:1!important
 }
 .mobile-supply-editor .supply-product-fields .icon-button{
  grid-column:2!important;
  grid-row:1/3!important;
  height:100%!important;
  min-height:38px!important
 }
 .mobile-supply-editor .supply-product-actions{grid-template-columns:1fr!important}
}

/* 2026-09-19 — global mobile hardening v7
   Prevent any autocomplete, grid, flex row, form or long label from widening the mobile viewport. */
@media(max-width:700px){
 html{
  width:100%!important;
  max-width:100%!important;
  overflow-x:hidden!important;
  overscroll-behavior-x:none
 }
 body{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  overflow-x:hidden!important
 }

 /* Every main layout boundary must stay inside the viewport. */
 .shell,.content,.page,.page-embedded,.migration-workspace,.migration-page,
 main,section,article,form,fieldset,.panel,.editor,.document-editor,
 .form-grid,.compact-fields,.search,.table-wrap{
  min-width:0!important;
  max-width:100%!important;
  box-sizing:border-box!important
 }

 /* Grid/flex children are the most common source of Safari horizontal expansion. */
 .shell *,.content *,.page *,.page-embedded *,.migration-workspace *{
  min-width:0
 }

 /* Explicitly cancel legacy mobile widths like calc(100% - 20px). */
 .page-embedded>section.panel.editor>form,
 .page-embedded>section[id^="new"]>form,
 .page-embedded .supply-editor-panel>form,
 .page-embedded .editor .form-grid,
 .page-embedded .editor .sale-editor-items,
 .page-embedded .editor #sale-lines,
 .page-embedded .editor #invoice-lines,
 .page-embedded .editor #writeoff-lines,
 .page-embedded .editor #supply-lines,
 .document-form,
 .product-editor,
 .stock-editor{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin-left:0!important;
  margin-right:0!important
 }

 input,select,textarea,button{
  min-width:0!important;
  max-width:100%!important;
  box-sizing:border-box!important
 }
 label{
  min-width:0!important;
  max-width:100%!important;
  overflow-wrap:anywhere
 }

 /* Searchable product picker: results float over the form and cannot resize the page. */
 .product-picker-ui{
  position:relative!important;
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  overflow:visible!important
 }
 .product-picker-input-row{
  grid-template-columns:auto minmax(0,1fr)!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important
 }
 .product-picker-search{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  font-size:16px!important
 }
 .product-picker-list{
  position:absolute!important;
  z-index:1300!important;
  top:calc(100% + 5px)!important;
  left:0!important;
  right:0!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  max-height:min(52vh,330px)!important;
  margin:0!important;
  padding:5px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  border:1px solid #dfe6ee!important;
  border-radius:12px!important;
  background:#fff!important;
  box-shadow:0 14px 35px rgba(25,39,59,.16)!important;
  -webkit-overflow-scrolling:touch!important
 }
 .product-picker-card{
  display:grid!important;
  grid-template-columns:42px minmax(0,1fr)!important;
  grid-template-rows:auto auto!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  gap:5px 9px!important;
  padding:8px!important;
  overflow:hidden!important
 }
 .product-picker-card img,
 .product-picker-no-photo{
  grid-column:1!important;
  grid-row:1/3!important;
  width:42px!important;
  height:42px!important
 }
 .product-picker-info{
  grid-column:2!important;
  grid-row:1!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  overflow:hidden!important
 }
 .product-picker-info b{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  font-size:13px!important
 }
 .product-picker-info small{
  width:100%!important;
  max-width:100%!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  font-size:13px!important
 }
 .product-picker-stock{
  max-width:100%!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  font-size:13px!important
 }
 .product-picker-card>strong{
  grid-column:2!important;
  grid-row:2!important;
  justify-self:start!important;
  max-width:100%!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  font-size:13px!important
 }

 /* Never allow known operation editors to create horizontal scroll. */
 #editor,.sale-editor-items,.document-lines,.writeoff-lines,
 #invoice-lines,#writeoff-lines,#supply-lines,
 .supply-product-line,.sale-editor-item,.document-line,.writeoff-line{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important
 }

 /* Wide action rows wrap inside their card rather than widening it. */
 .form-actions,.document-form-actions,.supply-product-actions,
 .row-actions,.sale-actions,.writeoff-card-actions{
  max-width:100%!important;
  min-width:0!important
 }

 /* Tables may scroll inside their own wrapper, never the whole page. */
 .table-wrap{
  overflow-x:auto!important;
  overflow-y:visible!important;
  -webkit-overflow-scrolling:touch!important
 }
 .table-wrap>table{
  max-width:none
 }

 /* Popovers/details forms stay inside the visible viewport. */
 details,details>form,.sale-add-payment,.sale-add-payment>form,
 .writeoff-edit,.writeoff-edit-box{
  max-width:100%!important;
  min-width:0!important
 }
 .sale-add-payment>form{
  right:0!important;
  left:auto!important;
  width:min(280px,calc(100vw - 28px))!important
 }
}

@media(max-width:420px){
 .product-picker-selected-media{
  width:34px!important;
  height:34px!important
 }
 .product-picker-selected-media img,
 .product-picker-selected-placeholder{
  width:34px!important;
  height:34px!important
 }
 .product-picker-input-row{
  min-height:44px!important;
  padding:4px 6px!important
 }
}

/* 2026-09-19 — product picker v8 */
.product-picker-ui{
 position:relative;
 width:100%;
 max-width:100%;
 min-width:0
}
.product-picker-input-row{
 display:grid;
 grid-template-columns:auto minmax(0,1fr);
 align-items:center;
 gap:9px;
 width:100%;
 max-width:100%;
 min-width:0;
 min-height:46px;
 padding:5px 8px;
 border:1px solid #dce5e7;
 border-radius:10px;
 background:#fff;
 box-shadow:none
}
.product-picker-input-row:focus-within{
 border-color:#8fb7d7!important;
 box-shadow:0 0 0 2px rgba(47,143,214,.08)!important
}
.product-picker-search,
.product-picker-search:focus,
.product-picker-search:focus-visible,
.product-picker-search:active{
 display:block!important;
 width:100%!important;
 max-width:100%!important;
 min-width:0!important;
 height:36px!important;
 margin:0!important;
 padding:0 4px!important;
 border:0!important;
 outline:0!important;
 border-radius:0!important;
 background:transparent!important;
 box-shadow:none!important;
 -webkit-appearance:none!important;
 appearance:none!important
}
.product-picker-search::-webkit-search-decoration,
.product-picker-search::-webkit-search-cancel-button,
.product-picker-search::-webkit-search-results-button,
.product-picker-search::-webkit-search-results-decoration{
 -webkit-appearance:none
}
.product-picker-tools{
 display:flex;
 align-items:center;
 justify-content:space-between;
 gap:10px;
 width:100%;
 max-width:100%;
 margin:7px 0 0
}
.product-picker-filters{
 display:flex;
 align-items:center;
 gap:5px;
 min-width:0;
 overflow-x:auto;
 scrollbar-width:none;
 -webkit-overflow-scrolling:touch
}
.product-picker-filters::-webkit-scrollbar{display:none}
.product-picker-filters button{
 flex:0 0 auto;
 width:auto!important;
 min-width:0!important;
 min-height:30px;
 padding:5px 9px;
 border:1px solid #dce4ed;
 border-radius:999px;
 background:#fff;
 color:#61738a;
 font-size:13px;
 font-weight:700;
 line-height:1.2;
 white-space:nowrap;
 cursor:pointer
}
.product-picker-filters button.active{
 border-color:#65a8db;
 background:#edf6fd;
 color:#287fbe
}
.product-picker-count{
 flex:0 0 auto;
 color:#8995a6;
 font-size:13px;
 white-space:nowrap
}
.product-picker-list{
 box-sizing:border-box
}
.product-picker-more{
 padding:8px 10px;
 color:#8390a2;
 font-size:13px;
 text-align:center
}
.product-picker-card{
 min-width:0!important;
 max-width:100%!important;
 overflow:hidden!important
}
.product-picker-card>strong{
 min-width:0!important;
 max-width:130px;
 overflow:hidden;
 text-overflow:ellipsis
}

@media(max-width:700px){
 .product-picker-input-row{
  min-height:44px!important;
  padding:4px 6px!important
 }
 .product-picker-search,
 .product-picker-search:focus,
 .product-picker-search:focus-visible{
  width:100%!important;
  max-width:none!important;
  height:34px!important;
  font-size:16px!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  transform:none!important
 }
 .product-picker-tools{
  gap:6px!important;
  margin-top:5px!important
 }
 .product-picker-filters{
  gap:4px!important
 }
 .product-picker-filters button{
  min-height:28px!important;
  padding:5px 8px!important;
  font-size:13px!important
 }
 .product-picker-count{
  display:none!important
 }
 .product-picker-list{
  top:calc(100% + 38px)!important
 }
}



/* 2026-09-19 — product picker v9 */
.product-picker-ui{
 position:relative;
 width:100%;
 max-width:100%;
 min-width:0
}
.product-picker-input-row{
 width:100%;
 max-width:100%;
 min-width:0
}
.product-picker-search,
.product-picker-search:focus,
.product-picker-search:focus-visible{
 width:100%!important;
 max-width:100%!important;
 min-width:0!important;
 border:0!important;
 outline:0!important;
 box-shadow:none!important;
 -webkit-appearance:none!important;
 appearance:none!important;
 background:transparent!important
}
.product-picker-input-row:focus-within{
 border-color:#efb194!important;
 box-shadow:0 0 0 2px rgba(239,177,148,.12)!important
}
.product-picker-filters{
 display:flex;
 gap:6px;
 margin-top:7px;
 padding:0 1px;
 overflow-x:auto;
 scrollbar-width:none
}
.product-picker-filters::-webkit-scrollbar{display:none}
.product-picker-filters[hidden]{display:none!important}
.product-picker-filters button{
 flex:0 0 auto;
 min-height:30px;
 padding:5px 10px;
 border:1px solid #dce4ed;
 border-radius:999px;
 background:#fff;
 color:#607188;
 font-size:13px;
 font-weight:700;
 cursor:pointer
}
.product-picker-filters button.active{
 border-color:#55a9de;
 background:#eef7fd;
 color:#2e83c3
}
.product-picker-photo,
.product-picker-selected-photo{
 position:relative;
 display:grid;
 place-items:center;
 overflow:hidden;
 background:#f4f6f9
}
.product-picker-photo{width:42px;height:42px;border-radius:8px}
.product-picker-selected-photo{width:40px;height:40px;border-radius:8px}
.product-picker-photo img,
.product-picker-selected-photo img{
 width:100%;
 height:100%;
 object-fit:contain;
 background:#fff
}
.product-picker-photo i,
.product-picker-selected-photo i{
 display:none;
 font-style:normal;
 font-size:18px
}
.product-picker-photo.is-broken img,
.product-picker-selected-photo.is-broken img{display:none}
.product-picker-photo.is-broken i,
.product-picker-selected-photo.is-broken i{display:grid}
.product-picker-fallback{
 display:grid;
 place-items:center;
 font-size:18px
}
.product-picker-list{
 width:100%;
 max-width:100%;
 min-width:0
}
.product-picker-card{
 max-width:100%;
 min-width:0
}
@media(max-width:700px){
 .product-picker-filters{
  position:relative!important;
  z-index:1301!important;
  margin-top:5px!important
 }
 .product-picker-filters button{
  min-height:28px!important;
  padding:4px 9px!important;
  font-size:13px!important
 }
 .product-picker-list{
  top:calc(100% + 40px)!important
 }
}

/* 2026-09-19 — sales dates v9 */
.sales-date-filter{
 display:grid!important;
 grid-template-columns:minmax(0,1fr) auto auto!important;
 gap:10px!important;
 align-items:end!important;
 width:100%!important
}
.sales-date-fields{
 display:grid!important;
 grid-template-columns:repeat(2,minmax(150px,1fr))!important;
 gap:10px!important;
 width:100%!important;
 min-width:0!important
}
.sales-date-fields>span{display:none!important}
.sales-date-fields label{
 display:grid!important;
 grid-template-columns:1fr!important;
 gap:5px!important;
 min-width:0!important;
 width:100%!important;
 color:#6f8094!important;
 font-size:13px!important;
 font-weight:700!important;
 white-space:nowrap!important
}
.sales-date-fields input{
 display:block!important;
 width:100%!important;
 min-width:0!important;
 max-width:none!important;
 min-height:40px!important;
 padding:7px 10px!important;
 border:1px solid #dce4ed!important;
 border-radius:10px!important;
 background:#fff!important;
 color:#30465f!important;
 font-size:13px!important;
 line-height:1.2!important;
 box-sizing:border-box!important
}
.sales-period-presets{
 display:flex!important;
 align-items:center!important;
 gap:5px!important;
 flex-wrap:wrap!important;
 min-width:0!important;
 max-width:100%!important
}
.sales-period-presets button{
 flex:0 0 auto!important;
 width:auto!important;
 min-width:0!important;
 min-height:34px!important;
 padding:6px 10px!important;
 border:1px solid #69abe0!important;
 border-radius:9px!important;
 background:#fff!important;
 color:#2d83c3!important;
 font-size:13px!important;
 font-weight:700!important;
 white-space:nowrap!important
}
.sales-date-apply{
 width:auto!important;
 min-width:120px!important;
 min-height:40px!important;
 margin:0!important
}

@media(max-width:780px){
 .sales-period-panel{
  padding:9px!important
 }
 .sales-date-filter{
  display:block!important
 }
 .sales-date-fields{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:8px!important;
  width:100%!important
 }
 .sales-date-fields label{
  width:100%!important;
  min-width:0!important;
  font-size:13px!important;
  white-space:nowrap!important
 }
 .sales-date-fields input{
  width:100%!important;
  min-width:0!important;
  min-height:44px!important;
  padding:8px 9px!important;
  font-size:16px!important
 }
 .sales-period-presets{
  flex-wrap:nowrap!important;
  width:100%!important;
  max-width:100%!important;
  margin-top:8px!important;
  padding-bottom:2px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  -webkit-overflow-scrolling:touch!important;
  scrollbar-width:none!important
 }
 .sales-period-presets::-webkit-scrollbar{display:none!important}
 .sales-period-presets button{
  flex:0 0 auto!important;
  min-width:max-content!important
 }
 .sales-date-apply{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  min-width:0!important;
  margin-top:8px!important
 }
}

@media(max-width:360px){
 .sales-date-fields{
  grid-template-columns:1fr!important
 }
}

/* 2026-09-19 — product picker performance v10 */
.product-picker-ui{
 width:100%!important;
 max-width:100%!important;
 min-width:0!important
}
.product-picker-input-row{
 display:grid!important;
 grid-template-columns:auto minmax(0,1fr)!important;
 align-items:center!important;
 gap:8px!important;
 width:100%!important;
 max-width:100%!important;
 min-width:0!important;
 min-height:46px!important;
 padding:5px 8px!important;
 border:1px solid #d9e2ea!important;
 border-radius:10px!important;
 background:#fff!important;
 box-shadow:none!important
}
.product-picker-input-row:focus-within{
 border-color:#67a9d9!important;
 box-shadow:none!important
}
.product-picker-search,
.product-picker-search:focus,
.product-picker-search:focus-visible,
.product-picker-search:active{
 display:block!important;
 width:100%!important;
 max-width:100%!important;
 min-width:0!important;
 height:36px!important;
 margin:0!important;
 padding:0 4px!important;
 border:0!important;
 outline:0!important;
 border-radius:0!important;
 background:transparent!important;
 box-shadow:none!important;
 color:#2f4056!important;
 font-size:13px!important;
 line-height:36px!important;
 -webkit-appearance:none!important;
 appearance:none!important
}
.product-picker-search::placeholder{
 color:#9aa5b3!important;
 opacity:1!important;
 font-size:13px!important
}
.product-picker-filters{
 display:flex!important;
 gap:5px!important;
 width:100%!important;
 max-width:100%!important;
 min-width:0!important;
 margin-top:6px!important;
 padding:0 1px!important;
 overflow-x:auto!important;
 overflow-y:hidden!important;
 scrollbar-width:none!important;
 -webkit-overflow-scrolling:touch!important
}
.product-picker-filters[hidden]{display:none!important}
.product-picker-filters::-webkit-scrollbar{display:none!important}
.product-picker-filters button{
 flex:0 0 auto!important;
 width:auto!important;
 min-width:0!important;
 min-height:29px!important;
 padding:5px 9px!important;
 border:1px solid #dbe4ed!important;
 border-radius:999px!important;
 background:#fff!important;
 color:#607188!important;
 font-size:13px!important;
 font-weight:700!important;
 white-space:nowrap!important
}
.product-picker-filters button.active{
 border-color:#5ca5d9!important;
 background:#eef7fd!important;
 color:#287fbe!important
}
.product-picker-status{
 margin:4px 2px 0!important;
 color:#8b97a8!important;
 font-size:13px!important;
 line-height:1.2!important
}
.product-picker-status[hidden]{display:none!important}
.product-picker-list{
 display:grid!important;
 gap:6px!important;
 width:100%!important;
 max-width:100%!important;
 min-width:0!important;
 max-height:286px!important;
 margin-top:6px!important;
 padding:2px!important;
 overflow-y:auto!important;
 overflow-x:hidden!important;
 overscroll-behavior:contain!important;
 -webkit-overflow-scrolling:touch!important
}
.product-picker-list[hidden]{display:none!important}
.product-picker-card{
 grid-template-columns:44px minmax(0,1fr) auto!important;
 gap:9px!important;
 min-height:56px!important;
 padding:7px 8px!important
}
.product-picker-card .product-picker-photo{
 width:44px!important;
 height:44px!important
}
.product-picker-card .product-picker-info b{
 font-size:13px!important;
 line-height:1.25!important
}
.product-picker-card .product-picker-info small,
.product-picker-card .product-picker-stock{
 font-size:13px!important;
 line-height:1.25!important
}
.product-picker-card>strong{
 max-width:115px!important;
 font-size:13px!important;
 white-space:nowrap!important
}
.product-picker-empty,
.product-picker-more{
 padding:10px!important;
 color:#7e8c9e!important;
 font-size:13px!important;
 text-align:center!important
}

@media(max-width:700px){
 .product-picker-input-row{
  min-height:44px!important;
  padding:4px 6px!important
 }
 .product-picker-search,
 .product-picker-search:focus,
 .product-picker-search:focus-visible{
  height:34px!important;
  line-height:34px!important;
  font-size:16px!important
 }
 .product-picker-search::placeholder{
  font-size:13px!important
 }
 .product-picker-filters{
  gap:4px!important;
  margin-top:5px!important
 }
 .product-picker-filters button{
  min-height:28px!important;
  padding:4px 8px!important;
  font-size:13px!important
 }
 .product-picker-list{
  max-height:min(42vh,300px)!important
 }
 .product-picker-card{
  grid-template-columns:40px minmax(0,1fr)!important
 }
 .product-picker-card .product-picker-photo{
  width:40px!important;
  height:40px!important
 }
 .product-picker-card>strong{
  grid-column:2!important;
  justify-self:start!important;
  max-width:100%!important
 }
}

/* 2026-09-19 — iOS form stability v10
   Prevent Safari focus zoom and native date-control overflow. */
@media(max-width:700px){
 /* iOS Safari zooms focused controls whose computed font size is below 16px. */
 input,
 select,
 textarea,
 .product-picker-search{
  font-size:16px!important;
  line-height:1.2!important;
  -webkit-text-size-adjust:100%!important
 }
 button{touch-action:manipulation}

 /* Keep native date controls inside their grid cells. */
 .sales-date-fields{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  gap:8px!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  overflow:hidden!important
 }
 .sales-date-fields>span{display:none!important}
 .sales-date-fields label{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  overflow:hidden!important;
  white-space:nowrap!important
 }
 .sales-date-fields input[type="date"]{
  display:block!important;
  box-sizing:border-box!important;
  inline-size:100%!important;
  width:100%!important;
  max-inline-size:100%!important;
  max-width:100%!important;
  min-inline-size:0!important;
  min-width:0!important;
  height:46px!important;
  min-height:46px!important;
  margin:5px 0 0!important;
  padding:0 8px!important;
  border:1px solid #dce4ed!important;
  border-radius:11px!important;
  background:#fff!important;
  color:#30465f!important;
  font-size:16px!important;
  font-weight:650!important;
  line-height:46px!important;
  text-align:center!important;
  text-align-last:center!important;
  appearance:none!important;
  -webkit-appearance:none!important;
  overflow:hidden!important
 }
 .sales-date-fields input[type="date"]::-webkit-date-and-time-value{
  min-width:0!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
  text-align:center!important
 }
 .sales-date-fields input[type="date"]::-webkit-datetime-edit{
  display:block!important;
  min-width:0!important;
  padding:0!important;
  text-align:center!important
 }
 .sales-date-fields input[type="date"]::-webkit-calendar-picker-indicator{
  position:absolute!important;
  opacity:0!important;
  width:100%!important;
  height:100%!important;
  inset:0!important
 }

 /* Sales editor fields must not trigger page zoom or exceed the viewport. */
 #editor input,
 #editor select,
 #editor textarea,
 .sale-editor-item input,
 .sale-editor-item select{
  font-size:16px!important;
  max-width:100%!important;
  min-width:0!important
 }
 .sale-editor-item,
 .sale-editor-item-fields,
 .sale-summary-row,
 .sale-extra-fields{
  max-width:100%!important;
  min-width:0!important
 }
}

@media(max-width:360px){
 .sales-date-fields{
  grid-template-columns:1fr!important
 }
}

/* 2026-09-19 — picker touch scroll v12 */
.product-picker-list{
 touch-action:pan-y!important;
 -webkit-overflow-scrolling:touch!important;
 overscroll-behavior-y:contain!important
}
.product-picker-card{
 touch-action:manipulation!important
}

/* 2026-09-19 — sales customer lookup v13 */
#editor .sale-customer-block{
 position:relative;
 min-width:0
}
#editor .sale-customer-search-label,
#editor .sale-customer-select-label{
 display:grid!important;
 gap:6px!important
}
#editor #customer-search{
 width:100%;
 min-width:0;
 min-height:42px;
 border:1px solid #dce4ed;
 border-radius:10px;
 background:#fff;
 padding:8px 10px
}
.sale-customer-results{
 display:grid;
 gap:5px;
 margin:6px 0 10px;
 padding:6px;
 border:1px solid #dfe6ee;
 border-radius:11px;
 background:#fff;
 box-shadow:0 8px 22px rgba(28,42,61,.07)
}
.sale-customer-results[hidden]{display:none!important}
.sale-customer-result-title,
.sale-customer-not-found{
 padding:4px 6px;
 color:#8793a4;
 font-size:13px;
 font-weight:700
}
.sale-customer-results button{
 display:grid;
 grid-template-columns:minmax(0,1fr) auto;
 gap:3px 10px;
 align-items:center;
 width:100%;
 min-width:0;
 min-height:38px;
 padding:7px 9px;
 border:1px solid #e3e8ef;
 border-radius:9px;
 background:#fff;
 color:#334961;
 text-align:left;
 cursor:pointer
}
.sale-customer-results button:hover{
 border-color:#80b6df;
 background:#f7fbfe
}
.sale-customer-results button small{
 color:#8290a2;
 font-size:13px;
 white-space:nowrap
}
.sale-customer-results .sale-customer-create-link{
 display:flex;
 align-items:center;
 justify-content:center;
 border-style:dashed;
 color:#2d83c3;
 font-weight:750
}
.sale-customer-create{
 margin:9px 0 12px;
 padding:12px;
 border:1px solid #dfe6ee;
 border-radius:12px;
 background:#f9fbfd
}
.sale-customer-create[hidden]{display:none!important}
.sale-customer-create-head{
 display:flex;
 align-items:baseline;
 justify-content:space-between;
 gap:10px;
 margin-bottom:9px
}
.sale-customer-create-head b{
 color:#2b405c;
 font-size:13px
}
.sale-customer-create-head span{
 color:#8592a3;
 font-size:13px
}
.sale-customer-create-grid{
 display:grid;
 grid-template-columns:repeat(2,minmax(0,1fr));
 gap:8px
}
.sale-customer-create-grid label{
 display:grid!important;
 gap:5px!important;
 min-width:0
}
.sale-customer-create-grid input{
 width:100%;
 min-width:0;
 min-height:39px
}
.sale-customer-create-actions{
 display:flex;
 gap:7px;
 margin-top:9px
}
.sale-customer-create-actions button{
 min-height:38px
}
#sale-customer-create-status{
 margin-top:7px;
 font-size:13px
}

@media(max-width:700px){
 #editor .sale-customer-block{
  padding:10px!important
 }
 #editor #customer-search,
 #editor .sale-customer-block select{
  font-size:16px!important
 }
 .sale-customer-results{
  max-height:260px;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch
 }
 .sale-customer-results button{
  grid-template-columns:minmax(0,1fr)!important;
  gap:2px!important;
  min-height:44px!important
 }
 .sale-customer-results button small{
  white-space:normal!important
 }
 .sale-customer-create-head{
  display:grid;
  gap:2px
 }
 .sale-customer-create-grid{
  grid-template-columns:1fr
 }
 .sale-customer-create-actions{
  display:grid;
  grid-template-columns:1fr 1fr
 }
 .sale-customer-create-actions button{
  width:100%
 }
}



/* 2026-09-19 — Nova Poshta COD visibility v14 */
#np-cod-control-wrap[hidden]{
 display:none!important
}
#np-cod-control-wrap:not([hidden]){
 display:flex!important
}


/* Vchasno.Kasa connection wizard */
.vk-main{padding:26px!important}.vk-intro{display:flex;align-items:center;gap:14px;margin:20px 0 14px;padding:17px 18px;border:1px solid #e6ebf1;border-radius:12px;background:#fafbfd}.vk-intro-icon{display:grid;place-items:center;flex:0 0 46px;width:46px;height:46px;border-radius:12px;background:#fff0e9;font-size:22px}.vk-intro h3{margin:0 0 4px;color:#293e5a;font-size:18px}.vk-intro p{margin:0;color:#728197;font-size:13px;line-height:1.55}.vk-progress{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:14px 0 20px}.vk-progress>div{display:flex;align-items:center;gap:7px;min-width:0;padding:9px 10px;border:1px solid #e7ebf1;border-radius:10px;background:#f8fafc;color:#7a899b}.vk-progress>div.active{border-color:#f2d8cc;background:#fff4ee;color:#bd5735}.vk-progress span{display:grid;place-items:center;flex:0 0 23px;width:23px;height:23px;border-radius:50%;background:#fff;font-size:13px;font-weight:800}.vk-progress b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.vk-wizard{display:grid;gap:14px}.vk-step{padding:18px;border:1px solid #e5eaf0;border-radius:13px;background:#fff}.vk-step-head{display:flex;align-items:flex-start;gap:12px;margin-bottom:15px}.vk-step-head>span{display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;border-radius:9px;background:#fff0e9;color:#d65d36;font-weight:800}.vk-step-head h3{margin:1px 0 4px;color:#2c405c;font-size:15px}.vk-step-head p{margin:0;color:#7a899b;font-size:13px;line-height:1.5}.vk-fields{display:grid;grid-template-columns:1fr;gap:13px;padding-left:42px}.vk-fields.two{grid-template-columns:repeat(2,minmax(0,1fr))}.vk-fields.three{grid-template-columns:1.25fr .8fr .8fr}.vk-fields label{display:flex;flex-direction:column;gap:6px;color:#5e7086;font-size:13px}.vk-fields label>b{color:#40546f}.vk-fields input,.vk-fields select{width:100%;min-height:43px;box-sizing:border-box;border:1px solid #d8e1eb;border-radius:9px;padding:9px 11px;background:#fff;color:#263b58}.vk-fields input:focus,.vk-fields select:focus{outline:0;border-color:#d87a59;box-shadow:0 0 0 3px #f6e8e220}.vk-fields small{color:#8a97a8;font-weight:400;line-height:1.45}.vk-help-path{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin:0 0 14px 42px;padding:10px 12px;border-radius:9px;background:#f5f8fb;color:#63758a;font-size:13px}.vk-help-path>b{color:#40546f}.vk-help-path span{padding:4px 7px;border-radius:7px;background:#fff;border:1px solid #e2e8ef}.vk-help-path i{font-style:normal;color:#a0abba}.vk-test-step{background:#fafdff}.vk-test-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-left:42px;padding:13px 14px;border:1px dashed #cfdce8;border-radius:10px;background:#fff}.vk-test-row>div{display:flex;flex-direction:column;gap:3px}.vk-test-row b{color:#40546f;font-size:13px}.vk-test-row span{color:#8492a3;font-size:13px}.vk-test-row button{white-space:nowrap}.vk-extra{margin:13px 0 0 42px;padding:11px 13px;border:1px solid #e5eaf0;border-radius:9px;background:#fafbfd}.vk-extra summary{cursor:pointer;color:#50647e;font-size:13px;font-weight:700}.vk-extra p{margin:8px 0 0;color:#8290a1;font-size:13px;line-height:1.55}.vk-ready{background:#fbfcfd}.vk-enable{display:flex;align-items:flex-start;gap:10px;margin-left:42px;padding:12px 13px;border:1px solid #e3e9ef;border-radius:10px;background:#fff;color:#40546f}.vk-enable input{margin-top:2px}.vk-enable span{display:flex;flex-direction:column;gap:3px}.vk-enable small{color:#8593a4;font-size:13px;font-weight:400}.vk-actions{display:flex;align-items:center;gap:10px;margin:15px 0 0 42px}.vk-actions .primary{min-width:240px}.vk-actions .integration-action{margin-top:0}.vk-side-guide ol{display:grid;gap:12px;margin:0;padding:0;list-style:none}.vk-side-guide li{display:flex;align-items:flex-start;gap:9px}.vk-side-guide li>span{display:grid;place-items:center;flex:0 0 24px;width:24px;height:24px;border-radius:7px;background:#fff0e9;color:#d25e38;font-size:13px;font-weight:800}.vk-side-guide li div{display:flex;flex-direction:column;gap:2px}.vk-side-guide b{color:#435875;font-size:13px}.vk-side-guide small{color:#8794a4;font-size:13px;line-height:1.4}
@media(max-width:1050px){.vk-progress{grid-template-columns:repeat(3,minmax(0,1fr))}.vk-fields.three{grid-template-columns:1fr 1fr}.vk-fields.three label:first-child{grid-column:1/-1}}
@media(max-width:700px){.vk-main{padding:15px!important}.vk-intro{align-items:flex-start}.vk-progress{grid-template-columns:1fr 1fr}.vk-step{padding:14px}.vk-step-head{gap:9px}.vk-fields,.vk-help-path,.vk-test-row,.vk-extra,.vk-enable,.vk-actions{margin-left:0;padding-left:0}.vk-fields.two,.vk-fields.three{grid-template-columns:1fr}.vk-fields.three label:first-child{grid-column:auto}.vk-help-path{padding:10px}.vk-test-row{align-items:stretch;flex-direction:column;padding:12px}.vk-test-row button{width:100%}.vk-enable{padding:11px}.vk-actions{flex-direction:column;align-items:stretch}.vk-actions .primary,.vk-actions .outline{width:100%;min-width:0;justify-content:center}.vk-progress b{font-size:13px}}


/* Simplified Vchasno.Kasa settings */
.vk-simple-main{padding:24px!important}.vk-simple-card{max-width:760px;margin:22px auto 6px;padding:22px;border:1px solid #e2e8ef;border-radius:14px;background:#fff}.vk-simple-title{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}.vk-simple-title h3{margin:0 0 5px;color:#2d405b;font-size:18px}.vk-simple-title p{margin:0;color:#7f8da0;font-size:13px;line-height:1.5}.vk-simple-form{display:grid;gap:15px}.vk-field{display:flex;flex-direction:column;gap:6px}.vk-field>span{color:#53667e;font-size:13px;font-weight:700}.vk-field input,.vk-field select{width:100%;min-height:44px;box-sizing:border-box;border:1px solid #d8e0e9;border-radius:10px;background:#fff;padding:10px 12px;color:#293c56;font-size:13px}.vk-field input:focus,.vk-field select:focus{outline:0;border-color:#d87958;box-shadow:0 0 0 3px #ef714518}.vk-field small{color:#8b98a9;font-size:13px;line-height:1.4}.vk-toggle-row{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:2px 0}.vk-switch{display:inline-flex;align-items:center;gap:7px;cursor:pointer;color:#5d6f85;font-size:13px}.vk-switch input{position:absolute;opacity:0;pointer-events:none}.vk-switch i{position:relative;width:30px;height:18px;border-radius:999px;background:#dfe5ec;transition:.2s}.vk-switch i:after{content:"";position:absolute;top:3px;left:3px;width:12px;height:12px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0002;transition:.2s}.vk-switch input:checked+i{background:#3497db}.vk-switch input:checked+i:after{transform:translateX(12px)}.vk-switch b{font-size:13px;font-weight:650}.vk-simple-extra{border:1px solid #e3e8ee;border-radius:11px;background:#fafbfd;overflow:hidden}.vk-simple-extra summary{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 14px;cursor:pointer;list-style:none;color:#455a74;font-size:13px}.vk-simple-extra summary::-webkit-details-marker{display:none}.vk-simple-extra summary span{padding:5px 10px;border-radius:999px;background:#f0d321;color:#715c00;font-size:13px;font-weight:700}.vk-simple-extra[open] summary span{background:#e9edf2;color:#67778a}.vk-extra-body{padding:0 14px 14px;border-top:1px solid #e7ebf0}.vk-extra-note{margin:12px 0;color:#8290a2;font-size:13px;line-height:1.55}.vk-extra-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.vk-extra-grid .span2{grid-column:1/-1}.vk-extra-actions{display:flex;gap:9px;align-items:center;margin-top:13px;flex-wrap:wrap}.vk-active-row{display:inline-flex;align-items:center;gap:9px;width:max-content;color:#52667f;font-size:13px;font-weight:650}.vk-simple-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:2px}.vk-simple-actions .primary{min-width:180px}.vk-simple-side .import-help p{color:#75869a;font-size:13px;line-height:1.6}
@media(max-width:700px){.vk-simple-main{padding:14px!important}.vk-simple-card{margin-top:14px;padding:15px}.vk-simple-title{flex-direction:column}.vk-toggle-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.vk-extra-grid{grid-template-columns:1fr}.vk-extra-grid .span2{grid-column:auto}.vk-extra-actions,.vk-simple-actions{flex-direction:column;align-items:stretch}.vk-extra-actions .outline,.vk-simple-actions button,.vk-simple-actions .primary{width:100%;min-width:0;justify-content:center}}

.vk-payment-mode-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:4px}.vk-payment-mode-grid label{display:grid;grid-template-columns:minmax(0,1fr) minmax(150px,190px);align-items:center;gap:10px;padding:10px 12px;border:1px solid #e3e8ee;border-radius:10px;background:#fafbfd}.vk-payment-mode-grid b{font-size:13px;color:#41556f}.vk-payment-mode-grid select{min-height:38px!important;padding:7px 9px!important}@media(max-width:700px){.vk-payment-mode-grid{grid-template-columns:1fr}.vk-payment-mode-grid label{grid-template-columns:1fr}.vk-payment-mode-grid select{width:100%}}
.vk-cloud-note{display:flex;align-items:flex-start;gap:10px;padding:12px 13px;border:1px solid #d7e9f5;border-radius:10px;background:#f4faff;color:#53718a}
.vk-cloud-note b{white-space:nowrap;color:#2877a8;font-size:13px}.vk-cloud-note span{font-size:13px;line-height:1.5}


/* ===== Global readability pass v16 — 2026-09-19 ===== */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{font-size:14.5px;line-height:1.48}
.content,.page,.page-embedded,.panel,.card,.modal,.dialog{line-height:1.48}
.content h1,.page-head h1{line-height:1.16}
.panel h2,.panel-head h2,.panel-heading h2{line-height:1.25}
small,.sub,.subtext,.muted,.hint,.helper-text,.field-help{font-size:13px!important;line-height:1.42!important}
.notice,.alert,.success,.warning{font-size:13.5px!important;line-height:1.48!important}
table th{font-size:13px!important;line-height:1.35!important;font-weight:700}
table td{font-size:13.5px;line-height:1.45;overflow-wrap:anywhere}
input,select,textarea{font-size:14px;line-height:1.4}
button,.primary,.outline,.ghost,.icon-button{line-height:1.35}
.badge,.status,.tag,.chip,[class*="-status"]{line-height:1.35}
.sidebar nav a{line-height:1.35}
.sale-number-cell b,.catalog-product b,.directory-row b{line-height:1.35}
.sale-number-cell .subtext,.sale-payment-state small,.sale-delivery-state{font-size:13px!important;line-height:1.4!important}
.sales-kpi-grid article span,.sales-kpi-grid article small,.stats article span,.stats article small,.metric span,.metric small{font-size:13px!important;line-height:1.4!important}
.sales-kpi-grid article strong,.stats article strong,.metric strong{line-height:1.18}
.form-grid label,.compact-fields label,.sale-extra-fields label,.sales-date-filter label,.sales-filter-bar label{line-height:1.4}
.table-wrap{scrollbar-width:thin}

@media(max-width:1366px){
 body{font-size:15px}
 .content,.page{line-height:1.5}
 table td{font-size:14px!important;line-height:1.48!important}
 table th{font-size:12.5px!important;line-height:1.4!important}
 small,.sub,.subtext,.muted,.hint,.helper-text,.field-help{font-size:12.5px!important;line-height:1.45!important}
 .notice,.alert,.success,.warning{font-size:14px!important}
 button,.primary,.outline,.ghost{font-size:13.5px;min-height:38px}
 input,select,textarea{font-size:14.5px;min-height:40px}
 .sidebar nav a{font-size:14.5px}
}

@media(max-width:1024px){
 body{font-size:15px!important;line-height:1.52}
 .page-embedded{padding-left:18px!important;padding-right:18px!important}
 .panel,.card{line-height:1.5}
 table td{font-size:14px!important;line-height:1.5!important}
 table th{font-size:12.5px!important}
 small,.sub,.subtext,.muted,.hint,.helper-text,.field-help{font-size:13px!important}
 .badge,.status,.tag,.chip,[class*="-status"]{font-size:12.5px!important}
 .form-actions,.sale-actions,.row-actions{gap:8px}
}

@media(max-width:760px){
 body{font-size:15px!important;line-height:1.55!important}
 .page-embedded{padding-left:14px!important;padding-right:14px!important}
 .page-embedded .page-head h1,.content h1{font-size:24px!important;line-height:1.16!important}
 .panel h2,.panel-head h2,.panel-heading h2{font-size:18px!important;line-height:1.25!important}
 table td{font-size:14px!important;line-height:1.5!important;padding-top:12px;padding-bottom:12px}
 table th{font-size:13px!important;line-height:1.4!important}
 small,.sub,.subtext,.muted,.hint,.helper-text,.field-help{font-size:13px!important;line-height:1.48!important}
 label{line-height:1.45}
 input,select,textarea{font-size:16px!important;line-height:1.4!important;min-height:44px}
 button,.primary,.outline,.ghost{font-size:14px!important;line-height:1.35!important;min-height:42px}
 .badge,.status,.tag,.chip,[class*="-status"]{font-size:13px!important;line-height:1.4!important;white-space:normal}
 .notice,.alert,.success,.warning{font-size:14px!important;line-height:1.5!important;padding:12px 14px!important}
 .sidebar nav a{font-size:15px!important;line-height:1.4!important}
 .sales-kpi-grid article span,.sales-kpi-grid article small,.stats article span,.stats article small,.metric span,.metric small{font-size:12.5px!important}
 .sale-actions,.row-actions{gap:7px;min-width:0}
 .print-menu>div a{font-size:13px!important;line-height:1.4!important}
}

@media(max-width:480px){
 body{font-size:15px!important}
 .page-embedded .page-head h1,.content h1{font-size:22px!important}
 table td{font-size:13.5px!important}
 table th{font-size:12.5px!important}
 small,.sub,.subtext,.muted,.hint,.helper-text,.field-help{font-size:12.75px!important}
 button,.primary,.outline,.ghost{font-size:13.5px!important}
}


/* Sales responsive layout is owned by sales.php V21.0.1 to avoid conflicting historical patches. */

/* === v0.4.0 Employees / RBAC / internal messages === */
.nav-group>a{position:relative}.nav-badge{margin-left:auto;min-width:20px;height:20px;padding:0 6px;border-radius:999px;display:inline-grid;place-items:center;background:#ef5c32;color:#fff;font-size:11px;font-weight:800}.muted{color:#74849a}.outline,.danger,.ghost{display:inline-flex;align-items:center;justify-content:center;gap:6px;border-radius:9px;padding:10px 13px;cursor:pointer;background:#fff}.outline{border:1px solid #d4deea}.danger{border:1px solid #efc9ce;color:#b8323f}.ghost{border:1px dashed #cbd6e4;color:#52657e}.section-title{margin:10px 0 4px}.employee-grid{display:grid;gap:12px}.employee-card{display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:14px;padding:16px;border:1px solid #e3e9f1;border-radius:12px;background:#fff}.employee-card.inactive{opacity:.65;background:#f8f9fb}.employee-avatar,.conversation-avatar{display:grid;place-items:center;border-radius:50%;background:#eef4fb;color:#1f6fb2;font-weight:800}.employee-avatar{width:46px;height:46px;font-size:18px}.employee-info{display:grid;gap:5px;min-width:0}.employee-info small{color:#77879a}.employee-title{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.role-pill,.status-pill,.role-code{display:inline-flex;align-items:center;border-radius:999px;padding:4px 8px;background:#edf4fb;color:#315d87;font-size:12px;font-weight:700}.status-pill.off{background:#fff1f1;color:#a53939}.employee-actions,.role-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.employee-actions form,.role-actions form{margin:0}.permission-overrides{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 16px}.permission-overrides label{display:grid;grid-template-columns:minmax(0,1fr) 170px;align-items:center;gap:10px;padding:9px 11px;background:#f8fafc;border:1px solid #e3e9f1;border-radius:9px}.permission-overrides select,.audit-filters select,.audit-filters input{border:1px solid #cfd9e6;border-radius:8px;padding:10px;background:#fff}.role-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.role-card{margin:0}.role-card-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.role-card h2{margin:0 0 5px}.role-card p{min-height:38px;color:#687a91}.role-stats{display:flex;gap:20px;padding:12px 0;color:#718198}.role-stats b{color:#17263d}.permissions-matrix{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:20px}.permissions-matrix section{border:1px solid #e1e8f0;border-radius:11px;padding:14px}.permissions-matrix h3{margin:0 0 10px;font-size:15px}.permissions-matrix label{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:9px;align-items:center;padding:7px 0;border-bottom:1px solid #edf1f5}.permissions-matrix label:last-child{border-bottom:0}.permissions-matrix code{font-size:11px;color:#8290a2}.audit-filters{display:flex;align-items:end;gap:10px;margin-bottom:16px}.audit-filters label{display:grid;gap:6px}.audit-json{max-width:480px;white-space:pre-wrap;word-break:break-word;background:#f7f9fc;border-radius:7px;padding:8px;font-size:11px}
/* messenger */
.messages-content{max-width:1600px}.messenger{display:grid;grid-template-columns:320px minmax(0,1fr);min-height:650px;background:#fff;border:1px solid #dfe7f0;border-radius:14px;overflow:hidden;box-shadow:0 5px 24px #163b5c0a}.conversation-list{border-right:1px solid #e4eaf1;overflow:auto;background:#fbfcfe}.conversation-item{display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:10px;align-items:center;padding:13px;border-bottom:1px solid #edf1f5}.conversation-item.active{background:#edf7f2}.conversation-avatar{width:42px;height:42px}.conversation-copy{min-width:0;display:grid;gap:2px}.conversation-copy b,.conversation-copy em{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-copy small{color:#78889c}.conversation-copy em{font-style:normal;color:#8a98aa;font-size:12px}.msg-count{min-width:22px;height:22px;padding:0 6px;display:grid;place-items:center;background:#ef5c32;color:#fff;border-radius:999px;font-size:11px;font-weight:800}.chat-panel{display:grid;grid-template-rows:auto 1fr auto auto;min-width:0;background:#f7f9fc}.chat-head{padding:14px 18px;background:#fff;border-bottom:1px solid #e5ebf2}.chat-head div{display:grid;gap:3px}.chat-head small{color:#7b8a9d}.chat-messages{padding:18px;overflow:auto;display:flex;flex-direction:column;gap:10px}.chat-bubble{max-width:min(680px,78%);padding:10px 12px;border-radius:12px;background:#fff;border:1px solid #e0e7ef;box-shadow:0 2px 8px #173b5b08}.chat-bubble.mine{align-self:flex-end;background:#eaf8f0;border-color:#cce9d9}.chat-bubble.theirs{align-self:flex-start}.chat-bubble small{display:block;margin-top:6px;color:#8290a1;font-size:11px}.message-entity{display:block;margin-top:7px;padding:7px 9px;border-radius:8px;background:#fff;color:#176448;font-weight:700}.chat-compose{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;padding:14px;background:#fff;border-top:1px solid #e2e8f0}.chat-compose textarea,.sale-note-form textarea{width:100%;border:1px solid #ccd7e4;border-radius:10px;padding:10px 12px;resize:vertical}.chat-attachment{margin:0 14px 10px;padding:9px 12px;background:#fff6e9;border:1px solid #f1dec0;border-radius:9px;display:flex;gap:8px;flex-wrap:wrap}.chat-empty,.chat-loading{margin:auto;color:#8190a3}.sale-notes-thread{display:grid;gap:10px}.sale-notes-thread article{padding:12px 14px;border:1px solid #e1e8f0;border-radius:10px;background:#fbfcfe}.sale-notes-thread article>div{display:flex;justify-content:space-between;gap:12px}.sale-notes-thread time{color:#8593a5;font-size:12px}.sale-notes-thread p{margin:8px 0 0}.sale-note-form{display:grid;gap:12px}.sale-note-form label{display:grid;gap:7px;font-weight:650}.sale-employee{color:#49637e!important}
@media(max-width:900px){.role-grid,.permissions-matrix{grid-template-columns:1fr}.permission-overrides{grid-template-columns:1fr}.messenger{grid-template-columns:260px minmax(0,1fr)}}
@media(max-width:700px){.employee-card{grid-template-columns:44px minmax(0,1fr)}.employee-actions{grid-column:1/-1}.employee-actions>*{flex:1}.permission-overrides label{grid-template-columns:1fr}.role-grid{grid-template-columns:1fr}.audit-filters{display:grid;grid-template-columns:1fr 1fr}.audit-filters button{grid-column:1/-1}.messages-page{padding-left:0!important;padding-right:0!important}.messages-page>.page-head{padding:0 14px}.messenger{display:block;min-height:0;border-left:0;border-right:0;border-radius:0}.conversation-list{display:flex;overflow-x:auto;border-right:0;border-bottom:1px solid #e4eaf1}.conversation-item{min-width:230px;border-bottom:0;border-right:1px solid #edf1f5}.chat-panel{min-height:520px}.chat-messages{height:48vh;padding:12px}.chat-bubble{max-width:88%}.chat-compose{grid-template-columns:1fr;padding:10px}.chat-compose button{width:100%}.permissions-matrix code{display:none}.mobile-quick-message{white-space:nowrap}}


/* === V21.0.1 shared operational pages === */
.ops-page{margin:0;background:#f3f5f8;color:#172238;font:15px/1.45 Inter,system-ui,Segoe UI,Arial,sans-serif}
.ops-page .wrap{width:min(1180px,calc(100% - 28px));margin:24px auto;padding:0}
.ops-page .card{background:#fff;border:1px solid #dce3eb;border-radius:14px;padding:16px;margin:12px 0;box-shadow:0 3px 14px rgba(22,43,68,.04)}
.ops-page .grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.ops-page label{min-width:0}.ops-page input,.ops-page select,.ops-page textarea{max-width:100%;box-sizing:border-box}
.ops-page table{min-width:720px}.ops-page .scroll{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.ops-page .btn,.ops-page button{min-height:40px}.ops-page .toolbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
@media(max-width:760px){.ops-page .wrap{width:min(100% - 20px,1180px);margin:12px auto 86px}.ops-page .grid{grid-template-columns:1fr}.ops-page .card{padding:13px}.ops-page h1{font-size:24px;line-height:1.2}.ops-page input,.ops-page select,.ops-page textarea,.ops-page button,.ops-page .btn{min-height:44px;font-size:16px}.ops-page .toolbar>*{flex:1 1 auto;justify-content:center}.ops-page .scroll{margin-left:-4px;margin-right:-4px}}
html[data-domovichok-pc="1"] body.ops-page{padding-top:0}


/* V21.0.2 receipt detail visibility contract — must stay last. */
body.sales-page .sales-list-panel tr.sale-view-row[hidden],
html[data-domovichok-pc="1"] body.sales-page .sales-list-panel tr.sale-view-row[hidden]{display:none!important;visibility:hidden!important;height:0!important}
body.sales-page .sales-list-panel tr.sale-view-row[hidden]>td{display:none!important}

/* V21.0.2 unified settings navigation */
.settings-tabs-unified{display:flex!important;flex-wrap:wrap!important;gap:6px!important;max-width:100%!important;overflow:visible!important}
.settings-tabs-unified>a{display:inline-flex!important;align-items:center!important;min-height:40px!important;white-space:nowrap!important}
@media(max-width:800px){.settings-tabs-unified{flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;-webkit-overflow-scrolling:touch!important;scrollbar-width:thin!important}.settings-tabs-unified>a{flex:0 0 auto!important;min-width:max-content!important}}

/* V21.0.8 — compact message actions */
.chat-bubble{position:relative;min-width:min(180px,62%);padding:9px 11px}
.chat-bubble.has-actions{padding-right:42px}
.chat-bubble .message-body{min-width:0;overflow-wrap:anywhere}
.message-actions{position:absolute;top:5px;right:5px;z-index:12}
.message-actions-toggle{width:30px;height:30px;min-width:30px;padding:0;border:1px solid transparent;border-radius:9px;background:transparent;color:#64748b;display:grid;place-items:center;font-size:20px;font-weight:800;line-height:1;cursor:pointer;opacity:0;transition:opacity .14s ease,background .14s ease,border-color .14s ease,color .14s ease}
.chat-bubble:hover .message-actions-toggle,.chat-bubble:focus-within .message-actions-toggle,.message-actions-toggle[aria-expanded="true"]{opacity:1}
.message-actions-toggle:hover,.message-actions-toggle:focus-visible,.message-actions-toggle[aria-expanded="true"]{background:#fff;border-color:#d9e3ee;color:#173b5b;outline:none;box-shadow:0 2px 8px #173b5b14}
.message-actions-menu{position:absolute;right:0;top:34px;min-width:185px;padding:5px;background:#fff;border:1px solid #dbe4ee;border-radius:10px;box-shadow:0 12px 30px #183b5d24;z-index:80}
.message-actions-menu.open-up{top:auto;bottom:34px}
.message-actions-menu[hidden]{display:none!important}
.message-actions-menu a{display:flex;align-items:center;min-height:38px;padding:8px 10px;border-radius:7px;color:#173b5b;text-decoration:none;font-size:13px;font-weight:700;white-space:nowrap}
.message-actions-menu a:hover,.message-actions-menu a:focus-visible{background:#edf7f2;color:#176448;outline:none}
@media (hover:none),(pointer:coarse){.message-actions-toggle{opacity:1;width:34px;height:34px;min-width:34px}.chat-bubble.has-actions{padding-right:46px}}
@media(max-width:700px){.chat-bubble{min-width:0;max-width:91%;padding:9px 10px}.chat-bubble.has-actions{padding-right:44px}.message-actions{top:4px;right:4px}.message-actions-menu{position:fixed;left:12px;right:12px;top:auto;bottom:78px;min-width:0;z-index:1200;padding:7px;border-radius:13px}.message-actions-menu.open-up{top:auto;bottom:78px}.message-actions-menu a{min-height:44px;font-size:14px}}
