:root{--purple:#6d3baf;--deep:#382354;--pink:#f7e9f3;--bg:#f7f6fa;--text:#302b3a;--muted:#8a8494;--border:#ece8f0;--green:#218663;--orange:#d99427}*{box-sizing:border-box}body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:var(--bg);color:var(--text);font-size:14px}button,input,select{font:inherit}button,a,input,select{touch-action:manipulation}button{cursor:pointer}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #bd8eed;outline-offset:3px}.sidebar{width:244px;position:fixed;inset:0 auto 0 0;background:#fff;border-right:1px solid var(--border);padding:36px 22px;display:flex;flex-direction:column}.brand{display:flex;gap:12px;align-items:center;font-size:29px;font-weight:800;letter-spacing:2px;color:var(--deep)}.brand-mark{background:var(--purple);color:white;width:44px;height:48px;border-radius:15px 15px 15px 4px;text-align:center;font-family:Georgia,serif;font-style:italic;font-size:42px;line-height:45px}.brand small{display:block;font-size:9px;letter-spacing:2px;color:var(--muted);margin-top:4px}.nav-label{font-size:10px;letter-spacing:1.5px;color:#aaa1b4;margin:44px 12px 17px}nav{display:grid;gap:7px}nav a{display:flex;align-items:center;gap:13px;padding:13px 14px;border-radius:10px;color:#7d7389;font-weight:500}nav a.active{background:#f0e8f9;color:var(--purple);font-weight:700}nav a:hover{background:#f6f2fa}.nav-icon{width:22px;font-size:20px;text-align:center}.sidebar-footer{margin-top:auto;color:#7c7189;font-size:11px;line-height:1.8}.sidebar-footer small{display:block;font-size:10px;margin-top:8px}.live-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#83bca5;margin-right:7px}.workspace{margin-left:244px}.topbar{height:77px;border-bottom:1px solid var(--border);background:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 38px;font-size:12px}.muted{color:var(--muted)}.profile{display:flex;align-items:center;gap:6px;color:#786c85}.profile b{background:#f0e8f9;border-radius:50%;width:34px;height:34px;display:grid;place-items:center;color:var(--purple);margin-left:15px}main{max-width:1600px;margin:auto;padding:34px 38px 16px}.heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:26px}h1{font-size:28px;letter-spacing:-.8px;margin:0 0 7px;font-weight:700}h2{font-size:16px;margin:0}p{line-height:1.6}.heading p{margin:0;color:var(--muted);font-size:13px}.btn{border:1px solid var(--border);border-radius:8px;background:white;padding:11px 16px;color:var(--text);font-weight:600;white-space:nowrap}.btn.primary{background:var(--purple);border-color:var(--purple);color:white;box-shadow:0 4px 9px #6d3baf18}.btn.small{padding:7px 10px;font-size:12px}.btn.danger{color:#b34b65}.actions{display:flex;gap:8px;flex-wrap:wrap}.welcome{background:linear-gradient(110deg,#422865,#7446a9);border-radius:15px;color:white;padding:25px 28px;display:flex;align-items:center;justify-content:space-between;margin-bottom:24px;overflow:hidden;position:relative}.welcome h2{font-size:21px;margin-bottom:9px}.welcome p{color:#ddd1ef;margin:0;font-size:12px}.welcome .flower{font-size:78px;color:#dab3e2;line-height:1;transform:rotate(15deg);margin-right:22px}.welcome .eyebrow{font-size:9px;letter-spacing:2px;color:#ecc3e1;margin-bottom:9px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:17px;margin-bottom:24px}.stat{border:1px solid var(--border);border-radius:12px;background:#fff;padding:20px}.stat-top{display:flex;justify-content:space-between;align-items:center;color:#86798f;font-size:12px}.stat-icon{display:grid;place-items:center;width:33px;height:33px;border-radius:9px;background:#f3ecfb;color:var(--purple);font-size:18px}.stat:nth-child(2) .stat-icon{background:#fcecf3;color:#c26b9a}.stat:nth-child(3) .stat-icon{background:#fff5df;color:#b98b3c}.stat:nth-child(4) .stat-icon{background:#eaf6f0;color:var(--green)}.stat strong{display:block;margin-top:15px;font-size:25px;letter-spacing:-.7px}.stat small{display:block;color:var(--muted);font-size:10px;margin-top:9px}.grid{display:grid;grid-template-columns:1.65fr 1fr;gap:22px;margin-bottom:22px}.panel{background:white;border:1px solid var(--border);border-radius:12px;overflow:hidden}.panel-head{padding:20px 22px;display:flex;justify-content:space-between;gap:10px;align-items:center;border-bottom:1px solid var(--border)}.panel-head a{color:var(--purple);font-size:11px}.panel-body{padding:20px 22px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;white-space:nowrap;font-size:12px}th{text-align:left;font-size:10px;letter-spacing:.5px;color:#9c91a5;background:#fcfbfd;font-weight:500;padding:14px 20px}td{padding:17px 20px;border-bottom:1px solid #f3f0f6}tr:last-child td{border-bottom:0}td strong{font-weight:600}td small{display:block;color:var(--muted);margin-top:5px;font-size:10px}.badge{display:inline-block;padding:5px 9px;border-radius:5px;font-size:10px;background:#f1eafa;color:var(--purple)}.badge.green{background:#e8f5ed;color:#39825f}.badge.orange{background:#fff4df;color:#b68628}.badge.red{background:#fbe9ed;color:#b45264}.list-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:15px 0;border-bottom:1px solid var(--border)}.list-row:last-child{border-bottom:0}.list-name{display:flex;gap:12px;align-items:center}.avatar{width:36px;height:36px;background:#f5edf9;display:grid;place-items:center;color:#9866af;border-radius:10px;font-weight:600}.list-row strong{font-size:12px}.list-row small{display:block;color:var(--muted);font-size:10px;margin-top:5px}.stock-count{color:#be8a2d;font-weight:700;font-size:12px}.summary-strip{display:flex;justify-content:space-between;gap:20px;background:#faf7fc;border-radius:8px;padding:16px;margin-top:10px}.summary-strip small{color:var(--muted);font-size:10px}.summary-strip strong{display:block;margin-top:5px;color:var(--purple)}.empty{padding:35px 20px;text-align:center;color:var(--muted);line-height:1.8}.empty strong{display:block;color:var(--deep)}.toolbar{display:flex;align-items:center;gap:12px;margin-bottom:20px}.toolbar input{max-width:360px}.page-footer{padding:25px 38px;color:#afa6b8;font-size:10px;display:flex;justify-content:space-between}dialog{border:0;border-radius:15px;padding:0;width:min(650px,calc(100% - 28px));box-shadow:0 20px 100px #20122b40;max-height:90vh}dialog::backdrop{background:#25193377;backdrop-filter:blur(3px)}.dialog-heading{display:flex;align-items:center;justify-content:space-between;padding:20px 24px;border-bottom:1px solid var(--border)}.icon-button{border:0;background:transparent;color:#8b7a9b;font-size:27px;padding:0 5px}#dialog-body{padding:24px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}label{display:block;font-size:12px;color:#6c6177}input,select{display:block;width:100%;margin-top:7px;border:1px solid #e5dfec;border-radius:7px;padding:11px;background:white;color:var(--text);min-width:0}input:invalid:not(:placeholder-shown){border-color:#dca0aa}.full{grid-column:1/-1}.form-footer{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}.form-note{color:var(--muted);font-size:11px;line-height:1.7;margin:14px 0 0}.line-item{display:grid;grid-template-columns:1fr 75px 32px;align-items:end;gap:8px;margin:12px 0}.line-item button{height:38px}.order-total{font-size:18px;color:var(--purple);font-weight:700;margin-top:20px}.error{color:#b34b65;font-size:12px;margin-top:14px}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);padding:13px 22px;border-radius:10px;background:var(--deep);color:white;box-shadow:0 8px 30px #25193333;display:none;z-index:10;max-width:90vw}#install{border:0;color:var(--purple);background:#f2eafa;padding:9px;border-radius:6px;margin-top:10px}.detail-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:20px}.detail-metrics div{background:#f7f3fb;padding:13px;border-radius:8px}.detail-metrics small{color:var(--muted)}.detail-metrics strong{display:block;margin-top:6px}.status-select{font-size:11px;padding:7px;margin:0;max-width:155px}.count-label{font-size:11px;color:var(--muted)}@media(min-width:1500px){main{padding-top:44px}.welcome{padding:32px}}@media(max-width:1100px){.sidebar{width:205px;padding:30px 15px}.workspace{margin-left:205px}main{padding:25px 22px}.topbar{padding:0 22px}.stats{grid-template-columns:repeat(2,1fr)}.grid{grid-template-columns:1fr}.page-footer{padding:20px 22px}}@media(max-width:700px){.sidebar{position:fixed;inset:auto 0 0;width:100%;height:73px;padding:0;z-index:5;border-right:0;border-top:1px solid var(--border)}.brand,.nav-label,.sidebar-footer{display:none}nav{display:flex;overflow-x:auto;gap:0;height:100%;justify-content:space-around}nav a{flex:1;min-width:48px;padding:10px 3px;flex-direction:column;gap:4px;border-radius:0;font-size:8px;justify-content:center}.nav-icon{font-size:19px}.workspace{margin-left:0;padding-bottom:73px}.topbar{height:60px;padding:0 17px}.topbar .muted,.profile{font-size:10px}.profile b{margin-left:5px;width:28px;height:28px}main{padding:24px 16px 10px}.heading{align-items:flex-start;gap:12px}h1{font-size:24px}.heading p{font-size:11px}.heading .btn{padding:10px;font-size:11px}.welcome{padding:22px 20px}.welcome h2{font-size:18px}.welcome .flower{font-size:55px;margin-right:0}.welcome p{max-width:225px;font-size:11px}.stats{gap:11px}.stat{padding:15px}.stat strong{font-size:21px}.stat-top{font-size:10px}.panel-head,.panel-body{padding:17px}.panel-head h2{font-size:14px}th,td{padding:13px 15px}.form-grid{grid-template-columns:1fr}.full{grid-column:auto}.detail-metrics{grid-template-columns:1fr}.page-footer{padding:17px;font-size:9px}.toolbar{flex-wrap:wrap}.summary-strip{padding:12px;gap:10px}.summary-strip strong{font-size:12px}#toast{bottom:90px}.actions .btn{font-size:10px}.line-item{grid-template-columns:1fr 65px 28px}}
:root .photo-placeholder{display:flex;align-items:center;gap:14px;border:1px dashed #d8cce5;border-radius:9px;background:#faf7fd;padding:16px;color:#8b729f}.photo-placeholder>span{font-size:30px}.photo-placeholder strong{font-size:12px}.photo-placeholder small{display:block;margin-top:5px;font-size:11px}.form-grid input[readonly]{background:#f5f2f8;color:#8a8494}.form-grid label{min-width:0}
:root .badge.critical{background:#ffe9df;color:#bb5428}.stock-alert-value{text-align:right}.stock-alert-value small{display:block;color:var(--muted);margin-top:6px}.dashboard-section{margin-bottom:22px;margin-top:22px}.performance-grid{display:grid;grid-template-columns:1fr 1fr}.performance-period{padding:22px}.performance-period+ .performance-period{border-left:1px solid var(--border)}.performance-period h3{font-size:10px;color:var(--purple);letter-spacing:1px;margin:0 0 18px}.performance-values{display:grid;grid-template-columns:1.3fr 1fr 1fr;gap:14px}.performance-values small{display:block;font-size:10px;color:var(--muted);line-height:1.5}.performance-values strong{display:block;margin-top:9px;font-size:18px}.stock-preview{padding:14px;border-radius:8px;background:#f4edf9;color:var(--purple);font-size:12px;line-height:1.8}.rankings{grid-template-columns:1fr}.heading .actions{justify-content:flex-end}.grid>*,.stats>*,.performance-grid>*{min-width:0}@media(max-width:700px){.performance-grid{grid-template-columns:1fr}.performance-period+.performance-period{border-left:0;border-top:1px solid var(--border)}.performance-period{padding:17px}.performance-values strong{font-size:15px}.heading:has(.actions){flex-wrap:wrap}.heading .actions{justify-content:flex-start}.heading .actions .btn{font-size:11px}}
[hidden]{display:none!important}.auth-screen{min-height:100dvh;display:grid;place-items:center;padding:24px;background:radial-gradient(ellipse at 20% 20%,#efe2f8,transparent 65%),var(--bg)}.auth-card{width:min(100%,420px);padding:36px;background:white;border:1px solid var(--border);border-radius:20px;box-shadow:0 20px 70px #4b2b7612}.auth-card .brand{margin-bottom:36px}.auth-card h1{font-size:25px}.auth-card>p{color:var(--muted);font-size:13px}.auth-card label{margin-top:18px}.auth-card button{width:100%;margin-top:10px}.cloud-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}.cloud-actions .profile{max-width:250px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.btn:disabled{opacity:.55;cursor:wait}@media(max-width:700px){.auth-card{padding:27px}.auth-card .brand{display:flex}.topbar{height:auto;min-height:65px;gap:10px;padding:12px 16px;align-items:flex-start}.topbar>span{max-width:95px}.cloud-actions{max-width:240px}.cloud-actions .profile{width:100%;font-size:9px}.cloud-actions .btn{font-size:9px;padding:6px}.cloud-actions #import-local{white-space:normal;max-width:230px}}
.profile-menu{position:relative}.profile-menu summary{cursor:pointer;list-style:none;padding:8px}.profile-options{position:absolute;right:0;top:100%;z-index:20;background:white;border:1px solid #eee;border-radius:12px;padding:10px;box-shadow:0 8px 24px #28154818;display:grid;gap:8px;min-width:150px}.profile-menu summary::-webkit-details-marker{display:none}
.product-view-buttons{margin-bottom:18px;flex-wrap:wrap}.product-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:18px}.product-filters label{min-width:0}.product-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:20px}.product-card{border:1px solid var(--border);border-radius:14px;overflow:hidden;background:white;min-width:0}.product-photo{position:relative;aspect-ratio:4/3;display:grid;place-items:center;background:linear-gradient(135deg,#f1e5fa,#fcf0f5 70%,#fff4da);overflow:hidden;color:var(--purple)}.product-photo img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#fff}.product-monogram{font-size:32px;letter-spacing:5px;font-weight:700}.product-monogram small{display:block;font-size:8px;text-align:center;letter-spacing:4px;margin-top:8px;color:#a689ba}.photo-loaded .product-monogram{visibility:hidden}.product-card-content{padding:18px}.product-card h2{font-size:17px;margin:7px 0;overflow-wrap:anywhere}.product-card p,.product-category{font-size:11px;color:var(--muted)}.product-price{display:block;color:var(--purple);font-size:20px;margin:14px 0}.product-availability{display:flex;gap:8px;justify-content:space-between;align-items:center;margin-bottom:12px;font-size:12px}.product-card-content>.btn{float:right}.product-table-name{display:flex;align-items:center;gap:12px}.product-photo.thumb{width:50px;height:50px;aspect-ratio:1;flex-shrink:0;border-radius:8px}.thumb .product-monogram{font-size:10px;letter-spacing:1px}.thumb .product-monogram small{display:none}.photo-editor{padding:18px;border:1px solid var(--border);border-radius:10px;min-width:0}.photo-editor>strong{font-size:11px;letter-spacing:1px;color:var(--purple)}#photo-preview{max-width:260px;margin:14px auto}.photo-drop{border:1px dashed #ccb5e0;background:#faf6fd;border-radius:8px;padding:14px}.photo-drop.drag-over{background:#eee0fa;border-color:var(--purple)}.photo-editor .btn{margin-top:14px}.photo-editor input[type=file]{font-size:11px;max-width:100%}.catalogue-print-header{display:none}@media(max-width:700px){.product-filters{grid-template-columns:1fr;gap:10px}.product-view-buttons .btn{flex:1;min-width:125px}.product-cards{grid-template-columns:1fr;gap:16px}.product-card-content{padding:18px}.product-photo{aspect-ratio:4/3}.product-card h2{font-size:19px}.photo-editor{padding:14px}}@media print{@page{size:A4;margin:12mm}body.printing-catalogue{background:white!important;color:#222}body.printing-catalogue .sidebar,body.printing-catalogue .topbar,body.printing-catalogue .page-footer,body.printing-catalogue #auth-screen,body.printing-catalogue dialog,body.printing-catalogue #toast{display:none!important}body.printing-catalogue .workspace{margin:0!important;padding:0!important}body.printing-catalogue main{padding:0!important}body.printing-catalogue main>*:not(.catalogue-print-area){display:none!important}body.printing-catalogue .catalogue-print-header{display:flex;justify-content:space-between;gap:12px;margin-bottom:8mm;font-size:11pt}body.printing-catalogue .product-cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:5mm}body.printing-catalogue .product-card{break-inside:avoid;box-shadow:none;border-color:#ddd}body.printing-catalogue .product-card-content{padding:3mm}body.printing-catalogue .product-card h2{font-size:11pt}body.printing-catalogue .product-price{font-size:12pt;margin:3mm 0}body.printing-catalogue .btn{display:none!important}body.printing-catalogue .product-photo{print-color-adjust:exact;-webkit-print-color-adjust:exact}body.printing-catalogue .product-monogram{font-size:20pt}}

.return-line{min-width:0;margin:0 0 16px;padding:16px;border:1px solid var(--border);border-radius:10px}.return-line legend{max-width:100%;white-space:normal;overflow-wrap:anywhere;color:var(--purple);font-weight:600}.return-line p{overflow-wrap:anywhere}.panel>.detail-metrics{padding:20px;margin:0}.panel>.detail-metrics strong{overflow-wrap:anywhere}.form-footer{flex-wrap:wrap}@media(max-width:700px){.return-line{padding:12px}.form-footer .btn{white-space:normal;max-width:100%}}

/* Dedicated portal layout. Internal screens keep their existing styles. */
.portal-mode .workspace{margin-left:0}.portal-mode main{max-width:1120px;padding-bottom:95px}.portal-mode .topbar{position:sticky;top:0;z-index:10}.portal-mode .page-footer{padding-bottom:85px}.portal-mode #portal-navigation{height:auto;position:fixed;bottom:0;left:0;right:0;z-index:30;display:flex;justify-content:center;gap:0;border-top:1px solid var(--border);background:#fff;padding:8px 8px max(8px,env(safe-area-inset-bottom))}.portal-mode #portal-navigation a{flex:1;max-width:180px;display:flex;flex-direction:column;gap:4px;padding:9px 3px;font-size:11px;color:var(--muted);position:relative}.portal-mode #portal-navigation a[aria-current]{background:#f1e9fa;color:var(--purple)}.portal-mode #portal-navigation a>span{font-size:23px}.portal-mode #portal-navigation a>small{position:absolute;top:1px;right:15%;background:#eacbe2;border-radius:12px;min-width:20px;padding:2px;color:var(--purple)}.portal-mode .stats{grid-template-columns:repeat(3,minmax(0,1fr))}.portal-mode h1{overflow-wrap:anywhere}.portal-mode .panel+.panel{margin-top:20px}.portal-photo-button{display:block;width:100%;padding:0;border:0;background:transparent}.portal-cards{margin-top:18px}.portal-cards .btn{float:none;width:100%}.portal-filters{display:grid;grid-template-columns:2fr 1fr;gap:14px}.portal-check{display:flex;align-items:center;gap:10px}.portal-check input{width:auto;margin:0}.portal-basket{display:grid;gap:14px}.portal-basket-row{display:grid;grid-template-columns:64px minmax(0,1fr) auto;align-items:center;gap:14px;padding:18px;background:#fff;border:1px solid var(--border);border-radius:12px;min-width:0}.portal-basket-row strong{display:block;overflow-wrap:anywhere}.portal-basket-row small{display:block;color:var(--muted);margin-top:6px}.portal-basket-row input{max-width:100px}.portal-basket-row .btn{margin-top:14px}.portal-order-cards{display:grid;gap:16px}.portal-order-cards .actions{margin-top:14px}.portal-mode textarea{font:inherit;border:1px solid var(--border);border-radius:8px;width:100%;padding:12px;margin-top:8px;resize:vertical}.portal-mode #portal-checkout{padding:20px 0}.portal-mode #portal-checkout .portal-check{margin:18px 0}.portal-mode #toast{bottom:95px}.portal-mode .product-price{font-size:22px}@media(max-width:700px){.portal-mode main{padding:22px 16px 95px}.portal-mode .stats{grid-template-columns:1fr}.portal-mode .stat{padding:18px}.portal-mode .stat strong{font-size:26px}.portal-mode .welcome{padding:22px}.portal-mode .welcome h2{font-size:19px}.portal-mode .welcome .flower{display:none}.portal-filters{grid-template-columns:1fr}.portal-basket-row{grid-template-columns:48px minmax(0,1fr);padding:14px;gap:12px}.portal-basket-row>div:last-child{grid-column:2}.portal-mode .cloud-actions .profile{white-space:normal;width:auto}.portal-mode .topbar>span{max-width:60px}.portal-mode #portal-checkout>button{width:100%}.portal-cards{grid-template-columns:1fr}}
/* V1.6 daily operations: existing typography, panels and brand palette. */
.operations-header,.ops-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
#network-status{font-size:10px}#app-version{display:block;margin-top:6px}.update-notice{padding:12px 20px;background:#fff3d7;display:flex;align-items:center;justify-content:space-between;gap:12px}
@media(max-width:700px){button.btn,button.icon-button{min-height:44px}.sidebar #navigation a{min-height:44px}.ops-actions{gap:10px}dialog{max-width:calc(100vw - 24px)}#integrity-result .table-wrap{max-width:100%}}
.ops-panel{padding:22px}.ops-panel h2{margin-top:0}.ops-panel form>label{display:block}.ops-panel form>label select{width:100%}
.ops-dashboard-tools{margin-bottom:18px}.ops-panel+.ops-panel{margin-top:20px}
.topbar:has(#operations-header){height:auto;min-height:77px;gap:12px;padding-top:14px;padding-bottom:14px;flex-wrap:wrap}.topbar:has(#operations-header) .cloud-actions{flex-wrap:wrap;min-width:0;max-width:100%}
.ops-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:14px;margin:18px 0}
.ops-filters label{min-width:0}.ops-filters input,.ops-filters select{width:100%}
.ops-checkbox{display:flex;align-items:center;gap:8px}.ops-checkbox input{width:auto}
.notification-list{display:grid;gap:12px;margin:16px 0}.notification-item{padding:16px;border:1px solid #e8e0f0;border-radius:14px}
.notification-item.unread{border-left:4px solid #8b4cc5;background:#faf6ff}.notification-item p{margin:8px 0}
.search-result{display:block;width:100%;text-align:left;margin:8px 0}
.report-print-title{margin:20px 0}.report-print-title h1{font-size:24px}
@media print{body.printing-report main>*:not(#operational-report){display:none!important}}
@media(max-width:600px){.topbar{flex-wrap:wrap;gap:10px}.cloud-actions{flex-wrap:wrap;max-width:100%}.operations-header{max-width:100%}.ops-filters{grid-template-columns:1fr 1fr}.ops-actions .btn{max-width:100%}.portal-mode .operations-header button span:not(.badge){display:none}}
@media(max-width:700px){.sidebar #navigation{justify-content:flex-start}.sidebar #navigation a{flex:0 0 64px}.ops-panel{padding:17px}.ops-filters{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media print{body.printing-report .sidebar,body.printing-report .topbar,body.printing-report .page-footer,body.printing-report #report-form,body.printing-report main>.page-heading,body.printing-report dialog{display:none!important}body.printing-report .workspace{margin:0!important;width:100%!important}body.printing-report main{padding:0!important}body.printing-report #operational-report .panel{break-inside:avoid;box-shadow:none}body.printing-report .table-wrap{overflow:visible}body.printing-report .stats{grid-template-columns:repeat(4,1fr)}body.printing-report #operational-report{color:#000}body.printing-report #operational-report table{font-size:10pt}}

#reference-dialog .dialog-body{padding:24px}#reference-dialog{z-index:20}#reference-results .table-wrap{max-width:100%}

.lifecycle-menu{display:inline-block;vertical-align:middle;margin:3px;min-width:90px}.lifecycle-menu summary{cursor:pointer;list-style:none;padding:9px 12px;border:1px solid var(--border);border-radius:8px;font-weight:600}.lifecycle-menu[open]{display:block}.lifecycle-options{display:grid;gap:6px;padding:8px;border:1px solid var(--border);border-radius:8px;background:white;min-width:150px}.lifecycle-options .btn{white-space:normal;text-align:left}.lifecycle-options .danger{color:#b42338;background:#fff3f5}.lifecycle-menu summary:focus-visible{outline:2px solid var(--purple);outline-offset:2px}@media(max-width:700px){.lifecycle-menu summary{min-height:44px;display:flex;align-items:center}}

.recommended-price{display:grid;gap:4px;margin:12px 0}.recommended-price small{color:var(--muted)}#recommended-preview{display:block;margin-top:6px;color:#6d3baf}
.product-detail{min-width:0}.detail-tabs{display:flex;gap:8px;overflow-x:auto;margin:18px 0;padding:4px 0;scroll-snap-type:x proximity}.detail-tabs button{flex-shrink:0;min-height:44px}.detail-panel{padding:24px;min-width:0}.detail-panel section{margin-bottom:24px}.product-prose{white-space:pre-wrap;overflow-wrap:anywhere}.detail-overview{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:28px}.detail-overview .product-photo{height:320px}.detail-gallery,.detail-thumbnails{display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x proximity;padding:8px 0;max-width:100%}.detail-media{flex:0 0 260px;border:1px solid #e9e3ef;border-radius:14px;padding:12px;scroll-snap-align:start}.detail-media .product-photo{height:210px}.detail-thumb{flex:0 0 90px;border:1px solid #e9e3ef;border-radius:10px;background:white;padding:4px;cursor:pointer}.detail-thumb .product-photo{height:75px}.detail-media .actions{display:flex;flex-wrap:wrap;gap:6px}.detail-gallery figure{flex:0 0 150px;margin:0;overflow-wrap:anywhere}.detail-gallery figure img{max-width:100%;height:140px;object-fit:contain}.media-drop{padding:20px;border:2px dashed #c6addf;border-radius:12px}.detail-image-view .product-photo{height:60vh}.product-card[data-product-detail],tr[data-product-detail]{cursor:pointer}[data-product-detail]:focus-visible,.detail-thumb:focus-visible{outline:3px solid #6d3baf;outline-offset:2px}.detail-panel p,.detail-panel li,.detail-media p{overflow-wrap:anywhere}.detail-panel .actions button{min-height:44px}
@media(max-width:600px){.detail-overview{grid-template-columns:minmax(0,1fr);gap:16px}.detail-panel{padding:14px}.detail-overview .product-photo{height:260px}.detail-gallery{max-width:100%;touch-action:pan-x pan-y}.detail-media{flex-basis:240px}.detail-tabs{margin-right:0}.product-detail h1{overflow-wrap:anywhere}.product-detail>.actions{flex-wrap:wrap}}
.detail-media-image{display:block;width:100%;padding:0;border:0;background:transparent;cursor:zoom-in}.detail-media-image:disabled{cursor:default}.detail-media-image:focus-visible{outline:3px solid #6d3baf;outline-offset:3px}body.lightbox-open{overflow:hidden}dialog.product-lightbox{margin:0;width:100vw;max-width:none;height:100dvh;max-height:none;border:0;border-radius:0;padding:18px;box-sizing:border-box;background:#181020;color:white;overflow:hidden}dialog.product-lightbox[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto auto;gap:12px}.product-lightbox::backdrop{background:#181020}.lightbox-header{display:flex;align-items:center;justify-content:space-between;gap:16px;min-width:0}.lightbox-header strong{overflow-wrap:anywhere}.lightbox-stage{display:grid;grid-template-columns:48px minmax(0,1fr) 48px;gap:12px;min-height:0;align-items:center;touch-action:pan-y pinch-zoom}.lightbox-image{width:100%;height:100%;min-height:0;max-height:100%;object-fit:contain}.lightbox-arrow{font-size:30px;min-height:48px;padding:0!important}.product-lightbox .btn{background:#33273f;border-color:#746184;color:white;min-width:44px;min-height:44px}.lightbox-caption{margin:0;overflow-wrap:anywhere;max-height:4em;overflow:auto}.lightbox-thumbnails{display:flex;gap:10px;overflow-x:auto;min-width:0;padding:5px;max-height:110px}.lightbox-thumb{flex:0 0 82px;padding:4px;background:#33273f;color:white;border:2px solid transparent;border-radius:8px;cursor:pointer}.lightbox-thumb img{width:70px;height:58px;object-fit:contain}.lightbox-thumb span{display:block;font-size:10px;line-height:14px}.lightbox-thumb[aria-current=true]{border-color:#eab4ff}.product-lightbox button:focus-visible{outline:3px solid #ffcb55;outline-offset:2px}@media(max-width:600px){dialog.product-lightbox{padding:10px;gap:8px}.lightbox-stage{gap:5px;grid-template-columns:44px minmax(0,1fr) 44px}.lightbox-header strong{font-size:14px}.lightbox-caption{font-size:13px}.lightbox-thumbnails{max-height:100px}}
.detail-main-image{max-width:720px;margin:0 auto 24px}.detail-main-image>.product-photo,.detail-main-image>.detail-media-image>.product-photo{height:360px}.product-description-editor{width:100%;min-height:280px;resize:vertical;line-height:1.65}.product-detail .product-prose{line-height:1.75}@media(max-width:600px){.detail-main-image>.product-photo,.detail-main-image>.detail-media-image>.product-photo{height:260px}.product-description-editor{min-height:280px}.product-detail .detail-tabs{overflow-x:visible;flex-wrap:nowrap}.product-detail .detail-tabs button{flex:1;min-width:0}}

.product-image-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:16px;margin-bottom:20px}.product-image-grid .detail-media-image{border:1px solid #e7e1ef;border-radius:16px;overflow:hidden;padding:8px;min-width:0}.product-image-grid .product-photo,.product-image-grid img{width:100%;height:220px;object-fit:contain}.product-image-grid .detail-media-image:focus-visible{outline:3px solid #e5ad36;outline-offset:3px}@media(max-width:480px){.product-image-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.product-image-grid .product-photo,.product-image-grid img{height:150px}.product-detail [data-detail=upload]{min-height:44px}}

.product-image-tile{min-width:0}.product-image-delete{display:block;margin:6px auto 0;min-height:44px;padding:6px 12px;font-size:12px}

#initial-stock-confirmation{max-width:520px;width:calc(100% - 32px);box-sizing:border-box}#initial-stock-confirmation p{line-height:1.6}#initial-stock-confirmation button{min-height:44px}

/* Compact catalogue cards; table, portal and product detail retain their layout. */
@media screen{.compact-product-cards{grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:14px}.compact-product-cards .product-card{border-radius:14px;padding:8px;overflow:visible}.compact-product-cards .product-card>.product-photo{aspect-ratio:auto;height:130px;border-radius:10px}.compact-product-cards .product-card-content{padding:10px 4px 4px}.compact-product-cards .product-category{font-size:10px;line-height:1.3}.compact-product-cards h2{font-size:16px;line-height:1.35;margin:4px 0}.compact-product-cards .product-reference{font-size:10px;margin:0 0 5px;line-height:1.3;overflow-wrap:anywhere}.compact-product-cards .recommended-price{margin:8px 0;gap:2px}.compact-product-cards .recommended-price small{font-size:10px;line-height:1.35}.compact-product-cards .product-price{font-size:22px;margin:0 0 5px;line-height:1.2}.product-secondary-prices{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:8px}.product-secondary-prices small,.product-secondary-prices strong{display:block;overflow-wrap:anywhere}.product-secondary-prices strong{font-size:13px;line-height:1.5;color:var(--text)}.compact-product-cards .product-availability{font-size:11px;margin:8px 0;gap:6px}.product-stock{min-width:0;overflow-wrap:anywhere}.product-stock>span{color:var(--purple);margin-right:3px}.compact-product-cards .badge{font-size:9px;padding:4px 7px}.product-card-footer{display:flex;align-items:center;gap:6px;flex-wrap:wrap;border-top:1px solid var(--border);padding-top:7px}.product-card-footer>.badge{margin-right:auto}.product-card-footer .btn,.product-card-footer .lifecycle-menu>summary{font-size:11px;padding:6px 8px;min-height:32px;margin:0}.product-card-footer .lifecycle-menu{margin:0}.product-card-footer .lifecycle-options{z-index:6;right:0;left:auto}.compact-product-cards .product-card:has(.lifecycle-menu[open]){position:relative;z-index:7}}
@media screen and (min-width:1800px){.compact-product-cards{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media screen and (max-width:700px){.compact-product-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.compact-product-cards .product-card>.product-photo{height:120px}.product-card-footer .btn,.product-card-footer .lifecycle-menu>summary{min-height:44px;display:inline-flex;align-items:center}}
@media screen and (max-width:519px){.compact-product-cards{grid-template-columns:1fr}.compact-product-cards .product-card>.product-photo{height:120px}.compact-product-cards .product-card-content{padding:8px 6px 4px}.compact-product-cards h2{font-size:17px}}

.lifecycle-options [data-admin-action="hard-delete"]{color:#b42338;background:#fff3f5;font-weight:700}#dialog [name=confirmation]{text-transform:none}#dialog button[data-hard-delete],#dialog [name=confirmation]{max-width:100%}@media(max-width:480px){#dialog .form-footer{flex-wrap:wrap}#dialog button[data-hard-delete],#dialog button[type=submit]{min-height:44px;white-space:normal}}
.stock-location-filter{padding:16px 22px;border-bottom:1px solid var(--border);background:#fff}.stock-location-filter label{max-width:320px}.stock-location-filter select:focus{outline:2px solid var(--purple);outline-offset:2px}.stock-location-filter small{display:block;margin-top:8px;color:var(--muted)}@media(max-width:700px){.stock-location-filter{padding:16px}.stock-location-filter label{max-width:none}.stock-location-filter select{min-height:44px}}
.portal-admin-filters{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-bottom:20px}.portal-admin-pagination{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:16px;flex-wrap:wrap}.portal-access-section{padding:18px 0;margin:16px 0;border-block:1px solid var(--border)}.portal-access-account dl{display:grid;grid-template-columns:1fr 1.5fr;gap:10px;font-size:12px}.portal-access-account dt{color:var(--muted)}.portal-access-account dd{margin:0;overflow-wrap:anywhere}.portal-secret-dialog .dialog-body{padding:22px}.portal-secret-dialog input{font-family:monospace}@media(max-width:900px){.portal-admin-filters{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.portal-admin-filters{grid-template-columns:1fr}.portal-access-account dl{grid-template-columns:1fr}.portal-access-section .actions .btn{white-space:normal;min-height:44px;max-width:100%}.portal-admin-pagination .btn{min-height:44px}}

/* Reseller portal: mobile first, isolated from internal management screens. */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.portal-mode{--portal-nav-height:78px;--muted:#6f657c}
.portal-mode .workspace{width:100%;min-width:0}
.portal-mode main{width:100%;max-width:1120px;margin:auto;padding:20px 14px calc(100px + env(safe-area-inset-bottom))}
.portal-mode main:has(#portal-checkout),.portal-mode main:has(.portal-detail-buy){padding-bottom:calc(170px + env(safe-area-inset-bottom))}
.portal-mode .page-footer{display:none}
.portal-mode .btn,.portal-mode input,.portal-mode select,.portal-mode summary{min-height:44px;font-size:14px}
.portal-mode .btn{padding:10px 12px;white-space:normal;line-height:1.35}
.portal-mode .heading{margin-bottom:18px;gap:12px}
.portal-mode .heading h1,.portal-mode .product-detail h1{font-size:25px;margin:0 0 8px;line-height:1.25}
.portal-mode .heading p{font-size:14px;line-height:1.5;margin:0}
.portal-mode .topbar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 10px;position:sticky;top:0;z-index:35;min-height:82px;height:auto;padding:calc(8px + env(safe-area-inset-top)) 14px 8px;background:#fff;border-bottom:1px solid var(--border)}
.portal-mode .topbar:has(#operations-header){gap:4px 10px;padding-top:calc(8px + env(safe-area-inset-top));padding-bottom:8px}
.portal-mode .topbar>span:first-child{grid-column:1;grid-row:1;font-size:24px;font-weight:750;letter-spacing:2px;max-width:none;align-self:center}
.portal-mode .topbar>span:first-child .muted{display:none}
.portal-mode .cloud-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-column:1/-1;grid-row:2;align-items:center;width:100%;gap:10px}
.portal-mode .profile-menu{grid-column:1;grid-row:1;min-width:0;max-width:100%}
.portal-mode .cloud-actions .profile{font-size:13px;font-weight:500;padding:5px 0;min-height:44px;width:auto;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:flex;align-items:center}
.portal-mode .profile-options{max-width:calc(100vw - 28px)}
.portal-mode .profile-options .btn{width:100%;font-size:14px;min-height:44px}
.portal-mode #operations-header{grid-column:2;grid-row:1;justify-content:end;align-self:center}
.portal-mode #operations-header button{min-width:44px;padding:10px;font-size:16px}
.portal-mode #operations-header button>span:not(.badge){display:none}
.portal-mode #network-status{grid-column:2;grid-row:1;align-self:center;justify-self:end;font-size:12px;max-width:130px;white-space:normal}
.portal-mode #refresh-cloud,.portal-mode #install{display:none}
.portal-mode .profile-options #refresh-cloud,.portal-mode .profile-options #install{display:block;width:100%;min-height:44px;font-size:14px;padding:10px 12px}
.portal-mode #portal-navigation{height:calc(var(--portal-nav-height) + env(safe-area-inset-bottom));padding:5px 4px calc(5px + env(safe-area-inset-bottom));align-items:stretch;box-shadow:0 -4px 20px #38235408}
.portal-mode #portal-navigation a{border-radius:12px;min-width:0;min-height:44px;align-items:center;justify-content:center;padding:6px 2px;gap:3px}
.portal-mode #portal-navigation a>span:first-child{font-size:23px;line-height:24px}
.portal-mode #portal-navigation a>.portal-nav-label{font-size:12px;line-height:18px;font-weight:600}
.portal-mode #portal-navigation a>small{font-size:11px;background:var(--purple);color:#fff;right:10%;top:0;min-width:20px;text-align:center}
.portal-mode #portal-navigation a[aria-current]{background:#ede3f8;color:#6d3baf}
.portal-mode .stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:16px 0 24px}
.portal-mode .stat{padding:14px;min-width:0;border-radius:14px}
.portal-mode .stat-top{font-size:12px;line-height:1.4;gap:6px}
.portal-mode .stat strong{font-size:20px;margin-top:10px;overflow-wrap:anywhere;line-height:1.2}
.portal-mode .stat>small{display:none}
.portal-mode .stat-icon{font-size:17px}
.portal-mode .portal-welcome{padding:18px 20px;border-radius:18px;margin:16px 0;min-height:0}
.portal-mode .portal-welcome h2{font-size:18px;margin:0 0 12px}
.portal-mode .portal-welcome .btn{background:#fff;color:var(--purple);border:0}
.portal-mode .dashboard-section>h2{font-size:19px;margin-bottom:12px}
.portal-mode .portal-cards{display:grid;grid-template-columns:1fr;gap:12px;margin-top:12px}
.portal-mode .portal-cards .product-card{border-radius:16px;min-width:0;box-shadow:0 3px 12px #38235404}
.portal-mode .portal-cards .product-photo{aspect-ratio:1;height:auto}
.portal-mode .portal-cards .product-photo img{object-fit:contain}
.portal-mode .portal-cards .product-card-content{padding:12px;display:flex;flex-direction:column;gap:10px}
.portal-mode .portal-cards h2{font-size:16px;line-height:1.35;margin:0;min-height:43px;font-weight:650}
.portal-mode .portal-cards .badge{font-size:12px;align-self:flex-start;line-height:1.3;white-space:normal}
.portal-prices{display:flex;flex-direction:column;gap:5px}
.portal-prices small{font-size:12px;color:var(--muted)}
.portal-prices strong,.portal-rail-price{font-size:20px;color:var(--purple);line-height:1.15}
.portal-prices span{font-size:12px;line-height:1.4;color:#6f657c}
.portal-mode .portal-cards .btn{float:none;width:100%;font-size:14px;min-height:44px}
.portal-mode .portal-cards.portal-rail{display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x proximity;padding:2px 2px 12px;max-width:100%}
.portal-rail .product-card{flex:0 0 156px;scroll-snap-align:start}
.portal-mode .portal-rail .product-photo{aspect-ratio:1.2}
.portal-mode .portal-rail .product-card-content{gap:10px}
.portal-mode .portal-rail h2{font-size:15px}
.portal-catalogue-toolbar{display:flex;gap:10px;align-items:center}
.portal-search-label{flex:1;min-width:0}
.portal-mode #portal-search{margin:0;width:100%;font-size:14px;padding:12px;border-radius:12px}
.portal-catalogue-toolbar>.btn{flex-shrink:0}
.portal-results{font-size:13px;color:var(--muted);margin:14px 0 0}
.portal-load-more{display:block;width:100%;margin-top:20px}
.portal-mode dialog.portal-sheet,.portal-mode dialog.portal-confirm{padding:22px;width:calc(100% - 24px);max-width:520px;border-radius:20px;border:0;max-height:calc(90dvh - env(safe-area-inset-top));overflow-y:auto}
.portal-mode dialog.portal-sheet{margin:auto auto 0;width:100%;border-radius:22px 22px 0 0;padding-bottom:calc(20px + env(safe-area-inset-bottom))}
.portal-filter-form{display:grid;gap:20px}
.portal-mode .portal-filter-form select{width:100%;margin-top:8px}
.portal-mode .portal-check{font-size:14px;line-height:1.45;min-height:44px}
.portal-mode .portal-check input{width:24px;height:24px;min-height:24px;flex-shrink:0;accent-color:var(--purple)}
.portal-sheet-actions{display:flex;gap:12px;margin-top:12px}
.portal-sheet-actions>.btn{flex:1;min-width:0}
.portal-mode .portal-quantity{display:flex;align-items:center;justify-content:space-between;gap:6px;min-width:0}
.portal-mode .portal-quantity .btn{flex:0 0 44px;width:44px;min-width:44px;height:44px;font-size:20px;padding:4px}
.portal-quantity output{font-size:16px;font-weight:650;min-width:20px;text-align:center}
.portal-mode .portal-quantity input{margin:0;width:56px;min-width:0;max-width:72px;padding:8px;text-align:center;font-size:16px}
.portal-mode .portal-basket-row{grid-template-columns:56px minmax(0,1fr);padding:14px;gap:12px;border-radius:16px}
.portal-mode .portal-basket-row>.product-photo{width:56px;height:56px;align-self:start}
.portal-mode .portal-basket-row>div:nth-child(2)>strong{font-size:16px;line-height:1.35}
.portal-mode .portal-basket-row small{font-size:14px;margin-bottom:12px}
.portal-mode .portal-basket-subtotal{grid-column:1/-1;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;border-top:1px solid var(--border);padding-top:10px}
.portal-mode .portal-basket-subtotal strong{display:inline;font-size:16px}
.portal-mode .portal-basket-subtotal .btn{margin:0}
.portal-summary{border:1px solid var(--border);background:white;border-radius:16px;padding:16px;margin:18px 0}
.portal-mode dl{margin:0}
.portal-mode dl>div{display:flex;justify-content:space-between;gap:12px;align-items:start;padding:7px 0;font-size:14px;min-width:0}
.portal-mode dt{color:var(--muted);min-width:0}
.portal-mode dd{margin:0;text-align:right;font-weight:600;overflow-wrap:anywhere;min-width:0}
.portal-summary-total{border-top:1px solid var(--border);margin-top:8px;font-size:18px!important}
.portal-summary-total dd{color:var(--purple)}
.portal-mode #portal-checkout{padding:0 0 10px}
.portal-mode #portal-checkout textarea{min-height:88px;font-size:16px}
.portal-mode .portal-checkout-bar,.portal-mode .portal-detail-buy{position:fixed;bottom:calc(var(--portal-nav-height) + env(safe-area-inset-bottom));left:0;right:0;z-index:25;background:#fff;border-top:1px solid var(--border);padding:10px 14px}
.portal-mode .portal-checkout-bar>.btn,.portal-mode .portal-detail-buy>.btn{display:block;width:100%;max-width:720px;margin:auto;min-height:48px;font-size:16px}
.portal-mode .portal-order-cards{gap:12px}
.portal-mode .portal-order-cards .panel-body{padding:18px;border-radius:16px}
.portal-card-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.portal-card-heading>strong{overflow-wrap:anywhere}
.portal-mode .badge{font-size:12px}
.portal-mode .portal-order-total{display:block;font-size:23px;color:var(--purple);margin:16px 0 10px}
.portal-mode .portal-order-cards .actions{display:flex;flex-wrap:wrap;gap:10px}
.portal-mode .portal-order-cards .actions .btn{flex:1;font-size:14px}
.portal-mode #dialog{max-width:calc(100% - 24px);width:600px;max-height:90dvh;border-radius:18px}
.portal-mode #dialog .dialog-heading{padding:16px;gap:12px}
.portal-mode #dialog .dialog-heading h2{font-size:20px;overflow-wrap:anywhere}
.portal-mode #dialog .icon-button{min-width:44px;min-height:44px}
.portal-mode #dialog-body{padding:16px}
.portal-records{display:grid;gap:10px}
.portal-record{border:1px solid var(--border);border-radius:14px;padding:14px;min-width:0;background:white}
.portal-record p{font-size:14px;line-height:1.45;margin:10px 0;overflow-wrap:anywhere}
.portal-record>strong{font-size:16px}
.portal-account-section{margin:16px 0;background:#fff;border:1px solid var(--border);border-radius:16px;padding:14px}
.portal-account-section>summary{font-size:18px;font-weight:650;cursor:pointer;padding:8px 0}
.portal-account-section .portal-records{margin-top:12px}
.portal-account-profile{padding:18px!important;border-radius:16px}
.portal-account-profile h2{font-size:20px}
.portal-success{padding:18px;background:#f0e8fa;border:1px solid #dfcfee;border-radius:16px;margin-bottom:18px}
.portal-success h2{font-size:20px;margin:0 0 10px}
.portal-success p{line-height:1.5}
.portal-mode .portal-success .actions{flex-wrap:wrap;gap:10px}
.portal-mode .portal-detail-gallery .detail-main-image{margin-bottom:12px}
.portal-mode .portal-detail-gallery .detail-main-image .product-photo{height:280px;aspect-ratio:auto}
.portal-mode .portal-detail-gallery .detail-thumbnails{display:flex;gap:10px;overflow-x:auto;margin:0;padding:6px 0;max-width:100%}
.portal-mode .portal-detail-gallery .detail-thumb{flex:0 0 82px;padding:4px;border-radius:12px}
.portal-mode .portal-detail-gallery .detail-thumb .product-photo{height:74px;width:74px;aspect-ratio:1}
.portal-mode .portal-detail-gallery .detail-thumb img{height:100%;width:100%;object-fit:contain}
.portal-mode .detail-panel{padding:14px}
.portal-mode .product-prose{font-size:15px;line-height:1.7}
.portal-mode .detail-tabs{gap:10px;margin:16px 0}
.portal-mode .detail-tabs .btn{flex:1}
.portal-mode .portal-offline{background:#fff2d9;color:#684300;padding:14px;border-radius:12px;line-height:1.5}
.portal-mode #toast{bottom:calc(150px + env(safe-area-inset-bottom));max-width:calc(100% - 28px);font-size:14px}
.portal-skeleton-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.portal-skeleton-card{padding:16px;background:white;border-radius:16px;min-height:200px}
.portal-skeleton-card span{display:block;height:20px;background:#eee8f4;margin-bottom:14px;border-radius:8px;animation:portal-pulse 1.5s ease-in-out infinite}
.portal-skeleton-card span:first-child{height:90px}
@keyframes portal-pulse{50%{opacity:.45}}
@media(min-width:360px){.portal-mode .portal-cards:not(.portal-rail){grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(min-width:700px){.portal-mode main{padding:32px 24px calc(110px + env(safe-area-inset-bottom))}.portal-mode .portal-cards:not(.portal-rail){grid-template-columns:repeat(3,minmax(0,1fr))}.portal-mode .stats{grid-template-columns:repeat(4,minmax(0,1fr))}.portal-mode .portal-welcome{padding:24px}.portal-mode dialog.portal-sheet{margin:auto;border-radius:20px;width:520px}.portal-mode .portal-basket-row{grid-template-columns:64px minmax(0,1fr) auto}.portal-mode .portal-basket-subtotal{grid-column:auto;border:0;padding:0;display:block}.portal-mode .portal-basket-subtotal .btn{display:block;margin-top:14px}.portal-mode .portal-order-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.portal-mode .portal-detail-gallery .detail-main-image .product-photo{height:380px}}
@media(min-width:1000px){.portal-mode .portal-cards:not(.portal-rail){grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:359px){.portal-mode .stats{grid-template-columns:1fr}.portal-mode #portal-navigation a>.portal-nav-label{font-size:11px}}
@media(prefers-reduced-motion:reduce){.portal-skeleton-card span{animation:none}}

/* Compact reseller catalogue; internal catalogue and tablet layout stay intact. */
.portal-category-chips{display:none}
@media(max-width:767px){
 .portal-mode{--portal-nav-height:60px}
 .portal-mode .topbar,.portal-mode .topbar:has(#operations-header){min-height:64px;gap:0 8px;padding:calc(4px + env(safe-area-inset-top)) 12px 4px}
 .portal-mode .topbar>span:first-child{font-size:20px;line-height:24px}
 .portal-mode #network-status{font-size:10px;line-height:20px;padding:2px 6px}
 .portal-mode .cloud-actions{gap:8px}
 .portal-mode .cloud-actions .profile{font-size:12px;min-height:32px;padding:0}
 .portal-mode #operations-header button{min-height:32px;min-width:36px;padding:5px;font-size:16px}
 .portal-mode #portal-navigation a{padding:3px 2px;gap:1px}
 .portal-mode #portal-navigation a>span:first-child{font-size:20px;line-height:22px}
 .portal-mode #portal-navigation a>.portal-nav-label{font-size:10px;line-height:14px}
 .portal-mode main:has(.portal-catalogue-toolbar){padding:14px 12px calc(84px + env(safe-area-inset-bottom))}
 .portal-mode main:has(.portal-catalogue-toolbar) .heading{margin-bottom:12px}
 .portal-mode main:has(.portal-catalogue-toolbar) .heading h1{font-size:21px;margin-bottom:0}
 .portal-mode main:has(.portal-catalogue-toolbar) .heading p{display:none}
 .portal-mode .portal-catalogue-toolbar{gap:8px}
 .portal-mode #portal-search{font-size:16px;height:40px;padding:8px 10px}
 .portal-mode .portal-catalogue-toolbar>.btn{min-height:40px;padding:8px 12px;font-size:12px}
 .portal-mode .portal-category-chips{display:flex;gap:6px;overflow-x:auto;max-width:100%;padding:10px 0 4px;scrollbar-width:thin}
 .portal-mode .portal-category-chips .btn{flex:0 0 auto;min-height:36px;padding:7px 12px;border-radius:20px;font-size:12px;white-space:nowrap}
 .portal-mode .portal-category-chips [aria-pressed=true]{background:var(--purple);color:white;border-color:var(--purple)}
 .portal-mode .portal-results{margin:6px 0 0;font-size:11px}
 .portal-mode .portal-cards:not(.portal-rail){grid-template-columns:minmax(0,1fr);gap:8px;margin-top:8px}
 .portal-mode .portal-cards:not(.portal-rail) .product-card{display:grid;grid-template-columns:clamp(106px,32vw,134px) minmax(0,1fr);padding:8px;gap:10px;border-radius:14px}
 .portal-mode .portal-cards:not(.portal-rail) .portal-photo-button{width:100%;height:140px;border-radius:10px;overflow:hidden;align-self:center}
 .portal-mode .portal-cards:not(.portal-rail) .product-photo{height:100%;width:100%;aspect-ratio:auto;border-radius:10px}
 .portal-mode .portal-cards:not(.portal-rail) .product-card-content{padding:0;gap:4px;min-width:0}
 .portal-mode .portal-cards:not(.portal-rail) h2{font-size:14px;line-height:18px;min-height:0;max-height:36px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
 .portal-mode .portal-cards:not(.portal-rail) .portal-prices{gap:2px}
 .portal-mode .portal-cards:not(.portal-rail) .portal-prices small{font-size:10px}
 .portal-mode .portal-cards:not(.portal-rail) .portal-prices strong{font-size:19px}
 .portal-mode .portal-cards:not(.portal-rail) .portal-prices span{font-size:11px}
 .portal-mode .portal-cards:not(.portal-rail) .badge{font-size:10px;padding:3px 7px}
 .portal-mode .portal-cards:not(.portal-rail) .btn[data-portal-action=add]{width:auto;align-self:flex-end;min-height:40px;height:40px;padding:8px 14px;font-size:12px;margin-top:auto}
 .portal-mode .portal-cards:not(.portal-rail) .portal-quantity{margin-top:auto}
}

/* Client-sale forms share ILOA tokens; no change to legacy business forms. */
.sales-client{display:grid;gap:14px;margin-bottom:16px}
.sales-client label,.sales-detail form label,.sales-line label{display:grid;gap:6px;min-width:0;font-size:13px;margin:10px 0}
.sales-client input,.sales-detail input,.sales-detail select,.sales-line input{width:100%;min-width:0;max-width:100%;margin:0;border:1px solid var(--border);border-radius:8px;background:white;padding:10px;font-size:16px;min-height:42px}
.sales-client textarea{font-size:16px;min-height:84px}
.sales-lines{display:grid;gap:12px}
.sales-line{display:grid;grid-template-columns:80px minmax(0,1fr);gap:12px;padding:14px}
.sales-line>.product-photo{width:80px;height:90px;aspect-ratio:auto;border-radius:10px;align-self:start}
.sales-line img{object-fit:contain}
.sales-line h2{line-height:1.4;overflow-wrap:anywhere}
.sales-line p{margin:8px 0}
.sales-line .portal-quantity{justify-content:flex-start}
.sales-detail{display:grid;gap:12px;min-width:0}
.sales-detail h2{margin:10px 0 0}
.sales-detail p{margin:0;overflow-wrap:anywhere}
.sales-detail .portal-order-total{color:var(--purple);font-size:24px}
.sales-detail form{display:grid;gap:10px;border:1px solid var(--border);border-radius:12px;padding:14px;min-width:0}
.sales-detail .actions{gap:8px;flex-wrap:wrap}
.sales-detail .actions .btn{white-space:normal;min-height:42px;max-width:100%}
.sales-order{min-width:0}
.sales-order p{overflow-wrap:anywhere}
.sales-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr))}
@media(min-width:768px){.sales-client{grid-template-columns:1fr 1fr}.sales-client h2,.sales-client label:has(textarea){grid-column:1/-1}.sales-line{grid-template-columns:120px minmax(0,1fr)}.sales-line>.product-photo{width:120px;height:120px}}

.sales-client{gap:10px}
.sales-client label{margin:0}
.sales-detail{gap:8px}
.sales-detail h2{margin-top:6px}
/* Customer-sales presentation only; business modules retain their existing styles. */
.sales-card{background:#fff;border:1px solid #ebe5f2;border-radius:16px;padding:14px;box-shadow:0 3px 12px #38235404;min-width:0}
.sales-card h2{font-size:16px;line-height:1.35;margin:0 0 10px;color:var(--deep)}
.sales-section-icon{display:inline-grid;place-items:center;width:24px;height:24px;margin-right:4px;border-radius:8px;background:#f1eafb;color:var(--purple)}
.sales-checkout{display:grid;gap:12px;min-width:0}
.sales-checkout .sales-client{display:grid;gap:9px;margin:0}
.sales-checkout label,.sales-detail label{font-size:12px;color:#70647d;font-weight:500;min-width:0}
.sales-checkout input,.sales-detail input,.sales-detail select{min-width:0;width:100%;min-height:42px;border-radius:10px;background:#fcfbfe;padding:9px 11px;border:1px solid #e7dfee}
.sales-checkout textarea{font:inherit;min-height:56px;height:56px;resize:vertical;border-radius:10px;padding:9px 11px;background:#fcfbfe}
.sales-lines{gap:12px}
.sales-line{grid-template-columns:64px minmax(0,1fr);gap:12px;margin:0;align-items:start}
.sales-line>.product-photo{width:64px;height:76px;border-radius:12px;background:#f5f1f9}
.sales-line h2{font-size:15px;margin-bottom:6px}
.sales-line-content{min-width:0}
.sales-line-meta{display:flex;gap:8px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin-bottom:8px}
.sales-line-meta p{margin:0;font-size:12px;color:#7c7088;line-height:1.5}
.sales-line-meta p strong{display:block;color:var(--purple);font-size:14px}
.sales-line .portal-quantity{gap:8px;margin:0}
.sales-line .portal-quantity .btn{height:34px;min-height:34px;width:34px;min-width:34px;padding:4px;font-size:18px}
.sales-line .portal-quantity output{font-size:14px;min-width:18px}
.sales-line .sales-remove{padding:5px 9px;min-height:32px;font-size:11px;margin-top:8px}
.sales-estimate{padding-top:8px;color:#7d6d8d}
.sales-estimate small{font-size:11px}
.sales-estimate p{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;margin:3px 0 0;font-size:12px}
.sales-estimate strong{color:var(--purple)}
.sales-amount{background:#f0e8fa;border:1px solid #e6d9f6;border-radius:16px;padding:16px;color:var(--deep);min-width:0}
.sales-amount>span{display:block;font-size:13px;font-weight:500}
.sales-amount-value{display:block;color:var(--purple);font-size:28px;line-height:1.3;letter-spacing:-.7px;margin:4px 0 10px;overflow-wrap:anywhere}
.sales-money-list{display:grid;gap:7px;margin:8px 0 0;font-size:12px}
.sales-money-list>div{display:flex;align-items:baseline;justify-content:space-between;gap:12px;min-width:0}
.sales-money-list dt{color:#82738f;min-width:0}
.sales-money-list dd{margin:0;text-align:right;font-weight:650;white-space:nowrap;color:var(--deep)}
.sales-money-list>div:last-child dd{color:var(--purple)}
.sales-checkout>.error:empty{display:none}
.sales-status{border-radius:7px;font-size:11px;font-weight:600;line-height:1.3;padding:5px 8px;max-width:100%;white-space:normal}
.sales-status.green{color:#22734f;background:#e8f5ed}
.sales-status.orange{color:#9d6815;background:#fff2dc}
.sales-status.red{color:#aa3e50;background:#fcebed}
.sales-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:14px}
.sales-kpis .sales-card{padding:12px 8px}
.sales-kpis span{font-size:11px;color:#87758f;display:block}
.sales-kpis strong{display:block;font-size:17px;line-height:1.4;letter-spacing:-.4px;color:var(--purple);margin-top:5px;overflow-wrap:anywhere}
.sales-kpis .sales-card:last-child strong{color:var(--green)}
.sales-filters{display:flex;gap:7px;margin:0 0 12px;flex-wrap:wrap}
.sales-filters .btn{border-radius:20px;font-size:12px;min-height:40px;padding:9px 15px;color:var(--purple);border-color:#e5d8f3}
.sales-filters .btn.primary{color:#fff}
.sales-commission-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,310px),1fr));gap:12px}
.sales-product-heading{display:grid;grid-template-columns:50px minmax(0,1fr);align-items:center;gap:11px;min-width:0}
.sales-product-heading>.product-photo{width:50px;height:58px;aspect-ratio:auto;border-radius:10px}
.sales-product-heading .product-photo img{object-fit:contain}
.sales-product-heading h2{margin:0;font-size:15px}
.sales-product-heading p{margin:3px 0;font-size:12px;line-height:1.3;overflow-wrap:anywhere}
.sales-product-heading time,.sales-stage time{font-size:11px;color:#928299;display:block;margin-top:3px}
.sales-commission-card>.sales-money-list{border-top:1px solid #f0ebf6;border-bottom:1px solid #f0ebf6;padding:12px 0;margin:12px 0}
.sales-status-row{display:flex;justify-content:space-between;gap:10px;align-items:center;font-size:12px;margin-top:8px}
.sales-status-row>span:first-child{color:#7c6d88}
.sales-payment-note{font-size:11px;color:#897c94;line-height:1.5;margin:10px 0 0;overflow-wrap:anywhere}
.sales-detail{gap:12px}
.sales-detail-intro{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}
.sales-detail-intro>span:last-child{font-size:11px;color:#887a93}
.sales-client-detail>strong{font-size:14px;display:block;margin-bottom:4px}
.sales-client-detail p{font-size:13px;line-height:1.5;margin:3px 0}
.sales-client-detail>small{display:block;font-size:11px;color:#897b94;margin-top:7px}
.sales-client-detail .actions{margin-top:10px}
.sales-detail .sales-detail-product{align-items:start;padding:8px 0}
.sales-detail-product:not(:last-child){border-bottom:1px solid #f0ebf6}
.sales-detail-product strong{font-size:14px;line-height:1.4;display:block;overflow-wrap:anywhere}
.sales-detail-product small{display:block;margin:4px 0;font-size:11px;color:#897b94}
.sales-detail-product .sales-money-list{gap:5px;font-size:11px}
.sales-stages{display:grid;gap:8px}
.sales-stage{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:12px 14px}
.sales-detail .sales-stage h2{margin:0;font-size:14px}
.sales-detail form.sales-card{border-radius:16px;background:#fff;padding:14px;gap:10px}
.sales-detail form h2{font-size:16px;margin:0}
.sales-detail .actions .btn,.sales-detail form .btn,.sales-checkout .portal-checkout-bar .btn{min-height:42px;font-size:13px;padding:10px 12px;border-radius:10px}
.sales-detail .btn:not(.primary):not(.danger):not(.sales-success){background:#faf7fe;border-color:#e5d8f3;color:var(--purple)}
.sales-detail .btn.danger{background:#fceef0;border-color:#f5d9df;color:#ae4359}
.sales-detail .btn.sales-success{background:#e8f5ed;border-color:#cde9d8;color:#22734f}
.sales-dialog{background:#f7f4fb;max-width:720px}
.sales-dialog .dialog-heading{position:sticky;top:0;z-index:2;background:#fff;padding:15px 18px}
.sales-dialog .dialog-heading h2{font-size:17px;overflow-wrap:anywhere}
.sales-dialog #dialog-body{padding:16px}
@media(max-width:767px){
 body:has(#customer-checkout,.sales-commissions,.sales-page,#dialog[open] .sales-detail){background:#f7f4fb}
 body:has(#customer-checkout,.sales-commissions,.sales-page) main{padding:16px 14px 110px}
 body:has(#customer-checkout,.sales-commissions,.sales-page) .heading{margin-bottom:14px;gap:8px}
 body:has(#customer-checkout,.sales-commissions,.sales-page) h1{font-size:21px;line-height:1.3;margin-bottom:4px;letter-spacing:-.5px}
 body:has(#customer-checkout,.sales-commissions,.sales-page) .heading p{font-size:12px;line-height:1.45}
 body:has(#customer-checkout,.sales-commissions,.sales-page) .topbar{min-height:64px;height:auto;padding:6px 14px;gap:3px 8px;display:grid;grid-template-columns:minmax(0,1fr) auto;position:sticky;top:0;z-index:35}
 body:has(#customer-checkout,.sales-commissions,.sales-page) .topbar>span:first-child{grid-row:1;grid-column:1;max-width:none;font-size:22px;font-weight:750;letter-spacing:1px}
 body:has(#customer-checkout,.sales-commissions,.sales-page) .topbar>span:first-child .muted{display:none}
 body:has(#customer-checkout,.sales-commissions,.sales-page) .cloud-actions{display:contents}
 body:has(#customer-checkout,.sales-commissions,.sales-page) .profile-menu{grid-row:2;grid-column:1;min-width:0;font-size:11px}
 body:has(#customer-checkout,.sales-commissions,.sales-page) .profile-menu .profile{font-size:11px;min-height:22px;padding:0;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 body:has(#customer-checkout,.sales-commissions,.sales-page) #operations-header{grid-row:1;grid-column:2;display:flex;gap:0;justify-content:end}
 body:has(#customer-checkout,.sales-commissions,.sales-page) #operations-header button[data-ops=notifications]{width:40px;height:36px;min-height:36px;padding:7px;background:#f5effb;border:0;position:relative}
 body:has(#customer-checkout,.sales-commissions,.sales-page) #operations-header button span:not(.badge){display:none}
 body:has(#customer-checkout,.sales-commissions,.sales-page) #notification-count{position:absolute;top:0;right:0;font-size:9px;padding:2px 4px;border-radius:10px}
 body:has(#customer-checkout,.sales-commissions,.sales-page) #network-status{grid-row:2;grid-column:2;font-size:10px;justify-self:end;white-space:nowrap}
 body:has(#customer-checkout,.sales-commissions,.sales-page) #refresh-cloud{grid-row:3;grid-column:2;font-size:10px;min-height:28px;padding:5px 7px;justify-self:end}
 body:has(#customer-checkout,.sales-commissions,.sales-page) #import-local{grid-row:3;grid-column:1;max-width:100%;font-size:10px;white-space:normal;padding:5px}
 body:has(#customer-checkout,.sales-commissions,.sales-page) #operations-header button[data-ops=search]{font-size:0;padding:0;width:32px;height:36px;min-width:32px;background:transparent;border:0}
 body:has(#customer-checkout,.sales-commissions,.sales-page) #operations-header button[data-ops=search]::before{content:'⌕';font-size:21px;color:var(--purple)}
 .sales-dialog{width:calc(100% - 20px);max-height:calc(100dvh - 20px);border-radius:18px}
 .sales-dialog .dialog-heading{padding:12px 14px}
 .sales-dialog #dialog-body{padding:12px}
 .sales-dialog .icon-button{min-height:40px;min-width:40px;font-size:25px}
 .sales-checkout .portal-checkout-bar{padding:8px 14px;background:#fffffff5}
 .sales-checkout .portal-checkout-bar>.btn{min-height:44px;font-size:14px;border-radius:12px}
 .sales-dialog .sales-money-list dd{white-space:normal;overflow-wrap:anywhere}
 .sales-detail>.actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 .sales-detail>.actions .btn{min-width:0;white-space:normal}
}
@media(min-width:768px){.sales-checkout{max-width:850px;margin:auto}.sales-kpis .sales-card{padding:16px}.sales-kpis strong{font-size:23px}.sales-client{grid-template-columns:1fr 1fr}.sales-client h2,.sales-client .sales-observation{grid-column:1/-1}}
@media(max-width:767px){
 .sales-checkout .sales-client{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 10px}
 .sales-checkout .sales-client h2,.sales-checkout .sales-client label:has([name=delivery_address]){grid-column:1/-1}
 .sales-checkout .sales-client .sales-observation{grid-column:auto}
 .sales-checkout .sales-client input{font-size:13px}
 .sales-checkout .sales-client textarea{height:42px;min-height:42px;font-size:13px}
}
.sales-product-heading .product-monogram,.sales-line .product-monogram{font-size:16px;letter-spacing:1px;max-width:100%;line-height:1.25}
.sales-product-heading .product-monogram small,.sales-line .product-monogram small{font-size:5px;letter-spacing:1px;margin-top:4px}
.sales-line .portal-quantity .btn{width:40px;height:40px;min-height:40px}
