/* Screen-only styles keep printed invoices and quotes unchanged. */
.mobile-menu-toggle,.mobile-invoice-tabs,.mobile-cell-label,.mobile-swipe-hint{display:none}.mobile-logo-row,.mobile-page-tabs,.mobile-cell-value,.sidebar-foot>.mobile-workspace-menu{display:contents}
@media screen and (max-width:1024px){.workspace,.invoice-workspace{grid-template-columns:minmax(0,1fr)}.hub-shell{padding-inline:24px}.hub-header{gap:16px;flex-wrap:wrap}.hub-header nav{gap:14px}.hub-toolbar{align-items:end}.inventory-top{flex-wrap:wrap}.invoice-main{padding-inline:24px}main,.main,.inventory-main,.hub-page,.hub-panel,.panel,.card,.invoice-editor{min-width:0}.layout{grid-template-columns:minmax(0,1fr)}.layout[data-ads-style]{grid-template-columns:minmax(0,1fr)}}
@media screen and (max-width:820px){
 :root{scroll-padding-top:120px}html{-webkit-text-size-adjust:100%;text-size-adjust:100%}body{overflow-x:clip}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button,select,input:not([type=checkbox]):not([type=radio]){min-height:48px}button{touch-action:manipulation}input,select,textarea{font-size:16px!important}input,select{height:auto;min-height:50px}input[type=checkbox],input[type=radio]{width:21px!important;height:21px!important;min-height:21px!important;flex:none;accent-color:#ddd}label:has(>input[type=checkbox]){display:flex;align-items:center;gap:10px}input[type=file]{height:auto;max-width:100%;padding:12px;font-size:13px!important;overflow:hidden}input[type=file]::file-selector-button{padding:10px;border-radius:6px;margin-right:8px;font:inherit}textarea{min-height:110px;line-height:1.5}p,small,.muted,.hint,.fine,#dmstatus{overflow-wrap:anywhere}.watermark img{opacity:.045}.logo-crop img{max-width:none}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid #eee!important;outline-offset:3px}
 /* One compact workspace menu, retaining the original links and logout handler. */
 .inventory-top,.hub-header,body>header{padding:14px 18px;display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;background:#0b0b0bf5;border-bottom:1px solid #303030}.inventory-brand,.hub-brand,body>header>.brand{flex:1;min-width:0}.inventory-brand small,.hub-brand small{font-size:8px;letter-spacing:.13em}.inventory-brand strong{font-size:17px}.hub-brand{font-size:20px}.mobile-menu-toggle{display:inline-flex!important;align-items:center;justify-content:center;gap:8px;flex:none;margin:0 0 0 auto;min-height:44px;padding:10px 13px!important;font-size:12px!important;border:1px solid #3b3b3b!important;border-radius:8px;background:#181818!important;color:#eee!important;white-space:nowrap;width:auto!important}
 .mobile-workspace-menu{width:100%;min-width:0}.mobile-workspace-menu:not([data-open=true]){display:none!important}.mobile-workspace-menu[data-open=true]{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;padding:12px 0 2px!important;margin:0!important;border-top:1px solid #292929;white-space:normal!important;overflow:visible!important}.mobile-workspace-menu a,.mobile-workspace-menu button{display:flex!important;align-items:center;min-height:48px!important;padding:12px!important;border:1px solid #303030!important;border-radius:8px!important;background:#151515!important;text-align:left;color:#bbb!important;font-size:13px!important;text-decoration:none;margin:0!important;white-space:normal}.mobile-workspace-menu [aria-current=page]{background:#ededed!important;color:#101010!important;border-color:#ededed!important}
 /* Calculator tabs and Ads Studio sections remain a single swipeable row. */
 .app-shell{display:block}.sidebar{position:static;display:block;width:100%;padding:14px 18px 0;border-right:0;border-bottom:1px solid #292929;background:#0b0b0bf5}.sidebar .brand{display:flex;margin:0 0 14px;gap:10px}.sidebar .brand strong{font-size:16px}.sidebar .brand .logo-crop{width:36px;height:42px;flex-basis:36px}.sidebar .brand .logo-crop img{width:135px;height:76px}.sidebar .nav{display:flex;flex-direction:row;overflow-x:auto;gap:6px;padding:0 0 12px;max-width:100%;scrollbar-width:none}.sidebar .nav button{flex:0 0 auto;font-size:12px;padding:11px 13px;min-height:44px}.sidebar-foot{position:static;display:block;margin:0;padding:0}.sidebar-foot>span{display:none}.sidebar-foot .mobile-workspace-menu[data-open=true]{padding-block:12px!important}
 body>aside{position:static;display:block;width:100%;padding:14px 18px 0;border-right:0;border-bottom:1px solid #303030;background:#101010}.mobile-logo-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.mobile-logo-row .logo{padding:0;width:auto;font-size:21px;min-width:0}.mobile-logo-row .logo small{font-size:8px;letter-spacing:2px}.mobile-logo-row .logo img{width:27px;height:27px}.mobile-page-tabs{display:flex;gap:6px;overflow-x:auto;padding:10px 0 12px;scrollbar-width:none;max-width:100%}.mobile-page-tabs>.nav{flex:0 0 auto;width:auto;white-space:nowrap;min-height:44px;margin:0;padding:11px 13px;font-size:12px}.mobile-page-tabs>.nav svg{display:none}aside>.section-title,aside>.side-foot,aside>.spacer{display:none}body>aside+main{margin-left:0;padding:26px 18px 60px}
 /* Comfortable page rhythm and readable totals. */
 .main,.inventory-main,.invoice-main{padding:28px 18px 55px}.hub-shell{padding:0 18px calc(40px + env(safe-area-inset-bottom))}.hub-header{margin-inline:-18px}.hub-heading,.inventory-heading,.invoice-heading,.heading,.top{display:flex;align-items:flex-start;flex-direction:column;gap:18px;padding-top:28px;margin-bottom:22px}.hub-heading{padding-bottom:0}.hub-heading h1,.inventory-heading h1,.invoice-heading h1,.page-head h1,body>main h1,.top h1{font-size:clamp(30px,8.5vw,40px);line-height:1.13;letter-spacing:-.045em;margin:10px 0 14px}.hub-heading .muted,.inventory-heading .muted,.page-head .muted{font-size:13px;line-height:1.65;max-width:34em}.sync-actions{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:8px;text-align:left}.sync-actions button{margin:0!important;width:100%;padding:11px!important;font-size:12px}.sync-actions p{grid-column:1/-1;margin:4px 0 0!important}.card,.panel,.hub-panel,.invoice-editor{padding:20px;border-radius:12px}.hub-panel{margin-block:18px}.hub-panel>.muted,.hub-page>.muted{font-size:12px;line-height:1.7}.hub-section-title{align-items:center;gap:12px}.hub-section-title h2{font-size:23px}.hub-section-title button{font-size:12px;padding:10px 12px}.hub-toolbar{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:16px}.hub-toolbar label{margin:0;min-width:0!important}.hub-toolbar label:first-child{grid-column:1/-1}.hub-toolbar p{grid-column:1/-1;width:auto}.hub-tabs{position:sticky;top:0;background:#080808f5;backdrop-filter:blur(14px);z-index:10;gap:5px;margin:18px -18px 22px;padding:12px 18px;border-block:1px solid #292929;scrollbar-width:none;max-width:calc(100% + 36px)}.hub-tabs button{flex:0 0 auto;white-space:nowrap;font-size:12px;padding:10px 13px;min-height:44px}.hub-cards,.inventory-stats,.cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.hub-card,.inventory-stats>div,.cards>.card{min-width:0;padding:16px;border-radius:10px}.hub-card small,.inventory-stats span,.card .k{font-size:10px;line-height:1.45;letter-spacing:.02em;min-height:30px}.hub-card strong,.inventory-stats strong,.card .v{font-size:clamp(19px,5.5vw,26px);line-height:1.15;letter-spacing:-.04em;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.card .v{margin-top:10px}.hub-card strong{display:block}.totals{gap:10px;grid-template-columns:1fr 1fr}.totals .balance{grid-column:1/-1}.totals article{padding:18px}.totals strong{font-size:clamp(23px,7vw,34px);overflow-wrap:anywhere}.layout,.workspace,.invoice-workspace{grid-template-columns:minmax(0,1fr)!important;gap:16px}.top{padding-top:0}.top>.row,.top>.status{max-width:100%}.panel-title{align-items:flex-start;flex-wrap:wrap;gap:14px}.panel-title>.row{width:100%}.panel-title select{width:auto;flex:1;min-width:130px}.panel-title .btn{min-width:100px}.chart{height:180px;gap:4px}.insight-grid{grid-template-columns:1fr}.formgrid{grid-template-columns:1fr}.formgrid>.span{grid-column:auto}.notice{padding:14px;font-size:12px}.toast{left:16px;right:16px;bottom:calc(16px + env(safe-area-inset-bottom));max-width:none;font-size:13px;line-height:1.5}.inventory-filters{grid-template-columns:1fr 1fr;gap:12px}.inventory-filters .search-wrap{grid-column:1/-1}.inventory-filters>div{min-width:0}.inventory-filters label{font-size:11px}.inventory-collection{border-radius:12px}.collection-heading{padding:18px!important;gap:10px;flex-wrap:wrap}.inventory-cards{padding:14px;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.inventory-photo-card{padding:12px;min-width:0}.inventory-photo-card img,.inventory-photo-placeholder{height:170px}.inventory-photo-card h3{font-size:14px;line-height:1.4;overflow-wrap:anywhere}.inventory-photo-card button{padding:10px;font-size:12px;min-height:44px}.inventory-pagination{gap:10px;padding:16px!important;flex-wrap:wrap}.inventory-pagination button{padding:10px 14px}
 /* Record cards preserve all columns without sideways page scrolling. */
 .hub-table-wrap:has(.mobile-record-table),.inventory-table-wrap:has(.mobile-record-table),.table-wrap:has(.mobile-record-table),[data-ads-style="ads-inline-9"]:has(.mobile-record-table){overflow:visible;border:0;margin-block:14px}.mobile-record-table{display:block;width:100%;table-layout:auto}.mobile-record-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.mobile-record-table tbody{display:grid;gap:12px}.mobile-record-table tr{display:block;padding:6px 16px;background:#111;border:1px solid #333!important;border-radius:11px;min-width:0}.mobile-record-table td{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;min-width:0!important;width:auto!important;max-width:none!important;padding:12px 0!important;border:0!important;border-bottom:1px solid #252525!important;font-size:13px!important;white-space:normal!important;overflow-wrap:anywhere}.mobile-record-table td:first-child{display:block;padding:13px 0!important}.mobile-record-table td:first-child .mobile-cell-label{display:none}.mobile-record-table td:first-child .mobile-cell-value{font-size:15px;font-weight:500;line-height:1.5;text-align:left}.mobile-record-table td:last-child{border-bottom:0!important}.mobile-record-table .mobile-cell-label{display:block;flex:0 0 32%;font-size:11px;line-height:1.6;font-weight:400;color:#999;letter-spacing:.02em;text-align:left}.mobile-record-table .mobile-cell-value{display:block;min-width:0;flex:1;text-align:right;font-variant-numeric:tabular-nums;line-height:1.6;overflow-wrap:anywhere}.mobile-record-table .mobile-cell-value small{color:#999;font-size:11px;line-height:1.6;margin-top:4px}.mobile-record-table .mobile-cell-value button,.mobile-record-table .mobile-cell-value>a{min-height:44px;margin:3px 0 3px 6px;padding:10px 12px;display:inline-flex;align-items:center;justify-content:center;border:1px solid #3c3c3c;border-radius:7px;font-size:12px;line-height:1.35;text-decoration:none;max-width:100%;white-space:normal}.mobile-record-table td:first-child .mobile-cell-value>a{margin:0;padding:0;border:0;text-align:left;justify-content:flex-start;min-height:36px;text-decoration:underline;text-underline-offset:4px}.mobile-record-table .piece-link,.mobile-record-table .order-row-button{font-size:15px!important;min-height:36px!important;text-align:left}.mobile-record-table .mobile-cell-value:has([data-action="financial"]){text-align:right}.mobile-record-table .mobile-cell-value>div{overflow-wrap:anywhere}
 .mobile-comparison-scroll{overflow-x:auto;max-width:100%;border:1px solid #333;border-radius:9px;overscroll-behavior-x:contain}.mobile-comparison-table{min-width:760px;font-variant-numeric:tabular-nums}.mobile-comparison-table td,.mobile-comparison-table th{padding:14px 12px;white-space:nowrap}.mobile-comparison-table td:first-child,.mobile-comparison-table th:first-child{position:sticky;left:0;background:#151515;border-right:1px solid #333;min-width:118px;max-width:180px;white-space:normal;overflow-wrap:anywhere;z-index:1}.mobile-swipe-hint{display:block;font-size:11px;color:#aaa;margin:12px 0 8px}
 /* Full-height phone dialogs, generous fields and reachable actions. */
 dialog:not(#quote-preview){inset:0;margin:0;width:100%!important;max-width:100%!important;height:100dvh;max-height:100dvh!important;border:0;border-radius:0;padding:20px 18px calc(24px + env(safe-area-inset-bottom))!important;background:#111;overscroll-behavior:contain;overflow-y:auto;scroll-padding-block:78px 100px}dialog .hub-dialog-top,dialog .detail-top{position:sticky;top:-20px;background:#111;z-index:3;padding:14px 0;border-bottom:1px solid #333;margin-bottom:20px;gap:12px}dialog h2{font-size:23px;line-height:1.25;overflow-wrap:anywhere}dialog .hub-dialog-top>button,dialog .detail-top>button{min-width:44px;min-height:44px;flex:none}.hub-form,.order-form-grid,.stock-edit-grid,.invoice-grid{grid-template-columns:minmax(0,1fr)!important;gap:18px}.hub-form .wide,.full-width,.stock-wide,.invoice-grid .full{grid-column:auto}.hub-form label,.order-form-grid label{font-size:12px;line-height:1.5}.hub-form input,.hub-form select,.hub-form textarea{margin-top:8px}#editor-form>#save,#stock-save{width:100%;min-height:50px;background:#eee;color:#111;font-weight:600;margin-top:16px;position:sticky;bottom:0;z-index:2;border:1px solid #eee}.order-form-actions{position:sticky;bottom:calc(-24px - env(safe-area-inset-bottom));padding:14px 0 calc(16px + env(safe-area-inset-bottom));background:#111;display:grid;grid-template-columns:1fr 1fr;gap:10px;z-index:3}.order-form-actions button{margin:0;padding:12px;min-height:48px;font-size:13px}.order-form-actions #save-order{grid-column:1/-1;grid-row:1}.order-form-actions #view-order-invoice:not([hidden]){grid-column:1/-1}.order-gallery{grid-template-columns:1fr 1fr;gap:12px}.order-photo img{height:155px}.order-payment-summary{grid-template-columns:1fr 1fr;padding:16px;gap:18px}.order-payment-summary>div:last-child{grid-column:1/-1}fieldset{padding:22px 0}legend{font-size:14px}.detail-grid{grid-template-columns:1fr 1fr;gap:16px}.detail-grid dd{overflow-wrap:anywhere}.stock-photos{display:grid;grid-template-columns:1fr;gap:12px}.stock-photos img{width:100%;height:auto;max-height:60vh;object-fit:contain}.detail-actions{display:flex;flex-wrap:wrap;gap:8px}.detail-actions button{flex:1;min-width:100px}#recovery-backed-up{height:21px!important}.export-links{display:grid;grid-template-columns:1fr 1fr;gap:10px}.export-links .hub-button{display:flex;align-items:center;justify-content:center;text-align:center;font-size:12px;min-height:48px}#recovery-preview,#recovery-apply{width:100%;margin-block:12px}#recovery-confirm{max-width:none}
 .mobile-invoice-tabs{display:flex;gap:6px;background:#151515;border:1px solid #333;border-radius:10px;padding:5px;margin:0 0 18px}.mobile-invoice-tabs button{flex:1;background:transparent;border:0;color:#aaa;font-size:13px;min-height:44px}.mobile-invoice-tabs button[aria-selected=true]{background:#eee;color:#111}.invoice-heading{padding-top:0}.invoice-heading button{width:100%}.invoice-editor{padding:18px}.invoice-editor input[type=hidden]{display:none}.invoice-editor select{height:auto}.line-heading{gap:10px;align-items:center}.line-heading h2{font-size:16px}.line-heading button{font-size:12px}.line-bottom{grid-template-columns:1fr 1fr;gap:12px}.line-bottom button{grid-column:1/-1;min-height:44px}.invoice-line{padding:14px}.invoice-preview-wrap{border-radius:10px}.invoice-preview-wrap article{padding:22px 18px;min-width:0;min-height:0}.bill-header h2{font-size:16px;letter-spacing:2px}.bill-number strong{font-size:13px}.bill-logo{width:60px;height:60px}.bill-header{gap:12px;padding-bottom:20px}.bill-items{font-size:11px;table-layout:fixed}.bill-items th{font-size:8px;letter-spacing:0}.bill-items th:first-child,.bill-items td:first-child{width:42%}.bill-items td,.bill-items th{padding:12px 3px;overflow-wrap:anywhere}.bill-summary{width:100%;margin-block:24px}.bill-summary div{font-size:12px}.bill-summary .balance{font-size:14px}.bill-customer{padding-block:20px}body[data-invoice-view=edit] .invoice-preview-wrap,body[data-invoice-view=preview] .invoice-editor{display:none}.invoice-preview-wrap #view-method,.bill-notes p{overflow-wrap:anywhere}#quote-preview{max-width:calc(100% - 20px)!important;max-height:94dvh!important;padding:14px;border-radius:12px}#print-quote{padding:22px 16px}#print-quote h1{font-size:24px}#print-quote table{font-size:11px}#print-quote td,#print-quote th{padding:10px 4px;overflow-wrap:anywhere}.quote-actions{position:sticky;bottom:-14px;background:#111;padding-block:12px;display:grid;grid-template-columns:1fr 1fr}.login-card{padding:28px 24px;border-radius:14px}.login-card h1{font-size:29px}.login-wrap{padding:24px 18px}.gold-strip{display:block;padding:18px}.gold-strip p{text-align:left;margin-top:10px;max-width:none}.hero{font-size:40px}.workspace-foot{line-height:1.8}.heading>button{width:100%}body>main{padding-inline:18px;margin-top:28px}
}
@media screen and (max-width:430px){.inventory-cards{grid-template-columns:1fr}.inventory-photo-card{padding:16px}.inventory-photo-card img,.inventory-photo-placeholder{height:245px}.inventory-photo-card h3{font-size:17px}.inventory-photo-card button{font-size:13px}.hub-section-title{align-items:flex-start;flex-direction:column}.hub-section-title>button,.hub-section-title>label{width:100%}.hub-panel{padding:18px}.mobile-record-table tr{padding-inline:14px}.mobile-record-table td{gap:12px}.mobile-record-table .mobile-cell-label{flex-basis:31%}.mobile-record-table .mobile-cell-value button,.mobile-record-table .mobile-cell-value>a{font-size:11px;padding:10px}.mobile-workspace-menu[data-open=true]{grid-template-columns:1fr 1fr!important}#fields{grid-template-columns:1fr}.inventory-stats strong{font-size:23px}}
@media screen and (max-width:350px){.hub-cards,.inventory-stats,.cards{grid-template-columns:1fr}.hub-card small,.card .k{min-height:0}.hub-card strong,.card .v{font-size:27px}.hub-toolbar{grid-template-columns:1fr}.hub-toolbar label,.hub-toolbar label:first-child,.hub-toolbar p{grid-column:auto}.mobile-workspace-menu[data-open=true]{grid-template-columns:1fr!important}.inventory-top,.hub-header,body>header{padding-inline:14px}.hub-brand{font-size:18px}.sync-actions{grid-template-columns:1fr}.sync-actions p{grid-column:auto}.order-gallery{grid-template-columns:1fr}.mobile-record-table td{flex-direction:column;gap:4px}.mobile-record-table .mobile-cell-label{flex-basis:auto}.mobile-record-table .mobile-cell-value{text-align:left;width:100%}.mobile-record-table .mobile-cell-value button,.mobile-record-table .mobile-cell-value>a{margin-left:0;margin-right:6px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}}

/* Author styles must never reveal a hidden application section or action. */
[hidden]{display:none!important}
