/* Shared, contained layout improvements; existing modules retain their design. */
html,body{max-width:100%;overflow-x:hidden}
.layout{height:100dvh}.main,.content,.tb-l,.tb-title-wrap{min-width:0}
.sb{overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--border2) transparent}
.sb-logo,.sb-sect,.sb-nav,.sb-foot{flex-shrink:0}.sb-logo{position:relative}
.sa-menu-close{display:none!important}
.tb-title,.tb-sub{overflow:hidden;text-overflow:ellipsis}
.content>div,.content>section{min-width:0}
.tw,.inventory-wrap{max-width:100%;overscroll-behavior-x:contain}
button,a,input,select,textarea,summary{-webkit-tap-highlight-color:transparent}
button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible,summary:focus-visible,[tabindex]:focus-visible{outline:2px solid #72b8ff;outline-offset:3px}
body:not(.role-admin) #nav-chek{display:none!important}
body[data-page="chek"] #platform-notice,body[data-page="chek"] #tb-plat{display:none!important}
#nav-chek{gap:12px;min-height:62px;margin-top:5px}
#nav-chek.on{background:linear-gradient(110deg,rgba(64,178,193,.17),rgba(79,140,255,.08));border-color:rgba(91,201,215,.33)}
.chek-nav-mark{width:35px;height:35px;border-radius:11px;display:grid;place-items:center;flex-shrink:0;font-size:21px;font-weight:800;color:#8de8e4;background:linear-gradient(145deg,#1b404b,#142b39);border:1px solid #376371}
#pg-chek{--chek-accent:#80e1d7;max-width:1500px;margin:0 auto;padding-bottom:20px}
#pg-chek [hidden]{display:none!important}
.chek-hero{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:26px;padding:25px 27px;border:1px solid #27394b;border-radius:19px;background:radial-gradient(ellipse at 92% 0%,rgba(66,167,183,.11),transparent 60%),linear-gradient(120deg,#121e2e,#101926)}
.chek-eyebrow{display:flex;align-items:center;gap:9px;font-size:10px;font-weight:750;letter-spacing:.13em;color:#91a9c5}
.chek-mark{display:inline-grid;place-items:center;width:25px;height:25px;border:1px solid #3e6e74;border-radius:8px;background:#173239;color:var(--chek-accent);font-size:15px;letter-spacing:0}
.chek-hero h2{font-size:29px;line-height:1.3;font-weight:750;margin:12px 0 7px;letter-spacing:-.5px}
.chek-hero h2 span{font-size:21px;font-weight:450;color:#aabbd1;margin-left:10px;letter-spacing:-.3px}
.chek-hero p{font-size:13px;line-height:1.6;color:var(--txt2)}
.chek-sync{display:flex;align-items:center;gap:11px;flex-shrink:0;padding:13px 15px;background:#0d1623a6;border:1px solid var(--border);border-radius:12px}
.chek-sync strong{display:block;font-size:12px;font-weight:600}.chek-sync small{display:block;font-size:10px;color:var(--txt2);line-height:1.6;margin-top:3px}
.chek-sync .ibtn{width:38px;height:38px;margin-left:6px}
.chek-dot{width:7px;height:7px;border-radius:50%;background:#68758a;display:inline-block;flex-shrink:0}
.chek-dot.is-online{background:#65dcb0;box-shadow:0 0 0 4px #65dcb010}.chek-dot.is-error{background:#ffc370}
.chek-notice{padding:14px 17px;background:#332918;border:1px solid #625131;color:#ffe0a9;border-radius:12px;margin-bottom:18px;font-size:13px;line-height:1.6}
.chek-workspace{display:grid;grid-template-columns:245px minmax(0,1fr);gap:22px;align-items:start}
.chek-devices{padding:19px 14px;background:var(--bg2);border:1px solid var(--border);border-radius:16px;min-width:0}
.chek-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0}
.chek-section-heading h3{font-size:14px;font-weight:650;line-height:1.5}.chek-section-heading>span{font-size:10px;color:var(--txt2);white-space:nowrap}
.chek-section-heading p{font-size:11px;color:var(--txt2);margin-top:4px;line-height:1.5}
.chek-device-list{display:grid;gap:7px;margin-top:17px}
.chek-device{display:flex;align-items:center;gap:10px;padding:13px 10px;width:100%;min-height:69px;background:transparent;border:1px solid transparent;border-radius:10px;text-align:left;color:var(--txt);cursor:pointer}
.chek-device:hover{background:var(--bg3)}.chek-device.selected{background:#142834;border-color:#325467}
.chek-device>span:nth-child(2){flex:1;min-width:0}.chek-device strong{display:block;font-size:12px;font-weight:600;overflow-wrap:anywhere;line-height:1.45}.chek-device small{display:block;margin-top:5px;font-size:10px;color:var(--txt2)}
.chek-device-icon{width:30px;height:33px;display:grid;place-items:center;color:#8ea8c5;background:#203447;border-radius:8px;font-size:17px;flex-shrink:0}
.chek-side-note{padding:15px 6px 0;margin-top:12px;border-top:1px solid var(--border);font-size:11px;line-height:1.75;color:var(--txt2)}
.chek-mobile-select{display:none}.chek-main{display:grid;gap:19px;min-width:0}
.chek-control,.chek-panel{min-width:0;background:var(--bg2);border:1px solid var(--border);border-radius:16px;overflow:hidden}
.chek-control{padding:24px}.chek-control-heading{display:flex;align-items:start;justify-content:space-between;gap:15px}.chek-control-heading>div{min-width:0}
.chek-control h3{font-size:22px;margin:8px 0 5px;font-weight:650;overflow-wrap:anywhere;line-height:1.4}.chek-control-heading p{font-size:11px;color:var(--txt2)}
.chek-badge{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border:1px solid #354255;border-radius:7px;font-size:10px;color:#a1adc0;white-space:nowrap;flex-shrink:0}
.chek-badge.is-online{color:#86e4bb;background:#132c28;border-color:#295148}
.chek-current{display:flex;align-items:end;justify-content:space-between;gap:12px;margin:25px 0 21px;padding:18px 0;border-top:1px solid var(--border);border-bottom:1px solid var(--border)}
.chek-caption{display:block;color:var(--txt2);font-size:11px;line-height:1.5}.chek-current strong{display:block;font-size:27px;margin-top:4px;font-weight:600;line-height:1.25;letter-spacing:-.6px}
.chek-current strong[data-state="running"]{color:var(--chek-accent)}.chek-current strong[data-state="paused"],.chek-current strong[data-state="pausing"]{color:#ffd28e}.chek-current>span{font-size:11px;color:var(--txt2);text-align:right}
.chek-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.chek-list-control{display:flex;align-items:center;gap:15px;padding:13px;margin-bottom:16px;border:1px solid #304961;background:linear-gradient(100deg,#152d43,#142132);border-radius:11px}
.chek-list-control p{font-size:11px;color:#b0c2d7;line-height:1.65;min-width:0}
.chek-list-control .chek-reload-list{min-width:156px;min-height:46px;padding:10px 16px;background:#315d87;border-color:#5b8bb9;color:#f3f8ff;flex-shrink:0}
.chek-list-control .chek-reload-list:hover:enabled{background:#3f75a7;border-color:#82b2dd}
.chek-action{min-height:44px;border:1px solid #334760;border-radius:9px;background:#192638;color:#d5e0f0;font-size:12px;font-weight:600;display:flex;align-items:center;justify-content:center;gap:7px;cursor:pointer;transition:background .15s,border-color .15s}
.chek-action i{font-size:17px}.chek-action:hover:enabled{background:#263b54;border-color:#557ba4}.chek-action-primary{background:#70d4ca;color:#08292c;border-color:#70d4ca}.chek-action-primary:hover:enabled{background:#96e6de;border-color:#96e6de}.chek-action-stop{color:#ffaab1;border-color:#69414b;background:#35232d}
.chek-action:disabled{opacity:.32;cursor:not-allowed}.chek-control-help{font-size:11px;color:var(--txt2);line-height:1.6;margin-top:13px}
.chek-order{display:flex;align-items:center;gap:12px;padding:13px 15px;margin-top:19px;border:1px solid #425775;background:#18243a;border-radius:10px}
.chek-order>div{min-width:0;flex:1}.chek-order strong{font-size:12px;font-weight:600;line-height:1.6}.chek-order p{font-size:11px;color:var(--txt2);line-height:1.6;margin-top:3px}.chek-order-icon{font-size:19px;color:#9dc5ff}.chek-order[data-status="applied"]{background:#132b29;border-color:#2d4e46}.chek-order[data-status="applied"] .chek-order-icon{color:#83ddb3}.chek-order .xb{min-height:40px;white-space:nowrap}
.chek-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.chek-metric{padding:17px 18px;border-radius:13px;border:1px solid var(--border);background:var(--bg2);min-width:0}.chek-metric>span{font-size:10px;color:var(--txt2);display:flex;align-items:center;gap:7px;line-height:1.5}.chek-metric i{font-size:15px}.chek-metric strong{display:block;font-size:25px;line-height:1.4;margin:8px 0 2px;letter-spacing:-.7px;overflow-wrap:anywhere}.chek-metric small{display:block;font-size:10px;color:var(--txt2);line-height:1.6}.chek-metric-hits strong{color:var(--chek-accent)}.chek-metric-traffic{grid-column:span 2}.chek-metric-traffic strong{font-size:23px}
.chek-panel>.chek-section-heading{padding:19px 21px}.chek-table-wrap{overflow-x:auto;max-width:100%;scrollbar-width:thin;scrollbar-color:var(--border2) transparent}.chek-table{border-collapse:collapse;width:100%;font-size:12px;text-align:left;white-space:nowrap}.chek-table th{font-weight:500;color:#8ca0ba;background:#101a29;font-size:10px;padding:11px 20px;border-bottom:1px solid var(--border)}.chek-table td{padding:13px 20px;color:#bccbdc;border-bottom:1px solid #1c2a3d}.chek-table tr:last-child td{border-bottom:0}.chek-process-number{display:inline-grid;place-items:center;width:25px;height:25px;margin-right:10px;border-radius:6px;background:#1a2b40;color:#a6bfdd;font-size:10px}.chek-worker-state{display:inline-flex;align-items:center;gap:7px}.chek-worker-state:before{content:'';width:5px;height:5px;background:#667f9d;border-radius:50%}.chek-worker-state.checking:before{background:#71b8fa}.chek-worker-state.success:before{background:#7fdcb5}.chek-worker-state.error:before,.chek-worker-state.failed:before{background:#dca66f}.chek-table .chek-table-empty{text-align:center;white-space:normal;padding:30px;color:var(--txt2)}
.chek-history summary{display:flex;align-items:center;gap:10px;padding:18px 21px;min-height:55px;cursor:pointer;font-size:13px;font-weight:600;list-style:none}.chek-history summary::-webkit-details-marker{display:none}.chek-history summary span{font-size:10px;color:var(--txt2);background:var(--bg3);padding:3px 7px;border-radius:5px}.chek-history summary svg{margin-left:auto;transition:transform .15s}.chek-history[open] summary svg{transform:rotate(180deg)}.chek-history-row{display:grid;grid-template-columns:90px minmax(0,1fr) 75px;align-items:center;gap:12px;padding:13px 21px;border-top:1px solid var(--border);font-size:11px;line-height:1.5}.chek-history-status{color:var(--txt2)}.chek-history-status.is-online{color:#83ddb3}.chek-history-row time{color:var(--txt2);font-size:10px;text-align:right}.chek-history-empty{padding:5px 21px 22px;color:var(--txt2);font-size:12px}
.chek-empty{text-align:center;padding:65px 22px;background:var(--bg2);border:1px solid var(--border);border-radius:18px}.chek-empty-icon{display:inline-grid;place-items:center;width:58px;height:58px;border-radius:17px;font-size:29px;background:#192c40;color:#9ec3dc;border:1px solid #304961;margin-bottom:22px}.chek-empty h3{font-size:20px;font-weight:600;margin-bottom:11px}.chek-empty p{color:var(--txt2);font-size:13px;line-height:1.6}
.chek-links summary{display:flex;align-items:center;gap:13px;min-height:64px;padding:18px 21px;list-style:none;cursor:pointer}.chek-links summary::-webkit-details-marker{display:none}.chek-links-title{display:flex;align-items:center;gap:10px;font-size:14px;font-weight:650}.chek-links-title svg{color:#99c5ee}.chek-links summary>span:nth-child(2){margin-left:auto;font-size:11px;color:var(--txt2);text-align:right}.chek-links summary>svg{flex-shrink:0;color:var(--txt2);transition:transform .15s}.chek-links[open] summary>svg{transform:rotate(180deg)}.chek-links[open] summary{border-bottom:1px solid var(--border)}
.chek-links-body{padding:21px;display:grid;gap:15px;min-width:0}.chek-links-toolbar{display:flex;align-items:center;justify-content:space-between;gap:15px;min-width:0}.chek-links-toolbar>div{min-width:0}.chek-links-toolbar h3{font-size:14px;font-weight:650;margin-bottom:5px}.chek-links-toolbar p{font-size:11px;color:var(--txt2);line-height:1.6}.chek-links .xb{min-height:42px;line-height:1.4;white-space:normal}.chek-links-toolbar .xb{flex-shrink:0;padding:9px 13px;max-width:230px}
.chek-links-modes{display:flex;gap:5px;padding:5px;border:1px solid var(--border);border-radius:10px;background:#0a1321}.chek-links-modes button{flex:1;min-width:0;min-height:42px;padding:9px;border:1px solid transparent;border-radius:7px;background:transparent;color:#97abc4;font-size:12px;cursor:pointer}.chek-links-modes button[aria-pressed="true"]{background:#213b55;border-color:#355675;color:#e0f0ff}.chek-links-modes button:disabled{opacity:.5;cursor:not-allowed}
.chek-links-editor-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:-4px}.chek-links-editor-head>label:first-child{font-size:11px;color:#bacce1;line-height:1.5}.chek-links-file{position:relative;display:flex;align-items:center;justify-content:center;gap:8px;flex-shrink:0;min-width:117px;cursor:pointer}.chek-links-file input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.chek-links-file:has(input:disabled){opacity:.4;cursor:not-allowed}.chek-links-file:focus-within{outline:2px solid #72b8ff;outline-offset:3px}
.chek-links textarea{display:block;width:100%;max-width:100%;min-width:0;min-height:240px;resize:vertical;background:#09121f;border:1px solid #344e6d;border-radius:11px;padding:14px;color:#d9e9fc;font:12px/1.75 ui-monospace,SFMono-Regular,Consolas,monospace;tab-size:2;overflow-wrap:anywhere}.chek-links textarea:disabled{color:#75859a;border-color:var(--border);background:#0b1320}.chek-links textarea:focus{border-color:#78afd9;outline:2px solid #78afd921;outline-offset:1px}.chek-links-editor-meta{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:-6px;font-size:10px;color:var(--txt2);line-height:1.6}.chek-links-editor-meta .is-error{color:#ffbc95}.chek-links-help{font-size:11px;color:var(--txt2);line-height:1.6;margin-top:-8px}
.chek-links-message{padding:12px 14px;background:#152637;border:1px solid #304a63;color:#c7dbef;font-size:12px;line-height:1.6;border-radius:10px}.chek-links-conflict,.chek-links-confirm{background:#30271c;border:1px solid #665238;padding:14px;border-radius:10px;color:#ffe3b8;font-size:12px;line-height:1.65}.chek-links-conflict>strong{font-weight:650}.chek-links-conflict p{font-size:11px;margin:6px 0 12px;color:#dbbf98}.chek-links-conflict label{display:block;margin:13px 0 8px;font-size:11px}.chek-links-conflict textarea{min-height:150px;margin-bottom:12px;border-color:#70553a}.chek-links-conflict .xb{margin:4px 7px 0 0}.chek-links-confirm{margin-top:12px;background:#3d2d1c}.chek-links-confirm label{display:flex;align-items:start;gap:9px;cursor:pointer}.chek-links-confirm input{accent-color:#f0c487;width:18px;height:18px;flex-shrink:0;margin-top:3px}.chek-links-confirm p{margin:0 0 10px}
.chek-links-footer{display:flex;align-items:center;justify-content:space-between;gap:18px;border-top:1px solid var(--border);padding-top:16px}.chek-links-footer p{font-size:11px;color:var(--txt2);line-height:1.65;max-width:390px}.chek-links-footer button{padding:11px 18px;flex-shrink:0;min-height:45px;min-width:190px}.chek-links-storage-warning{color:#ffcd8b;font-size:11px;line-height:1.6}
@media(min-width:1600px){.chek-metrics{grid-template-columns:repeat(5,minmax(0,1fr))}.chek-metric-traffic{grid-column:auto}}
@media(max-width:1250px){.chek-workspace{grid-template-columns:200px minmax(0,1fr);gap:16px}.chek-hero{align-items:start;flex-direction:column;gap:19px}.chek-sync{width:100%}.chek-sync .ibtn{margin-left:auto}.chek-hero h2 span{font-size:19px}.chek-control{padding:20px}}
@media(max-width:980px){.chek-workspace{grid-template-columns:minmax(0,1fr)}.chek-devices{padding:15px 18px}.chek-device-list{display:none}.chek-mobile-select{display:grid;gap:8px;font-size:11px;color:var(--txt2);margin-top:13px}.chek-mobile-select select{width:100%;font-size:14px;min-height:44px}.chek-side-note{border:0;padding:0;margin-top:10px}.chek-hero{padding:22px}}
@media(max-width:820px){
 .layout{height:100dvh}.sb{width:min(300px,calc(100vw - 48px));height:100dvh;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}
 .sb-logo{padding-right:52px}.sa-menu-close{display:grid!important;place-items:center;position:absolute;right:12px;top:17px;width:36px;height:36px}
 .sb-btn,.sb-plat{min-height:44px}.sb-foot .xb{min-height:40px}.content{padding-bottom:calc(24px + env(safe-area-inset-bottom))}
 .topbar{gap:10px;padding-left:12px;padding-right:12px;flex-shrink:0}.tb-l{gap:10px}.tb-title{max-width:100%;white-space:nowrap}.tb-r{gap:7px;flex-shrink:0}.tb-r .sync-state{display:none}.mobile-menu,.tb-r .ibtn,.tb-r .pbtn{min-width:42px;min-height:42px}
 .ph,.page-header,.phead{flex-wrap:wrap;gap:13px}.ph>*{min-width:0}.ph-right{flex-wrap:wrap}
 .fi,.fsel,.login-input,input[type="email"],input[type="password"],input[type="search"],textarea{font-size:16px!important}
 .fi,.fsel{min-height:44px}.xb,.pbtn,.dbtn,.sbtn{min-height:40px}
 .inventory-wrap .mini-btn,.inventory-wrap .xb,.inventory-wrap button{min-width:40px;min-height:40px!important}
 .inventory-wrap .t2 td{height:auto!important;padding-top:8px!important;padding-bottom:8px!important}
 .md,.modal{width:calc(100% - 24px)!important;max-width:620px;max-height:calc(100dvh - 30px);overflow-y:auto;margin:auto}
 #pg-chek{padding-bottom:5px}.chek-hero{margin-bottom:18px}.chek-main{gap:15px}.chek-workspace{gap:15px}
 .chek-action{min-height:46px}.chek-control-help,.chek-side-note{font-size:12px}.chek-sync small{font-size:11px}
}
@media(max-width:560px){
 .login-screen{padding:0;overflow-y:auto}.login-showcase{min-height:185px!important;padding:28px 25px!important}.login-entry{padding:26px 22px!important;min-width:0}.login-form,.login-box{max-width:100%;min-width:0}.login-input{width:100%;min-height:48px}.login-submit{min-height:48px}
 .topbar .tb-sub,.tb-r .top-add-label{display:none}.tb-title{font-size:17px}.content{padding-left:12px;padding-right:12px}
 .frow,.frow3{grid-template-columns:minmax(0,1fr)}.search-wrap{min-width:0;max-width:100%}.toolbar,.flt-bar,.filters{flex-wrap:wrap}.toolbar>*,.flt-bar>*{min-width:0;max-width:100%}
 .chek-hero{padding:17px 18px;gap:13px;border-radius:15px}.chek-hero .chek-eyebrow,.chek-hero p{display:none}.chek-hero h2{font-size:24px;margin:0}.chek-hero h2 span{display:block;margin:4px 0 0;font-size:16px}.chek-sync{padding:9px 10px;gap:9px}.chek-sync strong{font-size:11px}.chek-sync small{font-size:10px}.chek-sync .ibtn{width:36px;min-width:36px;height:36px}
 .chek-devices{border-radius:13px;padding:15px}.chek-mobile-select{font-size:0;gap:0;margin-top:10px}.chek-side-note{font-size:10px;line-height:1.5;margin-top:9px}.chek-control{padding:18px 16px}.chek-control-heading{gap:9px}.chek-control h3{font-size:19px}.chek-control-heading .chek-eyebrow{font-size:9px;letter-spacing:.07em}.chek-badge{padding:6px 8px;font-size:9px}.chek-current{margin:20px 0 17px;align-items:center}.chek-current strong{font-size:25px}.chek-current>span{max-width:88px;line-height:1.6;font-size:10px}.chek-caption{font-size:10px}
 .chek-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.chek-action{font-size:13px}.chek-order{align-items:start;flex-wrap:wrap;padding:12px}.chek-order .xb{margin-left:28px;min-height:44px}.chek-order strong{font-size:11px}
 .chek-list-control{flex-direction:column;align-items:stretch;gap:7px;padding:10px;margin-bottom:14px}.chek-list-control .chek-reload-list{width:100%;min-width:0}.chek-list-control p{font-size:10px;text-align:center;line-height:1.5}
 .chek-links summary{padding:16px;gap:10px;flex-wrap:wrap}.chek-links summary>span:nth-child(2){font-size:10px;max-width:175px}.chek-links-title{font-size:13px}.chek-links-body{padding:16px;gap:14px}.chek-links-toolbar{align-items:stretch;flex-direction:column;gap:11px}.chek-links-toolbar .xb{max-width:none;width:100%;min-height:44px}.chek-links-modes button{font-size:11px;min-height:45px;padding:8px}.chek-links-editor-head{gap:10px}.chek-links-editor-head>label:first-child{font-size:10px}.chek-links .xb{min-height:44px}.chek-links-file{min-width:111px;font-size:11px}.chek-links textarea{font-size:16px!important;line-height:1.65;min-height:280px;padding:12px}.chek-links-editor-meta{align-items:start;flex-direction:column;gap:2px;font-size:10px}.chek-links-help,.chek-links-footer p{font-size:11px}.chek-links-footer{align-items:stretch;flex-direction:column;gap:12px}.chek-links-footer button{width:100%;min-height:46px;font-size:13px}.chek-links-conflict,.chek-links-confirm{padding:12px}.chek-links-conflict .xb{width:100%;margin-right:0}.chek-links-conflict textarea{min-height:170px}
 .chek-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.chek-metric{padding:15px 14px}.chek-metric strong{font-size:25px}.chek-metric-traffic{grid-column:span 2}.chek-metric>span{font-size:10px;gap:5px}.chek-metric small{font-size:10px}.chek-metric-traffic>span{font-size:11px}
 .chek-panel>.chek-section-heading{padding:17px 16px}.chek-section-heading h3{font-size:13px}.chek-section-heading p{font-size:10px}.chek-table th,.chek-table td{padding-left:13px;padding-right:13px}.chek-table{font-size:11px;min-width:400px}.chek-process-number{display:none}.chek-history summary{padding:17px 16px}.chek-history-row{padding:12px 16px;grid-template-columns:67px minmax(0,1fr);gap:5px 9px;font-size:10px}.chek-history-row time{grid-column:2;text-align:left;font-size:9px}
}
@media(prefers-reduced-motion:reduce){.chek-action,.chek-history summary i,.sb{transition:none!important}}
