/* Compact forms and dedicated phone layouts. */
[hidden]{display:none!important}
.nav-icon{position:relative;display:inline-flex;flex-shrink:0}
.todo-badge{display:inline-flex;align-items:center;justify-content:center;min-width:19px;height:19px;padding:0 5px;border-radius:999px;background:#c73737;color:#fff;font-size:11px;font-weight:600;line-height:1;white-space:nowrap;font-variant-numeric:tabular-nums}
.nav-icon .todo-badge{position:absolute;top:-7px;left:calc(100% - 7px);border:2px solid #fff;min-width:21px;height:21px}
.nav>a>.todo-badge{margin-left:auto}
.field input,.field select,.field textarea{min-width:0;max-width:100%}
.form-grid.password-form{grid-template-columns:minmax(0,1fr)}
.payment-order-link{display:block;font-size:13px;color:var(--brand);padding:3px 0}.payment-links{font-size:12px;line-height:1.7;color:var(--muted)}.payment-links a{display:block;color:var(--brand)}.top-user{max-width:130px;overflow:hidden;white-space:nowrap}.auth-illustration svg{border-radius:45% 45% 0 0}
.top-user{display:flex;align-items:center;gap:3px;border-radius:6px;min-height:40px}.top-user .icon{width:14px;height:14px;transform:rotate(90deg)}.top-logout{display:flex;align-items:center;gap:5px;min-height:40px;font-size:14px}.top-logout .icon{width:18px}.sidebar .profile>button:last-child{display:none}.mobile-records{display:none}
.settings-layout{max-width:1000px;display:grid;grid-template-columns:1fr 1fr;align-items:start;gap:16px}.settings-section{margin:0;overflow:hidden}.settings-section summary{display:flex;align-items:center;justify-content:space-between;gap:12px;list-style:none;cursor:pointer;padding:18px 20px}.settings-section summary::-webkit-details-marker{display:none}.settings-section summary strong{font-size:16px;font-weight:600;display:block}.settings-section summary small{display:block;font-size:13px;color:var(--muted);margin-top:5px}.settings-section summary>.icon{width:17px;height:17px;flex-shrink:0;transition:transform .15s}.settings-section[open] summary>.icon{transform:rotate(90deg)}.settings-section[open]{grid-column:1/-1}.settings-body{padding:0 20px 18px}.settings-body .form-grid{gap:12px 18px}.settings-body .field{font-size:13px}.settings-body input,.settings-body select,.settings-body textarea{font-size:14px;min-height:38px;padding:8px 10px;margin-top:5px}.settings-body .btn{font-size:14px;min-height:38px;padding:8px 12px}.settings-body .small{font-size:13px;line-height:1.6}.settings-tools{display:flex;flex-wrap:wrap;gap:10px}.section-actions{display:flex;gap:10px;margin:5px 0 12px}.management-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px solid var(--line)}.management-row>div:first-child{min-width:0}.management-row strong{font-size:14px;font-weight:500;display:block}.management-row small{font-size:12px;display:block;line-height:1.5;color:var(--muted);margin-top:3px}.row-actions{display:flex;align-items:center;flex-shrink:0;gap:12px}.row-actions .text-btn{font-size:13px;padding:8px 2px;min-height:40px}.catalog-tabs{display:flex;gap:8px;margin-bottom:15px}
.form-section-label{font-size:14px;font-weight:600;color:var(--brand);padding:0 0 8px;border-bottom:1px solid var(--line)}.form-hint{font-size:13px;color:var(--muted);line-height:1.65;margin:12px 0 0}.input-action{display:flex;gap:0;align-items:stretch;margin-top:7px;border:1px solid var(--line);border-radius:6px;overflow:hidden}.input-action input{margin:0;border:0;border-radius:0;flex:1;width:0}.scan-field-btn{display:flex;align-items:center;justify-content:center;min-width:44px;border-left:1px solid var(--line);color:var(--brand);background:var(--surface-soft)}.scan-field-btn .icon{width:21px}.inline-scanner{background:var(--surface-soft);border:1px solid var(--line);border-radius:8px;padding:12px;margin-bottom:14px}.scanner-heading{display:flex;align-items:center;justify-content:space-between}.scanner-heading strong{font-size:14px}#product-scanner{grid-column:1/-1}.info-list{margin:0;padding:0}.info-list>div{display:grid;grid-template-columns:110px minmax(0,1fr);gap:10px;padding:8px 0;border-bottom:1px solid var(--light);font-size:14px;line-height:1.55}.info-list dt{color:var(--muted)}.info-list dd{margin:0;overflow-wrap:anywhere;white-space:pre-wrap}.product-detail-top{display:grid;grid-template-columns:180px minmax(0,1fr);gap:22px}.product-detail-top .product-image{height:200px;border-radius:8px;overflow:hidden}.product-detail-top .thumb{width:100%;height:100%}
.payment-allocation{margin-top:20px;padding-top:15px;border-top:1px solid var(--line)}.allocation-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px;font-size:15px}.allocation-heading .text-btn{font-size:13px}.allocation-row{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:10px 0;border-bottom:1px solid var(--line)}.allocation-row>span:first-child{min-width:0}.allocation-row strong{display:block;font-size:14px;font-weight:500;overflow-wrap:anywhere}.allocation-row small{display:block;font-size:12px;line-height:1.5;color:var(--muted);margin-top:4px}.amount-input{display:flex;align-items:center;gap:6px;flex-shrink:0;font-size:14px}.amount-input input{width:108px;font-size:16px;text-align:right}.ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.auth{display:grid;grid-template-columns:1fr 1fr;background:#fff}.auth-art{padding:10% 13%;background:var(--light);justify-content:center}.auth-art .brand{margin-bottom:42px}.auth-art h1{font-size:36px;line-height:1.65;letter-spacing:2px;color:var(--brand)}.auth-art p{font-size:15px;color:var(--secondary);margin-top:12px;line-height:1.9}.auth-illustration{width:210px;max-width:90%;margin:24px auto 0;mix-blend-mode:multiply}.auth-illustration svg{width:100%;height:auto}.auth-form{align-items:center;padding:40px;min-height:100dvh}.auth-card{border:0;padding:24px 12px;max-width:360px}.auth-brand{margin-bottom:30px}.auth-brand strong{font-size:25px}.auth-card h1{font-size:22px}.forgot-note{font-size:13px;color:var(--muted);margin:15px 0 8px;line-height:1.6}.login-options .check-row{font-size:14px}.auth-card .btn{font-size:16px}.color-choices{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}.color-choices .check-row{font-size:14px;min-height:36px;padding:5px 9px;border:1px solid var(--line);border-radius:6px}.color-choices input{width:17px;height:17px;min-height:17px}.color-box{padding:12px;border:1px solid var(--line);border-radius:8px;margin:10px 0}.color-box h3{font-size:14px;margin:0 0 8px}.color-inputs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.color-inputs label{font-size:13px}.color-inputs input{margin-top:5px;width:100%;min-height:38px;font-size:16px;padding:7px}.color-summary{font-size:12px;color:var(--muted);margin:8px 0 0}.line-color-detail{grid-column:1/-1}.color-stock-table{font-size:14px}
@media(max-width:650px){
  #payment-form>.form-grid,#expense-form.form-grid{grid-template-columns:minmax(0,1fr)}
  #payment-form .field.full{grid-column:1}
  body{font-size:15px;background:var(--surface-soft)}.topbar{height:56px;background:#fff;padding:0 14px;border-bottom:1px solid var(--light);gap:7px}.breadcrumb{font-size:14px;gap:6px;white-space:nowrap}.breadcrumb>span:first-child{max-width:72px}.breadcrumb b{max-width:88px;text-overflow:ellipsis;overflow:hidden}.top-right{gap:3px}.top-right>.badge{display:none}.top-right>button{padding:7px}.top-user{font-size:13px;min-height:44px}.top-user .icon{width:12px}.top-refresh{display:none}.top-logout{font-size:13px;min-height:44px;gap:4px}.top-logout .icon{width:17px;height:17px}
  .content{padding:16px 14px calc(84px + env(safe-area-inset-bottom));max-width:100%}.page-head{margin-bottom:15px;gap:8px}.page-head h1{font-size:20px;line-height:1.3}.page-head p{font-size:12px;line-height:1.55;margin-top:7px}.page-head .btn{font-size:14px;padding:8px 11px;min-height:40px}.page-head .btn .icon{width:17px;height:17px}.page-head .actions{flex-shrink:0}.btn{font-size:14px;min-height:42px;padding:9px 12px}.btn .icon{width:18px;height:18px}.panel{border-radius:10px;border-color:var(--line-soft);margin-bottom:14px}.panel-head{padding:15px}.panel-head h2{font-size:16px}.panel-head p{font-size:12px}.panel-body{padding:0 15px 15px}.footnote{font-size:12px;color:var(--muted)}
  .content>.page-head:has(+.business-counts){display:none}.business-counts{border:0;border-radius:12px;padding:15px 0;margin-bottom:23px;box-shadow:0 2px 6px #26364b04}.business-counts span{font-size:12px;color:var(--muted)}.business-counts strong{font-size:23px;line-height:1.4;color:var(--brand);letter-spacing:-.5px}.business-counts small{font-size:11px}.business-counts a{gap:4px;border-color:var(--light)}.module-group{margin-bottom:22px}.module-group h2{font-size:14px;font-weight:600;color:var(--secondary);margin-bottom:10px;padding-left:2px}.business-grid,.business-grid.grid-six{grid-template-columns:repeat(4,minmax(0,1fr));border:0;border-radius:12px;background:#fff;gap:0;padding:7px 3px}.module-tile{min-height:80px;padding:10px 2px;gap:9px;font-size:13px;font-weight:400;border-radius:8px}.module-tile .icon{width:25px;height:25px;stroke-width:1.6;color:var(--brand)}.module-tile.main-action{background:transparent;color:var(--brand);font-weight:500}.module-tile.main-action .icon{stroke-width:2}.module-tile:active{background:var(--surface-soft)}.business-grid.grid-six{grid-template-columns:repeat(3,minmax(0,1fr))}
  .mobile-nav{padding:5px 8px calc(5px + env(safe-area-inset-bottom));min-height:62px;background:#fff;backdrop-filter:none;border-color:var(--line-soft)}.mobile-nav a{font-size:12px;gap:4px;min-width:65px;padding:5px 12px;color:var(--muted)}.mobile-nav .icon{width:22px;height:22px}.mobile-nav a.active{color:var(--brand)}.mobile-nav a.active .icon{stroke-width:2.1}
  .mobile-records{display:block}.desktop-records{display:none}.record-card{display:block;width:100%;padding:15px;text-align:left;border-bottom:1px solid var(--light);background:#fff}.record-card:last-child{border:0}.record-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.record-heading strong{font-size:15px;font-weight:600;overflow-wrap:anywhere}.record-heading>span:not(.status){font-size:12px;color:var(--muted)}.record-card p{font-size:12px;line-height:1.5;color:var(--muted);margin:7px 0 10px}.record-values{display:flex;justify-content:space-between;gap:10px;font-size:12px;align-items:baseline}.record-values>span{color:var(--muted);min-width:0;overflow-wrap:anywhere}.record-values>b{font-size:14px;font-weight:500;flex-shrink:0}.record-meta{font-size:12px;line-height:1.5;color:var(--muted);margin-top:6px}.status{font-size:11px;padding:3px 6px;white-space:nowrap}.tabs{gap:22px;overflow-x:auto;margin-bottom:15px}.tabs button{font-size:14px;min-height:38px;padding-bottom:10px}.tabs button.active{font-weight:600}
  .products{display:grid;grid-template-columns:1fr;gap:10px}.product-card{display:grid;grid-template-columns:96px minmax(0,1fr);border:1px solid var(--line-soft);border-radius:10px;min-height:124px;overflow:hidden;background:#fff}.product-image{height:100%;min-height:120px}.product-image .sku{font-size:10px;padding:2px 4px;left:5px;top:6px;max-width:90%;overflow-wrap:anywhere}.product-info{padding:12px}.product-info h3{font-size:15px;font-weight:600;line-height:1.4;margin-bottom:5px}.product-info p{font-size:12px;line-height:1.5;margin-bottom:7px}.product-meta{font-size:12px}.product-meta strong{font-size:17px}.product-stock{font-size:12px;padding-top:6px;margin-top:6px;border-color:var(--light)}.product-stock b{font-size:14px}.toolbar{gap:8px}.toolbar select{font-size:14px;min-height:40px}.toolbar .btn{font-size:13px;min-height:40px}.searchbox input{font-size:16px;min-height:42px}.pager{font-size:12px;gap:10px}.pager .btn.small{font-size:12px;min-height:38px}
  .settings-layout{display:block}.settings-section{margin-bottom:12px}.settings-section summary{padding:16px}.settings-section summary strong{font-size:15px}.settings-section summary small{font-size:12px;margin-top:4px}.settings-body{padding:0 16px 16px}.settings-body .form-grid{grid-template-columns:1fr 1fr;gap:12px}.settings-body .field{font-size:12px}.settings-body input,.settings-body select,.settings-body textarea{font-size:16px;min-height:39px;padding:7px 9px}.settings-body .btn{font-size:13px;min-height:40px}.management-row{padding:10px 0}.management-row strong{font-size:14px}.management-row small{font-size:11px}.row-actions{gap:10px}.row-actions .text-btn{font-size:12px;min-height:42px}.account-row{align-items:flex-start;flex-wrap:wrap}.account-row>.row-actions{margin-left:auto}.settings-tools{display:grid;grid-template-columns:1fr 1fr;gap:9px}.settings-tools .btn{font-size:13px}.settings-body .small{font-size:12px}
  .form-grid{gap:14px 12px}.field{font-size:13px}.field small{font-size:12px}.field input,.field select,.field textarea{margin-top:6px}input,select,textarea{font-size:16px;min-height:42px;padding:9px 10px}.check-row{font-size:14px}.small,.muted.small{font-size:12px}.note,.note.warn{font-size:12px;line-height:1.65;padding:11px 12px}.form-hint{font-size:12px;line-height:1.65}.form-error{font-size:13px}.form-section-label{font-size:13px;padding-bottom:7px}.empty{font-size:14px;padding:30px 15px}.empty .small{font-size:12px}.pill,.badge{font-size:11px}
  .modal{max-height:94dvh;border-radius:16px 16px 0 0}.modal-head{padding:12px 16px;min-height:57px}.modal-head h2{font-size:17px}.modal-head button{padding:9px}.modal-body{padding:16px;max-height:calc(94dvh - 130px);font-size:14px}.modal-footer{padding:12px 16px calc(12px + env(safe-area-inset-bottom));gap:8px;flex-wrap:wrap}.modal-footer .btn{font-size:14px;min-height:42px;padding:9px 12px}.modal-footer .total{font-size:12px}.modal-footer .total strong{font-size:21px}.info-list>div{font-size:13px;grid-template-columns:100px minmax(0,1fr);gap:8px;padding:8px 0}.product-detail-top{grid-template-columns:90px minmax(0,1fr);gap:14px}.product-detail-top .product-image{height:110px;min-height:0}.product-detail-top .info-list>div{display:block;font-size:12px;padding:6px 0}.product-detail-top .info-list dt{margin-bottom:3px}.detail-facts{display:grid;grid-template-columns:1fr 1fr;gap:16px;padding:14px}.detail-facts div{font-size:12px}.detail-facts strong{font-size:17px}.detail-actions{padding:14px;gap:8px}.detail-actions .btn{font-size:13px;min-height:40px}.history-line{font-size:14px;padding:11px 0}.history-line small{font-size:12px}.section-label{font-size:13px}
  .task-info strong,.order-pick strong{font-size:15px}.task-info span,.order-pick span{font-size:12px;line-height:1.5}.task-row{gap:10px;padding:11px 0}.task-row .btn{font-size:13px}.summary-rows>div{font-size:14px;padding:13px 0}.summary-rows strong{font-size:18px}.stats{gap:10px}.stat{padding:13px}.stat-top{font-size:12px}.stat .value{font-size:22px;margin:8px 0 5px}.stat .value span{font-size:12px}.stat small{font-size:11px;line-height:1.5}.balance{font-size:24px}.allocation-row{gap:10px}.allocation-row strong{font-size:12px}.allocation-row small{font-size:11px}.amount-input input{width:88px;min-height:40px}.allocation-heading{font-size:14px}.allocation-heading .text-btn{font-size:12px}.line-item{font-size:14px;grid-template-columns:minmax(0,1fr) 57px 72px 22px}.line-labels{grid-template-columns:minmax(0,1fr) 57px 72px 22px;font-size:12px}.line-item strong{font-size:14px}.line-item small{font-size:12px}.line-item input{min-height:40px;padding:7px 4px}.picker-item span{font-size:14px}.picker-item small{font-size:12px}.picker-item{padding:10px}
  .auth{display:block;background:#fff}.auth-art{padding:28px 28px 23px;background:var(--light);position:relative;overflow:hidden}.auth-art .brand{margin-bottom:24px;padding:0;gap:10px}.auth-art .brand strong{font-size:23px}.auth-art .brand img{width:33px;height:33px}.auth-art h1{font-size:28px;line-height:1.5;letter-spacing:1px;margin:0 0 8px}.auth-art p{font-size:12px;line-height:1.7;margin:0;color:var(--muted)}.auth-illustration{position:absolute;width:135px;right:5px;bottom:16px;opacity:.75;margin:0}.auth-form{padding:24px 28px 35px;min-height:0}.auth-card{max-width:410px;padding:0}.auth-brand{display:none}.auth-card h1{font-size:20px;margin-bottom:22px}.auth-card .field{font-size:13px;margin:16px 0}.auth-card .btn{font-size:16px;min-height:44px}.auth-card .login-options .check-row{font-size:13px}.forgot-note{font-size:12px;margin-top:14px}.login-options{gap:20px}.login-options input{width:17px;height:17px;min-height:17px}.auth-card>p{margin-bottom:12px}
  #toast{font-size:14px;bottom:82px;padding:11px 15px}.color-inputs{grid-template-columns:repeat(2,minmax(0,1fr))}.color-inputs label{font-size:12px}.color-stock-table th,.color-stock-table td{font-size:13px;padding:10px}.color-choices{gap:6px}.color-choices .check-row{font-size:13px;padding:5px 8px}
}
@media(max-width:360px){.content{padding-left:10px;padding-right:10px}.topbar{padding:0 10px}.breadcrumb{gap:4px;font-size:13px}.top-user{font-size:12px}.top-right>button{padding:6px}.top-logout{font-size:12px}.module-tile{font-size:12px}.settings-body .form-grid{grid-template-columns:1fr}.settings-tools{grid-template-columns:1fr}.business-counts strong{font-size:20px}.auth-art{padding-left:24px}.auth-form{padding-left:24px;padding-right:24px}}
@media(max-width:650px){.module-group{margin-bottom:16px}.module-group h2{margin-bottom:6px}.business-grid{padding:4px 3px}.module-tile{min-height:72px}.business-counts{margin-bottom:18px}.inventory-totals{display:flex;gap:16px;align-items:center;padding:0 15px 12px;color:var(--muted);font-size:12px}.inventory-totals b{color:var(--ink);font-size:18px}.inventory-totals+.table-wrap{border-top:1px solid var(--line)}}
.stocktake-product{padding:0 0 16px;margin-bottom:16px;border-bottom:1px solid var(--line)}.stocktake-product strong{display:block;font-size:17px}.stocktake-product span{display:block;font-size:13px;color:var(--muted);margin-top:5px}.stocktake-book{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;background:var(--surface-soft);border-radius:7px;margin:15px 0 18px;font-size:14px}.stocktake-book>span{color:var(--muted)}.stocktake-book strong{font-size:16px;font-weight:500}.stocktake-label{font-size:14px;font-weight:600;margin:0 0 10px}.stocktake-row{display:grid;grid-template-columns:minmax(72px,1fr) 58px 90px 52px;gap:12px;align-items:center;padding:11px 0;border-bottom:1px solid var(--line);font-size:14px}.stocktake-row strong{font-weight:500;overflow-wrap:anywhere}.stocktake-row>span:not(:first-child){text-align:right}.stocktake-row input{min-width:0;width:100%;min-height:42px;text-align:right;padding:8px;margin:0;font-size:16px}.stocktake-labels{font-size:12px;color:var(--muted);padding:3px 0 9px}.stocktake-labels>span:nth-child(3){text-align:center}.stocktake-result{padding:13px 0;margin:15px 0 0;border-top:1px solid var(--line)}.stocktake-result>div{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:14px}.stocktake-result strong{font-size:18px;font-weight:600}.stocktake-result small{font-size:13px;color:var(--muted);font-weight:400;margin-left:8px}.stocktake-result p{font-size:13px;color:var(--brand);margin:10px 0 0}.stocktake-difference,.stocktake-result .stocktake-difference{color:#a45c2d}.stocktake-card-colors{font-size:13px;color:var(--muted);line-height:1.7;padding:0 15px 14px}#adjust-reason-field,#adjust-cost-field{margin-top:14px}#adjust-form .form-hint{font-size:12px}
@media(max-width:650px){.stocktake-product strong{font-size:16px}.stocktake-product span{font-size:12px}.stocktake-book{font-size:12px;padding:11px 12px}.stocktake-book strong{font-size:14px}.stocktake-row{grid-template-columns:minmax(65px,1fr) 46px 78px 42px;gap:9px;font-size:13px}.stocktake-labels{font-size:12px}.stocktake-row input{font-size:16px;min-height:42px}.stocktake-result>div{font-size:13px}.stocktake-result strong{font-size:17px}.stocktake-result small{font-size:12px}.stocktake-result p{font-size:12px}.stocktake-card-colors{font-size:12px}}

#auth-form .remembered-password::placeholder{color:var(--ink);letter-spacing:2px;opacity:1}
#auth-form .remembered-password-note{color:var(--brand);font-size:12px;line-height:1.5;margin:-7px 0 12px}
.shipping-fields{margin:18px 0}.shipping-fields h3,.shipping-summary h3{font-size:16px;margin:0 0 12px}.shipping-summary{margin:16px 20px;padding:16px;background:var(--surface-soft,#f5f7fb);border:1px solid var(--border,#e0e6ee);border-radius:10px}.modal-body>.shipping-summary{margin:12px 0 18px}.shipping-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.shipping-heading h3{margin:0}.shipping-details{margin:12px 0 0;display:grid;gap:10px}.shipping-details>div{display:grid;grid-template-columns:100px minmax(0,1fr);gap:12px}.shipping-details dt{color:var(--muted,#64748b)}.shipping-details dd{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}.shipment-history{margin-top:16px}.shipment-history>summary{padding:16px 20px;cursor:pointer;font-weight:600}.shipment-history article+article{border-top:1px solid var(--border,#e0e6ee);margin-top:12px;padding-top:12px}.shipment-history p{margin:6px 0}.shipment-address,.quotation-shipping{white-space:pre-wrap;overflow-wrap:anywhere}@media(max-width:600px){.shipping-summary{margin:12px;padding:12px}.shipping-details>div{grid-template-columns:80px minmax(0,1fr);gap:8px}.shipping-heading .btn{max-width:100%}}
.document-shipping{margin:16px 0 20px;padding:14px 16px;border:1px solid #e7b45b;border-left:5px solid #c57a13;border-radius:8px;background:#fff4d6;color:#713f12;break-inside:avoid;-webkit-print-color-adjust:exact;print-color-adjust:exact}.document-shipping>strong{display:block;color:#965100;font-size:14px;margin-bottom:10px}.document-shipping dl{display:grid;gap:8px;margin:0}.document-shipping dl>div{display:grid;grid-template-columns:78px minmax(0,1fr);gap:10px;font-size:15px;line-height:1.7;font-weight:700}.document-shipping dt{color:#965100}.document-shipping dd{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}@media(max-width:650px){.document-shipping{padding:12px;margin:14px 0 18px}.document-shipping dl>div{grid-template-columns:64px minmax(0,1fr);gap:8px;font-size:14px}}@media print{.document-shipping dl>div{font-size:13px}.document-shipping{border-color:#c57a13}}
.shipping-actions{display:flex;gap:8px;flex-wrap:wrap}.shipping-fields .form-grid{gap:10px 12px}.shipping-fields h3{font-size:15px;margin-bottom:8px}.shipping-fields .field{font-size:13px}.shipping-fields input{height:36px;min-height:36px;padding:5px 9px;font-size:16px}.shipping-fields textarea{height:56px;min-height:56px;padding:5px 9px;font-size:16px;line-height:1.4;resize:vertical}.shipping-fields .form-hint{font-size:12px;margin-top:6px}.execution-product{display:flex;align-items:flex-start;gap:12px;min-width:0}.execution-product>.thumb{width:54px;height:54px;flex:0 0 54px;object-fit:contain;border-radius:6px;overflow:hidden}.execution-product>.thumb>svg{width:100%;height:100%}.execution-product>div{min-width:0;flex:1}.execution-product strong,.execution-product small{overflow-wrap:anywhere}.clipboard-buffer{position:fixed;left:-10000px;top:0;width:1px;height:1px;padding:0;border:0}.sales-paper .sales-meta{grid-template-columns:minmax(0,1fr) minmax(0,1.1fr) auto;align-items:start;gap:6px 14px;margin:14px 0}.sales-meta .sales-date{white-space:nowrap}.document-shipping{padding-top:12px;padding-bottom:12px}@media(max-width:650px){.sales-paper .sales-meta{grid-template-columns:minmax(0,1fr) auto}.sales-meta .sales-customer{grid-column:1;grid-row:1}.sales-meta .sales-date{grid-column:2;grid-row:1}.sales-meta .sales-number{grid-column:1/-1;grid-row:2}.execution-product>.thumb{width:48px;height:48px;flex-basis:48px}.shipping-actions .btn{min-height:34px;padding:6px 9px;font-size:12px}}@media print{.sales-paper .sales-meta{grid-template-columns:minmax(0,1fr) minmax(0,1.1fr) auto}.sales-meta .sales-customer,.sales-meta .sales-number,.sales-meta .sales-date{grid-column:auto;grid-row:auto}}
.required-mark{color:#bd3030;font-weight:700;margin-left:4px}.field:has(>[data-new-customer-mark]) [data-new-customer-mark]{display:inline}#quote-new-customer-field h3{font-size:15px;margin:0 0 10px}#quote-new-customer-field>small{display:block;margin-top:8px;line-height:1.6}
.allocation-with-details{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px}.allocation-with-details .allocation-row{min-width:0}.allocation-with-details .allocation-row>span:first-child{min-width:0;overflow-wrap:anywhere}.record-order-with-details{display:flex;align-items:center;gap:10px}.record-order-with-details>.order-pick{flex:1;min-width:0}.record-order-with-details>.btn{flex-shrink:0}.selected-order-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px;font-size:13px}.selected-order-heading>span{min-width:0;overflow-wrap:anywhere}.selected-order-heading>.btn{flex-shrink:0}.order-peek{width:min(760px,94vw);max-width:94vw;max-height:88dvh;padding:0;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--ink);box-shadow:0 18px 70px #18243840}.order-peek::backdrop{background:#14223680}.order-peek-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px;border-bottom:1px solid var(--line);position:sticky;top:0;background:#fff;z-index:1}.order-peek-header h2{margin:0;font-size:19px}.order-peek-header p{font-size:12px;color:var(--muted);margin:6px 0 0;overflow-wrap:anywhere}.order-peek-header>div{min-width:0}.order-peek-body{padding:18px 20px}.order-peek-facts{display:flex;gap:12px;flex-wrap:wrap;align-items:center}.order-peek-body>.shipping-summary{margin:16px 0}.order-peek-lines{display:grid;gap:12px;margin-top:16px}.order-peek-lines>article{display:flex;align-items:flex-start;gap:12px;border-top:1px solid var(--line-soft);padding-top:12px}.order-peek-lines .thumb{width:52px;height:52px;flex:0 0 52px;object-fit:contain;overflow:hidden}.order-peek-lines .thumb>svg{width:100%;height:100%}.order-peek-lines>article>div{min-width:0;flex:1}.order-peek-lines strong,.order-peek-lines small{display:block;overflow-wrap:anywhere}.order-peek-lines small,.order-peek-lines p{font-size:12px;color:var(--muted);line-height:1.7;margin:5px 0}.order-peek-note{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.7}@media(max-width:650px){.allocation-with-details{grid-template-columns:minmax(0,1fr) auto;gap:6px}.allocation-with-details>.allocation-row{display:grid;grid-template-columns:minmax(0,1fr) 96px;gap:8px}.allocation-with-details .amount-input{gap:4px;justify-content:flex-end;min-width:0}.allocation-with-details .amount-input input{width:80px;min-width:0;padding:6px 4px;appearance:textfield;-moz-appearance:textfield}.allocation-with-details .amount-input input::-webkit-inner-spin-button,.allocation-with-details .amount-input input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.allocation-with-details>.btn{justify-self:end;align-self:center;min-height:34px;padding:6px 8px;margin:0;font-size:12px;white-space:nowrap}.allocation-with-details>.btn>.icon{display:none}.record-order-with-details{gap:6px}.record-order-with-details>.btn{font-size:12px;padding:6px;min-height:34px}.order-peek-header{padding:13px 14px}.order-peek-body{padding:14px}.order-peek-lines .thumb{width:44px;height:44px;flex-basis:44px}}
.inventory-product{display:flex;align-items:flex-start;gap:12px;min-width:0}.inventory-product>.thumb{width:48px;height:48px;flex:0 0 48px;object-fit:contain;overflow:hidden;border-radius:6px}.inventory-product>div{min-width:0;flex:1}.inventory-product strong,.inventory-product h2,.inventory-product p{overflow-wrap:anywhere}.inventory-product>.thumb>svg{width:100%;height:100%}.stocktake-product{justify-content:flex-start;align-items:center;gap:12px}.stocktake-product>.thumb{width:48px;height:48px;flex:0 0 48px;object-fit:contain;border-radius:6px;overflow:hidden}.stocktake-product>.thumb>svg{width:100%;height:100%}.stocktake-product>div{min-width:0}.stocktake-product>div>strong,.stocktake-product>div>span{display:block;overflow-wrap:anywhere}.movement-with-photo{gap:12px}.movement-with-photo>.thumb{width:44px;height:44px;flex:0 0 44px;object-fit:contain;border-radius:5px;overflow:hidden}.movement-with-photo>.thumb>svg{width:100%;height:100%}.movement-with-photo>.movement-info{flex:1;min-width:0;overflow-wrap:anywhere}.movement-with-photo>.record-quantity{flex-shrink:0}@media(max-width:650px){.inventory-product{gap:9px}.inventory-product>.thumb{width:42px;height:42px;flex-basis:42px}.movement-with-photo{gap:8px}.movement-with-photo>.thumb{width:38px;height:38px;flex-basis:38px}}
#order-form .shipping-fields input,#order-shipping-form .shipping-fields input{height:36px;min-height:36px;padding:5px 9px}#order-form .shipping-fields textarea,#order-shipping-form .shipping-fields textarea{height:56px;min-height:56px}
.modal .stocktake-product{display:flex;align-items:center;justify-content:flex-start;gap:12px}
.shipping-fields>.form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}

.scan-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 3;
  max-height: 230px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--ink);
}

.scan-preview > .scan-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scan-preview.is-scanning::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, #45f58b 12% 88%, transparent) center top / 100% 2px no-repeat;
  filter: drop-shadow(0 0 4px #27e978);
  animation: scan-preview-sweep 2.1s linear infinite;
}

@keyframes scan-preview-sweep {
  from { transform: translateY(3%); }
  to { transform: translateY(97%); }
}

@media (prefers-reduced-motion: reduce) {
  .scan-preview.is-scanning::after {
    animation: none;
    transform: translateY(50%);
  }
}

@media (max-width: 650px) {
  .lookup-scanner-backdrop {
    align-items: flex-start;
    padding: calc(8px + env(safe-area-inset-top, 0px)) 12px max(8px, env(safe-area-inset-bottom, 0px));
  }

  .lookup-scanner-backdrop > .modal {
    max-height: 100%;
    overflow: hidden;
    border-radius: 16px;
  }

  .lookup-scanner-backdrop .modal-head,
  .lookup-scanner-backdrop .modal-footer {
    flex-shrink: 0;
  }

  .lookup-scanner-backdrop .modal-body {
    min-height: 0;
    max-height: none;
  }

  .lookup-scanner-backdrop .modal-footer {
    padding-bottom: 12px;
  }
}

.site-page {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.site-page > #app {
  flex: 1;
}

.site-page > #app:has(> .auth) {
  display: flex;
  flex-direction: column;
}

.site-page #app > .auth {
  flex: 1;
  min-height: 0;
}

.site-page #app > .auth .auth-form {
  min-height: 0;
}

.icp-footer {
  padding: 8px 12px max(8px, env(safe-area-inset-bottom, 0px));
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  background: var(--surface-soft);
}

.icp-footer a {
  display: inline-block;
  padding: 7px 4px;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 650px) {
  #app:has(> .mobile-nav) + .icp-footer {
    padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px));
  }
}

@media print {
  .icp-footer { display: none; }
}
