:root{--blue:#126fae;--border:#abb8c6;--pale:#e5edf4}body{font:13px Arial,sans-serif;background:#e4e9ee;color:#203247}main{max-width:1600px;padding:12px}h1{font-size:18px;margin:8px 0}nav{padding:10px;gap:18px}nav a{text-decoration:none}form.workspace{padding:0;border:1px solid #7c93ac;border-radius:3px;background:#eef1f4;box-shadow:0 3px 16px #19344d18;margin:8px 0}.titlebar{display:flex;justify-content:space-between;background:#365c87;color:#fff;padding:9px 12px}.toolbar{display:flex;align-items:center;gap:6px;padding:5px 10px;background:#dde5ed}.toolbar label{display:flex;align-items:center;gap:8px}.toolbar input{width:300px}button,input,select,textarea{font:inherit;margin:0;padding:5px 7px;border-radius:2px}input,select,textarea{border:1px solid var(--border);background:#fff;width:100%;min-width:0}button{min-height:30px;background:linear-gradient(#fff,#d9e2eb);border:1px solid #9eafbf;color:#233c52}button:hover{background:#d5eafe}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid #126fae;outline-offset:1px}button.primary,[role=tab][aria-selected=true]{background:linear-gradient(#20b5ef,#0870ae);color:white;border-color:#00679e}fieldset{border:1px solid var(--border);padding:8px;min-width:0;margin:0}legend{color:#325f84;font-weight:bold;padding:0 4px}fieldset label{display:grid;grid-template-columns:112px minmax(0,1fr);gap:5px;align-items:center;margin:4px 0}.header-grid{display:grid;grid-template-columns:1.15fr 1fr .95fr;gap:8px;padding:8px}.muted{color:#586777;font-size:12px;line-height:1.45;margin:5px 0}.vehicle{margin:0 8px 8px}.vehicle-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;padding:8px}.vehicle-grid label{font-size:12px;display:grid;gap:3px}.tabs{display:flex;align-items:center;gap:3px;background:#ccd8e5;padding:4px 8px}.tabs button{min-width:100px}.tabs span{margin-left:auto;color:#4c637b}.item-grid{font-size:12px;min-width:1040px;table-layout:fixed}.item-grid th{background:linear-gradient(#278fd7,#116cb4);color:white;padding:6px 4px;border:1px solid #87b4d7;font-weight:normal}.item-grid th:nth-child(1){width:32px}.item-grid th:nth-child(2){width:85px}.item-grid th:nth-child(3){width:225px}.item-grid th:last-child{width:38px}.item-grid td{border:1px solid #c3cbd2;padding:4px;vertical-align:top}.item-grid tr:nth-child(even){background:#f0f3f7}.item-grid input{padding:4px;font-size:12px}.item-grid small{display:block;padding:3px 0}.item-grid details{margin-top:5px}.item-grid details label{display:block;margin:5px 0}.item-grid tr.selected{background:#d9eefb}.service-grid th:nth-child(2){width:40%}.service-grid th:nth-child(3){width:120px}section[role=tabpanel]{min-height:270px;background:repeating-linear-gradient(white 0,white 30px,#e6ebef 31px);padding-bottom:8px}.empty{padding:30px;text-align:center;color:#61778c}.bottom-grid{display:grid;grid-template-columns:1fr 1.2fr .8fr;gap:8px;padding:8px}.totals div{display:flex;justify-content:space-between;padding:5px 0}.totals label{grid-template-columns:1fr 100px}.totals input{text-align:right}.grand{font-size:18px;font-weight:bold;border-top:2px solid var(--border);margin-top:5px}output{font-variant-numeric:tabular-nums}.actions{display:flex;gap:8px;justify-content:flex-end;align-items:center;padding:9px;background:#dbe4ed}.actions span{margin-right:auto}.actions button{padding:8px 14px}#results{display:flex;flex-wrap:wrap;gap:5px;padding:0 8px}#results:not(:empty){padding:8px;background:#fff}#product-info dl{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin:0}#product-info dd{margin:0;font-weight:bold}#camera{max-width:360px;width:100%}.success{background:#e3f4e5;padding:10px}.error{background:#fde8e9;padding:10px}.error:empty{display:none}.invoice{background:white;padding:24px}.invoice-heading{display:flex;justify-content:space-between}.invoice-footer{display:grid;grid-template-columns:1fr 340px;gap:20px}.invoice-footer dl{display:grid;grid-template-columns:1fr auto;gap:8px}.invoice-footer dd{margin:0;text-align:right;font-weight:bold}.section-total{text-align:right}.invoice td{overflow-wrap:anywhere}.noprint form{display:inline-block}#credit-fields p{font-size:12px}[hidden]{display:none!important}

@media(max-width:760px){main{padding:6px}nav{gap:12px}.toolbar{flex-wrap:wrap}.toolbar label{width:100%}.toolbar input{flex:1;width:0}.header-grid,.bottom-grid{grid-template-columns:1fr}.vehicle-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.actions{flex-wrap:wrap;position:sticky;bottom:0;z-index:2}.actions span{width:100%}.actions button{flex:1}.item-grid{min-width:0;display:block}.item-grid thead{display:none}.item-grid tbody{display:block}.item-grid tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));margin:8px;border:1px solid #acbdca;border-radius:3px;background:#fff}.item-grid td{display:flex;flex-direction:column;border:0;padding:6px;min-width:0}.item-grid td:before{content:attr(data-label);font-weight:bold;color:#47637e;padding-bottom:3px}.item-grid td:nth-child(3){grid-column:1/-1}.service-grid td:nth-child(2){grid-column:1/-1}.item-grid input,.item-grid button{min-height:36px}.invoice{padding:12px}.invoice-heading{display:block}.invoice-footer{grid-template-columns:1fr}.invoice .vehicle-grid{grid-template-columns:1fr 1fr}.tabs button{min-width:0;flex:1}}

@media print{@page{margin:12mm}body{font-size:10pt;background:white}main{padding:0;max-width:none}main>h1,.success,.error,.noprint,nav{display:none!important}.invoice{padding:0}.invoice .header-grid{grid-template-columns:1fr 1fr 1fr}.invoice .vehicle-grid{grid-template-columns:repeat(3,1fr)}.invoice-footer{grid-template-columns:1fr 300px;break-inside:avoid}tr{break-inside:avoid}thead{display:table-header-group}h3{break-after:avoid}.section-total{break-before:avoid}.invoice table{font-size:10pt}.invoice td,.invoice th{padding:6px}}



@media(max-width:760px){.actions{position:static;display:grid;grid-template-columns:1fr 1fr}.actions span{grid-column:1/-1}.actions button{padding:10px;min-height:42px}}



.admin-menu{position:relative}.admin-menu summary{color:white;cursor:pointer}.admin-menu[open]{z-index:5}.admin-menu a{display:block;background:#132e48;padding:10px;min-width:170px}.business-identity{max-width:70%;overflow-wrap:anywhere}.business-identity p,.report-business p{margin:4px 0}.report-business{background:white;padding:12px}.report-business p{overflow-wrap:anywhere}@media(max-width:760px){.business-identity{max-width:100%}}



.button-link{display:inline-block;padding:8px 12px;color:white;background:#126fae;border-radius:3px;text-decoration:none}#generated-code{background:#edf2f7}#customer-form details{padding:10px}



.product-lookup-box{display:flex;gap:16px;padding:12px;border:1px solid #b4c2d0;margin:10px 0}.product-picture-window{width:120px;min-width:120px;height:120px;background:#f3f6f9;display:flex;align-items:center;justify-content:center}.product-picture-window img{max-width:116px;max-height:116px;object-fit:contain}.pos-product-preview{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:10px}.pos-product-preview img{width:90px;height:90px;object-fit:contain;background:white}.pos-product-preview strong{max-width:220px}.pos-product-preview small{display:block}#product-lookup-results{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}@media(max-width:760px){.product-lookup-box{flex-direction:column}}



nav .admin-access{display:inline-block;padding:8px 16px;margin:0;border:1px solid #aac3de;border-radius:5px;background:#e7f1ff;color:#12375b;font-weight:800;cursor:pointer}nav .admin-access:disabled{background:#d8dce0;color:#727980;border-color:#bfc5cb;font-weight:400;cursor:not-allowed;opacity:1}


.app-brand{display:inline-flex;align-items:center;gap:10px;text-decoration:none;color:#132e48;font-size:20px;margin:4px 0 8px;font-weight:600}.app-brand img{border-radius:10px;display:block}.app-brand strong{color:#1169b1}

.app-header{background:#132e48;border-bottom:3px solid #04cee5;border-radius:8px;padding:14px 20px;margin:0 0 16px}.app-header .app-brand{color:#fff;margin:0;gap:16px}.app-header .app-brand strong{color:#04cee5}.brand-name{display:block;font-size:26px;letter-spacing:.3px}.brand-tagline{display:block;font-size:12px;font-weight:400;color:#c4d6e6;margin-top:4px}.app-header .app-brand img{width:64px;height:64px;border-radius:12px}@media(max-width:600px){.app-header{padding:12px}.brand-name{font-size:22px}.app-header .app-brand img{width:52px;height:52px}.brand-tagline{font-size:11px}}

/* Persistent compact navigation */
.pos-top-nav{position:sticky;top:0;z-index:1000;align-items:center;justify-content:space-between;min-height:54px;box-shadow:0 3px 14px #132e4826}
.pos-nav-dropdown{position:relative;color:#fff;min-width:150px}
.pos-nav-dropdown>summary{cursor:pointer;font-weight:700;list-style:none;padding:7px 12px;border:1px solid #ffffff55;border-radius:8px}
.pos-nav-links{position:absolute;top:calc(100% + 9px);left:0;display:flex;flex-direction:column;gap:3px;min-width:250px;max-height:75vh;overflow:auto;background:#132e48;padding:12px;border-radius:10px;box-shadow:0 12px 30px #0004}
.pos-nav-links>a,.pos-nav-links>.admin-menu{padding:7px 10px;border-radius:5px}
.pos-nav-links>a:hover{background:#ffffff22}
.pos-nav-links .admin-menu>a{display:block;padding:8px}
.pos-current-user{color:#e0ebf5;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:50vw}

/* AppServ POS clean navigation / ladder menu */
.pos-shell-header{position:sticky;top:0;z-index:1100;display:flex;align-items:center;gap:18px;min-height:66px;padding:9px max(14px,calc((100vw - 1560px)/2));background:#102d49;color:#fff;box-shadow:0 3px 18px #0b223d30;box-sizing:border-box}
.pos-shell-brand{display:flex;align-items:center;gap:10px;flex-shrink:0;color:#fff!important;text-decoration:none;font-size:17px;font-weight:750;letter-spacing:.1px}
.pos-shell-brand img{width:38px;height:38px;object-fit:cover;border-radius:8px}
.pos-shell-brand b{color:#31d5e8}.pos-shell-brand small{display:block;font-size:10px;color:#c5d8e8;font-weight:400;margin-top:3px;white-space:nowrap}
.pos-shell-header .pos-top-nav{position:static;min-height:0;box-shadow:none;background:transparent;padding:0;display:block;flex:1}
.pos-nav-dropdown{min-width:0;display:inline-block}.pos-nav-dropdown>summary{list-style:none;border:1px solid #68829a;padding:10px 14px;background:#1d4265;border-radius:8px;font-size:14px;display:flex;align-items:center;gap:14px}.pos-nav-dropdown>summary::-webkit-details-marker{display:none}.menu-chevron{margin-left:auto;color:#87dbea}
.pos-nav-links{top:calc(100% + 12px);min-width:280px;width:min(330px,calc(100vw - 26px));max-height:min(78vh,680px);overflow-y:auto;background:#fff;color:#19334c;border:1px solid #cbd8e3;padding:8px;gap:2px;border-radius:12px;box-shadow:0 18px 44px #0b213c55}
.pos-nav-links a{color:#19334c!important;text-decoration:none;display:block;border-radius:7px;padding:11px 13px!important;font-size:14px;font-weight:500}.pos-nav-links a:hover{background:#eaf3fa!important}
.pos-nav-links .menu-home{font-weight:700;border-bottom:1px solid #e2eaf1;border-radius:0;margin-bottom:4px}.pos-menu-group{margin:2px 0}.pos-menu-group>summary{list-style:none;display:flex;justify-content:space-between;align-items:center;padding:12px 13px;cursor:pointer;font-size:14px;font-weight:700;border-radius:8px;background:#f2f6fa}.pos-menu-group>summary::-webkit-details-marker{display:none}.pos-menu-group>summary span{font-size:20px;line-height:12px;transition:transform .15s}.pos-menu-group[open]>summary span{transform:rotate(90deg)}.pos-menu-group[open]>summary{background:#dfeef9;color:#145a91}.pos-menu-children{border-left:2px solid #bdd4e6;margin:5px 0 7px 17px;padding-left:7px}.pos-menu-children a{font-weight:450!important;padding:10px 12px!important}.pos-menu-admin>summary{background:#e7f2ff;color:#164f7d}.pos-nav-links .menu-logout{border-top:1px solid #e0e8ef;margin-top:7px;color:#a83a3a!important}
.pos-shell-user{display:flex;align-items:center;gap:8px;max-width:32vw;font-size:12px;color:#d8e7f3;min-width:0}.pos-shell-user>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-dot{display:inline-block;width:9px;height:9px;background:#56d7aa;border-radius:50%;flex-shrink:0}
body:has(.pos-shell-header) .app-header{display:none}main{max-width:1560px}main>h1{font-size:24px;font-weight:750;margin:14px 0 16px}
.pos-dashboard{overflow:visible}.dashboard-intro{display:flex;justify-content:space-between;align-items:center;gap:20px;background:linear-gradient(110deg,#183c60,#286a94);border-radius:14px;padding:24px;color:#fff;margin-bottom:18px}.dashboard-intro h2{margin:5px 0 8px;font-size:26px}.dashboard-intro p{margin:0;color:#d8e7f5;line-height:1.5}.dashboard-intro .eyebrow{font-size:11px;font-weight:700;letter-spacing:2px;color:#8fe1ef}.dashboard-status{border:1px solid #ffffff55;border-radius:30px;padding:9px 13px;white-space:nowrap;font-size:12px;color:#d7f8e8}.dashboard-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(225px,1fr));gap:14px}.dashboard-tile{display:flex;align-items:center;gap:13px;padding:20px 16px;background:#fff;border:1px solid #d3dee8;border-radius:12px;box-shadow:0 3px 12px #173d6010;text-decoration:none!important;color:#18344e!important;min-height:82px;transition:transform .15s,box-shadow .15s}.dashboard-tile:hover{transform:translateY(-2px);box-shadow:0 7px 18px #173d6020}.dashboard-tile strong{display:block;font-size:16px}.dashboard-tile small{display:block;color:#66798b;margin-top:5px;font-size:12px;line-height:1.3}.tile-icon{background:#e4f2fc;color:#166ba7;border-radius:10px;width:46px;height:46px;display:grid;place-items:center;flex-shrink:0;font-size:25px}.tile-arrow{margin-left:auto;font-size:26px;color:#8fa5b7}.admin-tile .tile-icon{background:#e8e9ff;color:#4b56a6}
@media(max-width:650px){.pos-shell-header{gap:9px;padding:8px 10px;min-height:58px}.pos-shell-brand{font-size:14px;gap:6px}.pos-shell-brand img{width:30px;height:30px}.pos-shell-brand small{font-size:8px}.pos-shell-header .pos-top-nav{flex:0 0 auto;margin-left:auto}.pos-nav-dropdown>summary{font-size:13px;padding:9px 10px;gap:5px}.pos-nav-links{left:auto;right:0;top:calc(100% + 10px)}.pos-shell-user{display:none}.dashboard-intro{padding:18px;align-items:flex-start}.dashboard-intro h2{font-size:21px}.dashboard-status{display:none}.dashboard-grid{grid-template-columns:1fr 1fr;gap:9px}.dashboard-tile{padding:12px 9px;gap:8px;min-height:88px;align-items:flex-start}.dashboard-tile strong{font-size:13px}.dashboard-tile small{font-size:11px}.tile-icon{width:31px;height:31px;font-size:19px}.tile-arrow{display:none}}
@media(max-width:390px){.dashboard-grid{grid-template-columns:1fr}.dashboard-tile{min-height:65px}}
@media print{.pos-shell-header{display:none!important}}

/* Mobile header / dashboard repair. Keep critical styles explicit for iOS Safari. */
html{overflow-x:hidden}body{margin:0;min-width:0}main{box-sizing:border-box;width:100%;margin:0 auto}
.pos-shell-header{display:flex!important;flex-wrap:nowrap!important;position:sticky!important;top:0!important;width:100%;gap:12px;z-index:9999}
.pos-shell-brand{display:flex!important;align-items:center;min-width:0;white-space:nowrap}
.pos-shell-header .pos-top-nav{background:transparent!important;display:flex!important;flex-wrap:nowrap!important;align-items:center;padding:0!important;min-width:0}
.pos-nav-dropdown{position:relative!important;display:block!important}
.pos-nav-dropdown>summary{color:#fff!important;background:#245b87!important;border:1px solid #8ac8ef!important;opacity:1!important;font-weight:750!important;text-shadow:none!important;white-space:nowrap;min-height:42px;box-sizing:border-box}
.pos-nav-dropdown>summary .menu-chevron{color:#fff!important}
.pos-nav-dropdown[open]>summary{background:#0867a9!important;color:#fff!important}
.pos-nav-links{display:none!important;flex-direction:column!important;position:absolute!important;z-index:10001!important;color:#19334c!important;background:#fff!important}
.pos-nav-dropdown[open]>.pos-nav-links{display:flex!important}
.pos-nav-links a{color:#19334c!important}
.pos-menu-group>summary{color:#19334c!important}
.pos-dashboard,.dashboard-intro,.dashboard-grid{box-sizing:border-box}
.dashboard-grid{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(220px,1fr))!important;gap:12px!important}
.dashboard-tile{display:flex!important;align-items:center!important;min-width:0;white-space:normal!important;overflow-wrap:anywhere!important;box-sizing:border-box}
.dashboard-tile>span:nth-child(2){display:block!important;min-width:0;flex:1}
.dashboard-tile strong,.dashboard-tile small{display:block!important;line-height:1.35!important}
.dashboard-intro{display:flex!important;background:#183c60!important;color:#fff!important}
.dashboard-intro h2{color:#fff!important}
.dashboard-intro p{color:#e0edf8!important}
@media(max-width:760px){
 .pos-shell-header{min-height:60px!important;padding:8px 12px!important;gap:10px!important}
 .pos-shell-brand{font-size:16px!important;flex:1!important}
 .pos-shell-brand img{width:36px!important;height:36px!important}
 .pos-shell-brand small{font-size:9px!important}
 .pos-shell-header .pos-top-nav{flex:0 0 auto!important;margin-left:auto!important}
 .pos-nav-dropdown>summary{padding:10px 12px!important;font-size:14px!important}
 .pos-nav-links{right:0!important;left:auto!important;top:calc(100% + 8px)!important;width:min(320px,calc(100vw - 24px))!important;min-width:0!important;max-height:75dvh!important;overflow-y:auto!important}
 .pos-shell-user{display:none!important}
 main{padding:14px 12px!important}
 main>h1{font-size:22px!important;margin:10px 0 16px!important}
 .dashboard-intro{padding:20px!important;margin-bottom:14px!important;border-radius:12px!important}
 .dashboard-intro h2{font-size:23px!important}
 .dashboard-grid{grid-template-columns:1fr!important;gap:10px!important}
 .dashboard-tile{padding:14px!important;min-height:74px!important;gap:12px!important}
 .dashboard-tile strong{font-size:16px!important}
 .dashboard-tile small{font-size:13px!important}
 .tile-icon{width:42px!important;height:42px!important;font-size:23px!important}
}
@media print{.pos-shell-header{display:none!important}}
/* Report centre and Goods In new part controls */
.report-center-link,.add-part-button{display:inline-block;background:#125b98!important;color:#fff!important;border-radius:9px;padding:12px 16px;text-decoration:none;font-weight:700}.goods-add-part{display:flex;gap:12px;align-items:center;flex-wrap:wrap;background:#edf5fc;padding:12px;border-radius:10px;margin:10px 0}.goods-add-part span{font-size:13px;color:#33485c}.report-controls{display:flex;flex-wrap:wrap;align-items:end;gap:10px}.report-controls label{display:flex;flex-direction:column;flex:1 1 155px}.report-controls select,.report-controls input{width:100%}

/* Oct 14: locked business identity + clean mobile header */
.pos-business-top{position:sticky;top:0;z-index:10002;display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 16px;background:#081d30;color:#fff;font-size:12px;min-height:30px;box-sizing:border-box}
.pos-business-top strong{font-size:14px}.pos-business-top span{text-align:right;overflow-wrap:anywhere}
.pos-shell-header{position:sticky!important;top:46px!important;z-index:10001!important;min-height:72px!important}
@media(max-width:650px){.pos-business-top{display:block;padding:7px 12px;min-height:58px}.pos-business-top strong,.pos-business-top span{display:block;text-align:left}.pos-business-top span{font-size:10px;line-height:1.25;margin-top:3px}.pos-shell-header{top:58px!important;min-height:62px!important;flex-wrap:nowrap!important}.pos-shell-brand{min-width:0!important;flex:1!important}.pos-shell-header .pos-top-nav{flex:0 0 auto!important}.pos-shell-user{display:none!important}}
.credit-document{position:relative;border:2px solid #b71c1c!important;color:#7f1111!important}
.credit-document:before{content:'CREDIT';position:absolute;top:34%;left:7%;font-size:clamp(48px,12vw,135px);font-weight:900;transform:rotate(-25deg);color:rgba(188,0,0,.13);pointer-events:none;z-index:0;letter-spacing:.08em}
.credit-document>*{position:relative;z-index:1}.credit-document .invoice-heading h2,.credit-document .invoice-footer{color:#b71c1c!important}
body.credit-entry #workspace{border:2px solid #bd2424!important}body.credit-entry #workspace #credit-fields{background:#fff0f0!important;border:2px solid #bd2424!important;padding:15px!important;color:#9c1515!important}body.credit-entry #workspace #kind{color:#b71c1c!important;font-weight:800!important}
.pos-sms-panel{border:1px solid #9ab5cb;background:#f4f9fc;padding:18px;border-radius:10px;margin:18px 0}.pos-sms-panel textarea{display:block;width:100%;max-width:650px}.pos-sms-panel input[type=tel]{width:100%;max-width:360px}
@media print{.pos-business-top{display:none!important}.credit-document:before{print-color-adjust:exact;-webkit-print-color-adjust:exact}}
