:root{--teal:#0755a1;--navy:#09284c;--navy2:#123c67;--gold:#cc941f}
.sg-brand-logo{width:52px;height:46px;object-fit:contain}.company-picker{margin-bottom:18px;border-left:4px solid var(--gold);padding:14px 18px}.company-picker form{display:flex;align-items:center;gap:20px;flex-wrap:wrap}.company-picker label{display:flex;align-items:center;gap:12px;font-weight:750}.company-picker select{min-width:250px}.company-picker span{font-size:12px;color:#52677d}
.sg-login-page{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:32px 16px;background:radial-gradient(ellipse at 5% 80%,#f5e8c8,transparent 42%),radial-gradient(ellipse at 100% 15%,#f2e5c6,transparent 35%),#fffcf4;position:relative}.sg-login-page:before,.sg-login-page:after{content:'❧';position:absolute;font-size:340px;line-height:1;color:#dfb95826;pointer-events:none}.sg-login-page:before{right:0;top:0;transform:rotate(60deg)}.sg-login-page:after{right:0;bottom:0;transform:rotate(-60deg)}
.sg-login-card{position:relative;z-index:1;width:min(540px,100%);padding:28px 44px 34px;background:#ffffffdf;border:1px solid #c7942d;border-radius:15px;box-shadow:0 20px 50px #a87b2420;text-align:center}.sg-login-logo{width:220px;height:148px;object-fit:contain}.sg-login-card h1{font-family:Georgia,'Times New Roman',serif;color:#082652;font-size:34px;line-height:1.12;margin:12px 0 10px}.sg-gold-line{display:flex;align-items:center;justify-content:center;gap:16px;color:#c99527;font-size:30px}.sg-gold-line:before,.sg-gold-line:after{content:'';height:1px;width:95px;background:#c99527}.sg-login-subtitle{font-size:18px;color:#646b79;margin:12px 0 28px}.sg-login-card .field{text-align:left;margin-bottom:20px}.sg-login-card .field label{font-size:15px;color:#082652}.sg-login-card .input{height:51px;font-size:16px;border-radius:9px;background:#fff}.sg-password{position:relative}.sg-password .input{padding-right:45px}.sg-password button{position:absolute;right:8px;top:8px;width:34px;height:34px;border:0;background:none;color:#5e6a7e;font-size:21px;cursor:pointer}.sg-remember{display:flex;gap:10px;align-items:center;color:#092852;margin:8px 0 25px;font-size:15px}.sg-remember input{width:20px;height:20px;accent-color:#0755a1}.sg-login-button{width:100%;height:58px;background:linear-gradient(#0759a8,#052a58);color:#fff;border:0;border-radius:10px;letter-spacing:4px;font-size:18px;cursor:pointer;box-shadow:0 8px 20px #09284c18}.sg-login-button span{margin-left:14px;font-size:25px}.sg-login-footer{color:#77808d;letter-spacing:5px;font-size:12px;margin-top:34px}.sg-login-footer:before,.sg-login-footer:after{content:'—';color:#c99527;margin:0 14px}
.sg-paper-control{display:flex;gap:8px;align-items:center;font-size:13px;margin:8px 0}.sg-paper-control select{padding:7px;border:1px solid #ccd6e0;border-radius:6px}
@media screen and (max-width:800px){.company-picker{padding:12px}.company-picker form,.company-picker label{display:block}.company-picker select{min-width:0;width:100%;margin:7px 0}.main{padding:12px!important}.form-grid{gap:12px}.field[class*=col-]{grid-column:span 12}.input,.select{min-height:46px;font-size:16px}.btn{min-height:44px}.bag-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.grid.g3{display:block}.grid.g3>.card{margin-bottom:14px}.side{position:static!important;top:auto!important;height:auto!important;padding:6px!important}.side .nav-title{display:none}.side .nav{display:flex;gap:4px;flex-wrap:wrap}.side .nav a{font-size:12px;padding:8px!important}.layout{display:block!important}.top .brand{font-size:13px}.sg-brand-logo{width:38px;height:38px}.table-wrap{overflow-x:auto}.sg-login-card{padding:22px}.sg-login-card h1{font-size:28px}.sg-login-logo{width:190px;height:130px}}
@media print{.company-picker,.sg-paper-control{display:none!important}}

.sg-mobile-menu{display:none}@media screen and (max-width:800px){.sg-mobile-menu{display:block;width:100%;text-align:left;padding:11px 16px;border:0;background:#09284c;color:#fff;font-weight:700}.side{display:none}.side.sg-open{display:block}.sg-login-card .sg-login-logo{height:120px}.sg-login-card h1{margin-top:4px}}

.calc .field label{color:#edf4ff}.calc .input{color:#172b4d}

.sg-leave-overlay{position:fixed;inset:0;background:#0008;z-index:9999;display:flex;align-items:center;justify-content:center;padding:16px}.sg-leave-overlay[hidden]{display:none}.sg-leave-overlay>.card{max-width:480px;width:100%}

.sg-pagination{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin:14px 0;font-size:12px;color:#52677d}.sg-selected-basket:empty{display:none}.sg-selected-basket{padding:12px;background:#eef5fc;border-radius:9px;margin-bottom:12px}.sg-selected-line{display:flex;gap:12px;align-items:center;justify-content:space-between;padding:6px 0;border-bottom:1px solid #d8e4f1}.sg-selected-line span{overflow-wrap:anywhere}.sg-selected-line .btn{flex-shrink:0}

[hidden]{display:none!important}

/* Warehouse: roomy desktop tables, labelled cards on handheld terminals. */
@media screen {
 .sg-warehouse,.sg-warehouse .card,.sg-warehouse .field{min-width:0;box-sizing:border-box}
 .sg-warehouse .table-wrap{max-width:100%;overflow-x:auto!important}
 .sg-warehouse .sg-wh-pending{min-width:940px}
 .sg-warehouse .sg-wh-history{min-width:760px}
 .sg-warehouse .sg-wh-stock{min-width:600px}
 .sg-warehouse .sg-wh-table td,.sg-warehouse .sg-wh-table th{word-break:normal;overflow-wrap:break-word}
 .sg-warehouse .btn{white-space:normal;word-break:normal}
}
@media screen and (max-width:800px){
 .sg-warehouse{width:100%;max-width:100%}
 .sg-warehouse>.card{padding:16px!important}
 .sg-warehouse h1{font-size:24px!important;line-height:1.25!important}
 .sg-warehouse h2{font-size:20px!important;line-height:1.3!important;overflow-wrap:break-word!important;word-break:normal!important}
 .sg-warehouse .form-grid>.card[class*=col-]{grid-column:1/-1!important}
 .sg-warehouse .form-grid>.btn{grid-column:1/-1!important;width:100%!important}
 .sg-warehouse .input,.sg-warehouse .select{box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:100%!important;height:48px!important;font-size:16px!important}
 .sg-warehouse .actions{flex-wrap:wrap!important;gap:8px!important}
 .sg-warehouse .actions>.btn{flex:1 1 80px!important;padding:10px!important;min-height:44px!important}
 .sg-warehouse .table-wrap{overflow:visible!important;border:0!important;background:transparent!important;box-shadow:none!important}
 .sg-warehouse .sg-wh-table{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;table-layout:auto!important;border:0!important;background:transparent!important}
 .sg-warehouse .sg-wh-table tbody{display:block!important;width:100%!important}
 .sg-warehouse .sg-wh-table tr{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:12px!important;padding:14px!important;margin:12px 0!important;border:1px solid #dce5ef!important;border-radius:12px!important;background:#fff!important;width:100%!important;box-sizing:border-box!important}
 .sg-warehouse .sg-wh-table tr.sg-wh-head{display:none!important}
 .sg-warehouse .sg-wh-table td,.sg-warehouse .sg-wh-table th{display:block!important;width:auto!important;min-width:0!important;max-width:100%!important;padding:0!important;border:0!important;text-align:left!important;white-space:normal!important;word-break:normal!important;overflow-wrap:break-word!important;font-size:15px!important;line-height:1.45!important;box-sizing:border-box!important;background:transparent!important}
 .sg-warehouse .sg-wh-table [data-label]::before{content:attr(data-label);display:block;font-size:12px;line-height:1.3;font-weight:700;color:#64778e;margin-bottom:5px}
 .sg-warehouse .sg-wh-table .sg-wh-wide,.sg-warehouse .sg-wh-table [colspan]{grid-column:1/-1!important}
 .sg-warehouse .sg-wh-table input[type=checkbox]{width:26px!important;height:26px!important;min-height:26px!important;margin:3px 0!important;accent-color:#0755a1}
 .sg-warehouse .sg-wh-table details{margin-top:6px!important}
 .sg-warehouse .sg-wh-table summary{padding:7px 0!important;min-height:36px!important}
 .sg-warehouse .sg-wh-table small{font-size:13px!important;line-height:1.5!important}
 .sg-warehouse .sg-wh-actions .btn:not([hidden]){display:inline-flex!important;align-items:center!important;justify-content:center!important;width:auto!important;min-width:85px!important;min-height:44px!important;white-space:nowrap!important;word-break:normal!important;margin:4px 6px 0 0!important;padding:10px 14px!important}
 .sg-warehouse .sg-wh-total{background:#edf5fc!important;font-weight:800!important}
 .sg-warehouse form[action="/warehouse/receive"]>button{width:100%!important;margin-top:10px!important;min-height:48px!important;padding:12px!important}
}

.sg-warehouse [hidden]{display:none!important}

.sg-wh-item-link{color:#0755a1;font-weight:750;text-decoration:underline;text-underline-offset:3px}
.sg-warehouse [data-detail-url]{cursor:pointer}.sg-warehouse [data-detail-url]:focus{outline:2px solid #0755a1;outline-offset:2px}
@media screen and (min-width:801px){.sg-warehouse .sg-wh-detail{min-width:1500px}}

/* ADHAT Master: edit controls must not squeeze beside the summary on terminals. */
@media screen and (max-width:800px){
 .adhat-mobile-card .adhat-row{display:block!important;min-width:0!important}
 .adhat-mobile-card .adhat-view{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;align-items:start!important;gap:12px!important}
 .adhat-mobile-card .adhat-view>div:nth-child(n+3){grid-column:1/-1!important}
 .adhat-mobile-card .adhat-value{font-size:14px!important;line-height:1.4!important;word-break:normal!important;overflow-wrap:break-word!important}
 .adhat-mobile-card .adhat-view .muted{font-size:12px!important}
 .adhat-mobile-card .adhat-edit{grid-template-columns:minmax(0,1fr)!important;width:100%!important;gap:10px!important}
 .adhat-mobile-card .adhat-edit .input{width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important;height:46px!important;font-size:16px!important}
 .adhat-mobile-card .adhat-edit .btn{width:100%!important;min-height:44px!important;grid-column:1/-1!important}
}
