:root{--bg:#f3f5f8;--panel:#fff;--ink:#172033;--muted:#718096;--line:#e5e9f0;--accent:#138a36;--accent2:#d62828;--teal:#0ea5a8;--red:#d62828;--green:#138a36;--orange:#f59e0b;--shadow:0 14px 38px rgba(27,35,58,.08)}*{box-sizing:border-box}body{margin:0;font:14px/1.45 Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;background:var(--bg);color:var(--ink)}a{color:inherit;text-decoration:none}.app-shell{min-height:100vh}.sidebar{position:fixed;left:0;top:0;bottom:0;width:230px;background:linear-gradient(180deg,#0f1a12,#16201a 45%,#281414 100%);color:#fff;padding:24px 18px;display:flex;flex-direction:column;z-index:10}.brand{font-weight:900;letter-spacing:.5px;font-size:20px}.brand span{color:#ffffff}.brand small{display:block;font-size:10px;color:#8991a8;letter-spacing:2px;margin-top:2px}.brand.big{font-size:28px;color:#151a2a}.sidebar nav{display:flex;flex-direction:column;gap:7px;margin-top:34px}.sidebar nav a{padding:11px 12px;border-radius:11px;color:#c7cada}.sidebar nav a:hover{background:#20263a;color:#fff}.side-user{margin-top:auto;padding:14px;background:#1b2134;border-radius:14px}.side-user small,.side-user a{display:block;color:#9da4ba;margin-top:4px}.side-user a{margin-top:10px;color:#fff}.main{margin-left:230px;padding:28px;max-width:1700px}.main-login{margin:0;display:grid;place-items:center;min-height:100vh}.login-card{width:min(420px,92vw);background:white;padding:38px;border-radius:24px;box-shadow:var(--shadow)}h1{margin:0;font-size:30px}h2{font-size:18px;margin:28px 0 12px}.page-head{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:24px}.page-head p,.panel-head p{color:var(--muted);margin:4px 0 0}.actions,.filters{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.btn{border:1px solid var(--line);background:#fff;padding:10px 15px;border-radius:11px;font-weight:700;cursor:pointer}.btn.primary{background:linear-gradient(135deg,var(--accent),var(--accent2));border-color:transparent;color:#fff}.btn.small{padding:7px 10px;font-size:12px}.btn.full{width:100%}.bigbtn{font-size:16px;padding:14px 24px}.panel{background:var(--panel);border:1px solid #e9ecf2;border-radius:18px;padding:20px;box-shadow:0 4px 14px rgba(20,30,55,.03);margin-bottom:18px}.panel-head{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:15px}.panel-head h2{margin:0}.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.metric-grid.two{grid-template-columns:repeat(2,minmax(0,1fr));margin-bottom:16px}.metric-card{background:linear-gradient(145deg,#fff,#faf9ff);border:1px solid #e6e1ff;border-radius:18px;padding:18px;min-height:148px;box-shadow:var(--shadow)}.metric-card.teal{background:linear-gradient(145deg,#fff,#f1fffe);border-color:#cff4f2}.metric-card span{font-weight:800}.metric-card small{display:block;color:var(--muted);margin:4px 0 15px}.metric-card b,.metric-card strong{display:block;font-size:21px}.metric-card strong{font-size:15px;color:#49526a;margin-top:5px}.metric-card em{font-style:normal;font-size:10px;color:var(--muted);font-weight:600}.order-count{margin-top:10px;color:var(--accent);font-weight:800}.mini-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.mini-card{background:white;border:1px solid var(--line);border-radius:14px;padding:14px}.mini-card.warn{border-left:4px solid var(--orange)}.mini-card b{display:block;font-size:24px}.mini-card small{display:block;color:var(--muted)}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse}th{text-align:left;font-size:11px;text-transform:uppercase;letter-spacing:.6px;color:#8790a4;padding:11px;border-bottom:1px solid var(--line)}td{padding:12px 11px;border-bottom:1px solid #eef0f4;vertical-align:top}td small{display:block;color:var(--muted);margin-top:3px}.dot{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:4px}.green{background:var(--green)}.red{background:var(--red)}.badge{display:inline-block;padding:4px 8px;border-radius:999px;background:#eef1f6;font-size:11px;font-weight:800}.badge.ok{background:#dcfce9;color:#067647}.badge.no{background:#fee2e2;color:#b42318}.inline{display:inline}.linkbtn,.danger-link{border:0;background:none;color:var(--accent);font-weight:800;cursor:pointer;padding:0}.danger-link{color:var(--red)}.product-period{background:#fafbfc;border:1px solid var(--line);padding:12px;border-radius:14px}.tabs-products{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.product-period h3{margin:0 0 8px}.product-row{display:grid;grid-template-columns:100px 1fr 50px;gap:10px;padding:8px 0;border-bottom:1px solid #eceff3}.product-row:last-child{border:0}.product-row span{color:#586176}.product-row strong{text-align:right}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.span2{grid-column:span 2}label{font-weight:700;display:block}input,select,textarea{width:100%;border:1px solid #dce1e8;border-radius:10px;padding:10px 11px;margin-top:6px;font:inherit;background:#fff;color:var(--ink)}textarea{resize:vertical}.stack{display:flex;flex-direction:column}.info-box{align-self:end;padding:11px;border-radius:10px;background:#f2efff;color:#5441bf}.pair-row,.product-input-row,.payment-row{display:grid;grid-template-columns:1fr 1fr 38px;gap:9px;margin-bottom:9px;align-items:center}.product-input-row{grid-template-columns:180px 1fr 100px 120px 38px}.payment-row{grid-template-columns:1fr 180px 180px 38px}.pair-row input,.product-input-row input,.payment-row input,.payment-row select{margin:0}.x{border:0;width:34px;height:34px;border-radius:9px;background:#f2f3f6;font-size:20px;cursor:pointer}.check-card{display:flex;gap:11px;align-items:flex-start;background:#f8f7ff;border:1px solid #e2dcff;border-radius:13px;padding:13px;margin-top:14px}.check-card input{width:auto;margin:3px 0 0}.check-card small{display:block;color:var(--muted);font-weight:500}.attachment-box{margin-top:12px}.lookup-state{font-size:11px;color:var(--muted)}.lookup-state.good{color:var(--green)}.lookup-state.bad{color:var(--red)}.total-box{display:flex;justify-content:flex-end;gap:25px;margin-top:15px;padding-top:15px;border-top:1px solid var(--line)}.total-box b{font-size:18px}.filters.wide{align-items:end}.filters label{min-width:150px}.filters select[multiple]{min-height:95px}.split{display:grid;grid-template-columns:1.2fr .8fr;gap:18px}.pay-summary{padding:10px 0;border-bottom:1px solid var(--line)}.pay-summary span,.pay-summary small{display:block}.pay-summary span{font-weight:800}.pay-summary small{color:var(--muted)}.report-cols{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.report-cols pre{white-space:pre-wrap;font:inherit;color:#4a5369}.status-buttons{display:flex;gap:6px;margin-bottom:6px}.okbtn{border-color:#b9ebd0}.nobtn{border-color:#ffc7c7}.email-send input{width:260px;margin:0}.flash{padding:12px 15px;border-radius:12px;margin-bottom:15px;font-weight:700}.flash.ok{background:#dcfce9;color:#087443}.flash.error{background:#fee2e2;color:#a62929}.muted{color:var(--muted)}@media(max-width:1100px){.metric-grid,.tabs-products{grid-template-columns:repeat(2,1fr)}.mini-grid{grid-template-columns:repeat(2,1fr)}.split{grid-template-columns:1fr}.product-input-row{grid-template-columns:1fr 1fr 100px}.product-input-row .lookup-state{grid-column:span 2}}@media(max-width:760px){.sidebar{position:static;width:auto}.main{margin:0;padding:16px}.page-head{align-items:flex-start;flex-direction:column}.metric-grid,.metric-grid.two,.mini-grid,.tabs-products,.form-grid,.report-cols{grid-template-columns:1fr}.span2{grid-column:auto}.pair-row,.product-input-row,.payment-row{grid-template-columns:1fr}.x{width:100%}.total-box{flex-direction:column;gap:5px}.sidebar nav{display:grid;grid-template-columns:1fr 1fr;margin-top:18px}.side-user{margin-top:18px}}
.thumb-link{display:inline-grid;place-items:center;width:52px;height:34px;border-radius:8px;background:#f0edff;color:#5c45d6;font-weight:800;font-size:11px;border:1px solid #ded7ff}
.password-form{display:grid;grid-template-columns:minmax(135px,1fr) minmax(135px,1fr) auto;gap:7px;min-width:410px;align-items:center}.password-form input{min-width:0;padding:8px 10px;border:1px solid #d7dce3;border-radius:9px;background:#fff}.muted{color:#7b8493;font-size:.9rem}@media(max-width:900px){.password-form{grid-template-columns:1fr;min-width:220px}}


.btn.ghost{background:#f7f8fb;border-color:#e2e8f0;color:#475467}
.hero-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}
.hero-card{background:linear-gradient(135deg,#6c4df6,#8b6cff);color:#fff;border-radius:22px;padding:18px 20px;box-shadow:var(--shadow);min-height:132px;display:flex;flex-direction:column;justify-content:space-between}
.hero-card.dark{background:linear-gradient(135deg,#151a2a,#283149)}
.hero-card small{font-size:11px;letter-spacing:1.2px;font-weight:800;opacity:.85}
.hero-card strong{font-size:12px;font-weight:700;opacity:.95}
.hero-card b{font-size:29px;line-height:1.05}
.hero-card span{font-size:12px;opacity:.9}
.dashboard-section{margin-bottom:18px}.section-title h2{margin:0}.section-title p{margin:4px 0 12px;color:var(--muted)}
.dashboard-grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.panel.soft{background:linear-gradient(180deg,#fff,#fbfcff)}
.panel-head.compact{margin-bottom:10px}.panel-head.compact h2{font-size:17px}
.kpi-list{display:flex;flex-direction:column;gap:10px}.kpi-row{display:flex;justify-content:space-between;align-items:center;border:1px solid #edf0f5;border-radius:14px;padding:12px 14px;background:#fff}
.kpi-row span{font-weight:800;display:block}.kpi-row small{color:var(--muted)}.kpi-values{text-align:right}.kpi-values b{display:block;font-size:18px}.kpi-values small{display:block;margin-top:2px}
.count-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.count-pill{background:#fff;border:1px solid #edf0f5;border-radius:16px;padding:14px;display:flex;flex-direction:column;gap:4px}.count-pill b{font-size:24px}.count-pill small{color:#667085;font-weight:700;text-transform:uppercase;font-size:11px}.count-pill span{color:var(--muted);font-size:12px}.count-pill.warn{border-left:4px solid var(--orange)}
.teal-surface{background:linear-gradient(180deg,#fbfffe,#f4fffe)}.warning-surface{background:linear-gradient(180deg,#fffdf8,#fffaf0)}
.dashboard-grid-main{display:grid;grid-template-columns:1.15fr .85fr;gap:18px;margin-bottom:18px}.seller-panel,.top-products-panel{height:100%}
.seller-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.seller-card{border:1px solid #eaecf0;border-radius:18px;padding:14px;background:linear-gradient(180deg,#fff,#fbfbff)}.seller-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;margin-bottom:10px}.seller-head strong{font-size:15px}.seller-head span{font-size:12px;color:#5d46d9;font-weight:800}.seller-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.seller-stats small{display:block;color:var(--muted)}.seller-stats b{display:block;font-size:14px;margin:4px 0}.seller-stats span{display:block;font-size:11px;color:#667085}
.product-tabs-modern{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.product-period.modern{background:#fafbfc;border:1px solid var(--line);padding:14px;border-radius:16px}.product-period.modern h3{margin:0 0 8px}
.product-input-row{grid-template-columns:180px 1fr 100px 78px 170px 38px}
.lookup-state{font-size:11px;line-height:1.25}
@media(max-width:1200px){.hero-summary{grid-template-columns:repeat(2,1fr)}.dashboard-grid-main,.dashboard-grid-2{grid-template-columns:1fr}.seller-grid,.product-tabs-modern,.count-strip{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.hero-summary,.seller-grid,.product-tabs-modern,.count-strip{grid-template-columns:1fr}.product-input-row{grid-template-columns:1fr}}


/* V4.7 premium dashboard + fast order/report UX */
.main{background:radial-gradient(circle at 85% 0%,rgba(108,77,246,.06),transparent 30%),var(--bg)}
.hero-card{position:relative;overflow:hidden}.hero-card:after{content:"";position:absolute;width:120px;height:120px;border-radius:50%;background:rgba(255,255,255,.09);right:-35px;top:-40px}.hero-card b,.hero-card span,.hero-card strong,.hero-card small{position:relative;z-index:1}
.seller-card{transition:.18s ease}.seller-card:hover{transform:translateY(-2px);box-shadow:0 10px 28px rgba(27,35,58,.08)}
.order-page-head{margin-bottom:18px}.order-account-chip,.today-badge{background:#171b2d;color:#fff;border-radius:999px;padding:10px 15px;font-weight:700}.order-form{display:flex;flex-direction:column;gap:14px}.order-section{margin:0;padding:18px 20px}.order-step{display:flex;align-items:center;gap:11px;margin-bottom:14px}.order-step>span{display:grid;place-items:center;width:32px;height:32px;border-radius:10px;background:linear-gradient(135deg,var(--accent),var(--accent2));color:#fff;font-weight:900}.order-step h2{margin:0;font-size:18px}.order-step p{margin:2px 0 0;color:var(--muted)}.panel-head .order-step{margin-bottom:0}.premium-fields{grid-template-columns:repeat(3,minmax(0,1fr))}.premium-fields small{display:block;color:var(--muted);font-weight:500;margin-top:5px}.field-head-row{display:grid;grid-template-columns:180px 1fr 100px 78px 170px 38px;gap:9px;margin:0 0 5px;color:#98a2b3;font-size:10px;text-transform:uppercase;font-weight:800;letter-spacing:.5px}.outside-card{background:linear-gradient(90deg,#faf9ff,#f5f3ff)}.premium-total{background:#f8f7ff;border-radius:14px;padding:14px 16px;border:1px solid #e7e0ff;justify-content:flex-end}.sticky-save{position:sticky;bottom:14px;z-index:8;display:flex;justify-content:space-between;align-items:center;gap:16px;background:rgba(20,25,42,.95);backdrop-filter:blur(10px);color:#fff;padding:12px 14px 12px 18px;border-radius:17px;box-shadow:0 16px 35px rgba(20,25,42,.2);margin-top:2px}.sticky-save span{display:block;color:#bec4d3;font-size:12px}.sticky-save .btn.primary{box-shadow:0 7px 20px rgba(108,77,246,.35)}
.report-head{margin-bottom:18px}.date-panel{padding:16px 20px}.date-toolbar{display:flex;align-items:end;justify-content:space-between;gap:16px}.date-toolbar label{min-width:220px}.eyebrow{display:block;font-size:10px;color:#8b95a7;letter-spacing:1.3px;font-weight:900}.date-toolbar h2{margin:3px 0 0}.report-editor-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.report-block{margin:0}.block-title{display:flex;gap:10px;align-items:flex-start;margin-bottom:10px}.block-title>span{display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:#f0edff;color:#5b46d7;font-weight:900}.block-title h2{margin:0;font-size:17px}.block-title p{margin:2px 0 0;color:var(--muted);font-size:12px}.report-block textarea{min-height:180px;background:#fcfcfd}.call-panel{margin-top:14px}.call-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.call-grid input{font-size:20px;font-weight:800;padding:14px}.notes-field{margin-top:14px}
@media(max-width:1100px){.premium-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.report-editor-grid{grid-template-columns:1fr}.field-head-row{display:none}}
@media(max-width:760px){.premium-fields,.call-grid{grid-template-columns:1fr}.date-toolbar{align-items:stretch;flex-direction:column}.date-toolbar label{min-width:0}.sticky-save{bottom:8px}.order-account-chip,.today-badge{align-self:flex-start}}

/* V4.9 visual sections + logo */
.brand-wrap{display:flex;align-items:center;gap:10px}.brand-lily{display:grid;place-items:center;width:34px;height:34px;border-radius:11px;background:linear-gradient(135deg,#7c5cff,#b29cff);color:#fff;font-size:22px;line-height:1;box-shadow:0 8px 20px rgba(124,92,255,.28)}
.section-sales{border-top:4px solid #6c4df6;background:linear-gradient(180deg,#fff,#faf8ff)!important}.section-orders{border-top:4px solid #3b82f6;background:linear-gradient(180deg,#fff,#f7fbff)!important}.section-approved{border-top:4px solid #0ea5a8!important;background:linear-gradient(180deg,#fff,#f3fffd)!important}.section-rejected{border-top:4px solid #f59e0b!important;background:linear-gradient(180deg,#fff,#fffaf0)!important}.section-sellers{border-top:4px solid #ec4899;background:linear-gradient(180deg,#fff,#fff8fc)}.section-products{border-top:4px solid #8b5cf6;background:linear-gradient(180deg,#fff,#faf8ff)}.section-details{border-top:4px solid #64748b;background:linear-gradient(180deg,#fff,#fafbfc)}
.section-sales .kpi-row{border-left:3px solid #c4b5fd}.section-orders .count-pill{border-left:3px solid #93c5fd}.section-approved .kpi-row{border-left:3px solid #99f6e4}.section-rejected .count-pill{border-left:3px solid #fbbf24}.section-products .product-period{border-color:#ddd6fe}.section-sellers .seller-card{border-color:#fbcfe8}.row-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.row-actions form{margin:0}
.field-error{outline:2px solid #ef4444;outline-offset:3px;border-radius:10px}.lookup-state.good{font-weight:800}.lookup-state.bad{max-width:200px}

.brand-wrap{display:flex;align-items:center;gap:12px}.brand-logo{width:58px;height:58px;object-fit:cover;border-radius:16px;box-shadow:0 10px 26px rgba(0,0,0,.22);background:#fff}.brand{font-weight:900;letter-spacing:.5px;font-size:20px;line-height:1}.brand small{display:block;font-size:10px;color:#d6dbe6;letter-spacing:2px;margin-top:5px}.sidebar nav a:hover{background:linear-gradient(90deg,rgba(19,138,54,.22),rgba(214,40,40,.18));color:#fff}.btn.primary{background:linear-gradient(135deg,var(--green),var(--red));border-color:transparent;color:#fff}.hero-card{background:linear-gradient(135deg,var(--green),var(--red));color:#fff}.section-sales{border-top:4px solid var(--green)!important;background:linear-gradient(180deg,#fff,#f6fff8)!important}.section-orders{border-top:4px solid #0f766e!important;background:linear-gradient(180deg,#fff,#f4fffe)!important}.section-approved{border-top:4px solid #138a36!important;background:linear-gradient(180deg,#fff,#f6fff8)!important}.section-rejected{border-top:4px solid #d62828!important;background:linear-gradient(180deg,#fff,#fff5f5)!important}.section-sellers{border-top:4px solid #138a36!important;background:linear-gradient(180deg,#fff,#f7fff8)!important}.section-products{border-top:4px solid #d62828!important;background:linear-gradient(180deg,#fff,#fff7f7)!important}.section-details{border-top:4px solid #64748b!important;background:linear-gradient(180deg,#fff,#fafbfc)!important}.order-step>span{background:linear-gradient(135deg,var(--green),var(--red));color:#fff}.block-title>span{background:linear-gradient(135deg,var(--green),var(--red));color:#fff}.check-card{background:#fbfffb;border:1px solid #d9f1df}.outside-card{background:linear-gradient(90deg,#fbfffb,#fff8f8)}.premium-total{background:#fcfefd;border:1px solid #d9f1df}.thumb-link{background:#eefbf0;color:#138a36;border:1px solid #d7f0dc}.side-user{border:1px solid rgba(255,255,255,.06)}


/* V5.4 CLOUD - branding tricolore definitivo */
.brand-stack{display:flex;flex-direction:column;align-items:center;text-align:center;gap:7px;padding:2px 0 8px}
.brand-logo-main{width:72px;height:72px;object-fit:cover;border-radius:18px;background:#fff;border:2px solid rgba(255,255,255,.9);box-shadow:0 10px 26px rgba(0,0,0,.24)}
.brand-wordmark{font-size:22px;font-weight:950;letter-spacing:-.5px;line-height:1.05}.brand-wordmark .word-arredi,.login-wordmark .word-arredi{color:#16a34a}.brand-wordmark .word-report,.login-wordmark .word-report{color:#dc2626}.brand-wordmark small{display:block;margin-top:5px;color:#e5e7eb;font-size:9px;letter-spacing:2.2px;text-transform:uppercase}
.login-card-tricolor{width:min(440px,92vw);padding:34px 38px 38px;border-top:5px solid #16a34a;border-bottom:5px solid #dc2626;position:relative;overflow:hidden}.login-card-tricolor:before{content:"";position:absolute;top:0;left:33.33%;width:33.33%;height:5px;background:#fff}.login-brand-stack{display:flex;flex-direction:column;align-items:center;text-align:center;margin-bottom:18px}.login-logo-main{width:112px;height:112px;object-fit:cover;border-radius:24px;background:#fff;border:2px solid #eef0f3;box-shadow:0 12px 32px rgba(16,24,40,.13)}.login-wordmark{font-size:34px;font-weight:950;letter-spacing:-1.2px;line-height:1;margin-top:12px}.login-brand-stack>small{margin-top:5px;color:#7d8797;font-weight:800;letter-spacing:2.5px;text-transform:uppercase;font-size:10px}.login-card-tricolor h1{margin:10px 0 14px}.login-card-tricolor .btn.primary{margin-top:6px;background:linear-gradient(90deg,#138a36 0%,#ffffff 50%,#d62828 100%);color:#182033;border:1px solid #d7dce3;text-shadow:0 1px 0 rgba(255,255,255,.4)}
.sidebar{background:linear-gradient(180deg,#0b2515 0%,#102019 52%,#341414 100%)}
.sidebar nav{margin-top:22px}.sidebar nav a:hover{background:linear-gradient(90deg,rgba(22,163,74,.26),rgba(255,255,255,.07),rgba(220,38,38,.20))}
@media(max-width:760px){.brand-stack{align-items:flex-start;text-align:left;flex-direction:row}.brand-logo-main{width:54px;height:54px}.brand-wordmark{font-size:19px}}

/* V5.5 allegati ordine e report nuovi clienti */
.attachment-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:14px}.attachment-card{border:1px solid #e5e9f0;border-radius:14px;padding:14px;background:#fff}.attachment-card label{margin:0}.attachment-card.required-attachment{border:2px solid #d62828;background:#fff5f5;box-shadow:0 0 0 3px rgba(214,40,40,.07)}.attachment-required{display:block;color:#b42318;font-size:11px;font-weight:900;margin-top:8px;letter-spacing:.3px}.attachment-ok{display:block;color:#138a36;font-weight:800;margin-top:7px}.facebook-block{border-top:4px solid #1877f2}.report-cols-four{grid-template-columns:repeat(4,1fr)}@media(max-width:1100px){.attachment-grid,.report-cols-four{grid-template-columns:1fr 1fr}}@media(max-width:760px){.attachment-grid,.report-cols-four{grid-template-columns:1fr}}

.report-editor-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:900px){.report-editor-grid{grid-template-columns:1fr}}

/* V5.6 — modalità Danilo + PrestaShop */
.delegate-panel{border:1px solid rgba(22,163,74,.28);background:linear-gradient(135deg,rgba(22,163,74,.07),rgba(255,255,255,.96),rgba(220,38,38,.04))}
.delegate-banner{display:flex;gap:24px;align-items:end;justify-content:space-between;flex-wrap:wrap}.delegate-banner h2{margin:2px 0 4px}.delegate-banner p{margin:0;max-width:720px}.delegate-banner label{min-width:260px}.delegate-status{margin-top:12px;padding:10px 14px;border-radius:10px;background:#f3f4f6;font-weight:700}.delegate-status.active{background:#ecfdf5;color:#166534}.delegate-field{border:1px solid #bbf7d0;padding:12px;border-radius:12px;background:#f0fdf4}.delegate-field small{display:block;margin-top:5px;color:#64748b}.prestashop-section{border-top:4px solid #24b9d7}.prestashop-help{margin-top:10px;padding:9px 12px;border-radius:10px;background:#ecfeff;color:#155e75;font-size:.9rem}.pair-row{grid-template-columns:minmax(150px,1fr) minmax(180px,1.2fr) auto minmax(120px,.8fr) auto!important}.ps-state{font-size:.82rem;align-self:center}.ps-state.good{color:#15803d;font-weight:700}.ps-state.bad{color:#b91c1c;font-weight:700}.ps-import{white-space:nowrap}
@media(max-width:900px){.pair-row{grid-template-columns:1fr!important}.delegate-banner label{min-width:100%}.ps-state{padding:3px 0}}

/* V5.7 — scelta flusso ordine sito / proforma fuori sito */
.order-mode-panel{border:1px solid #dfe6e2;background:linear-gradient(135deg,#f4fff7 0%,#ffffff 48%,#fff7f7 100%);padding:24px}
.order-mode-head{text-align:center;max-width:760px;margin:0 auto 18px}.order-mode-head h2{margin:4px 0 6px;font-size:24px}.order-mode-head p{margin:0;color:var(--muted)}
.order-mode-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.order-mode-card{appearance:none;border:2px solid #e3e8e5;border-radius:18px;background:#fff;padding:20px;text-align:left;display:flex;gap:15px;align-items:flex-start;cursor:pointer;transition:.18s ease;min-height:128px}.order-mode-card:hover{transform:translateY(-1px);box-shadow:0 10px 26px rgba(20,30,55,.08)}.order-mode-card.site.selected{border-color:#138a36;background:#f2fff5;box-shadow:0 0 0 4px rgba(19,138,54,.08)}.order-mode-card.outside.selected{border-color:#d62828;background:#fff5f5;box-shadow:0 0 0 4px rgba(214,40,40,.08)}.order-mode-icon{font-size:30px;line-height:1}.order-mode-card b{display:block;font-size:17px;color:var(--ink)}.order-mode-card small{display:block;margin-top:7px;color:var(--muted);font-size:12px;line-height:1.45}.order-mode-status{margin-top:14px;text-align:center;padding:10px 12px;border-radius:11px;background:#f3f4f6;font-weight:800;color:#64748b}.order-mode-status.active{background:#eefbf0;color:#166534}.order-body[hidden]{display:none!important}.outside-manual-note{margin:14px 0 0;padding:13px 15px;border-radius:12px;background:#fff6f6;border:1px solid #ffd5d5}.outside-manual-note b,.outside-manual-note span{display:block}.outside-manual-note span{margin-top:3px;color:#6b7280;font-size:12px}
@media(max-width:760px){.order-mode-grid{grid-template-columns:1fr}.order-mode-panel{padding:18px}.order-mode-head{text-align:left}}
.order-print-reader{display:grid;grid-template-columns:minmax(260px,1fr) auto;gap:14px;align-items:end;padding:16px;border:1px dashed #b8c8d8;border-radius:14px;background:#f8fbfd;margin:12px 0}.order-print-file{display:flex;flex-direction:column;gap:7px}.order-print-file input{background:#fff}.order-print-file small{color:#6b7280}.order-print-status{grid-column:1/-1;padding:9px 12px;border-radius:10px;background:#eef3f7;color:#52606d}.order-print-status.working{background:#fff7df;color:#7a5a00}.order-print-status.good{background:#eaf8ef;color:#146c36}.order-print-status.bad{background:#fff0f0;color:#a82424}.order-print-preview{margin:10px 0 16px;padding:14px;border-radius:12px;background:#ecfbf4;border:1px solid #bfe8d0;line-height:1.55}.order-print-preview b{display:block;margin-bottom:4px}.extract-ok{display:block;margin-top:8px;color:#146c36;font-weight:700}.extract-warnings{margin:8px 0 0;padding-left:20px;color:#a35a00}.id-manual-title{display:flex;gap:10px;align-items:baseline;margin:14px 0 8px}.id-manual-title span{font-size:.9rem;color:#6b7280}@media(max-width:760px){.order-print-reader{grid-template-columns:1fr}.order-print-reader .btn{width:100%}}

/* V5.10 - ordine fatto autonomamente dal cliente */
.self-order-panel{border-left:4px solid #0f766e}
.self-order-card{margin:0}
.self-order-card input{width:20px;height:20px;accent-color:#0f766e}
.disabled-field{opacity:.5}

/* V5.11 - dashboard: imponibile sempre prima, IVA compresa sotto */

/* V5.12 */
.self-orders-report{border-top:4px solid #15803d}.self-orders-report .panel-head p{margin:.25rem 0 0;color:#64748b}
.orders-filters{display:grid;grid-template-columns:repeat(5,minmax(150px,1fr));gap:12px;align-items:end}.orders-filter-actions{display:flex;gap:8px;align-items:end}.orders-summary{margin:16px 0}.orders-table{min-width:1250px}.row-actions{display:flex;gap:6px;align-items:center;white-space:nowrap}.row-actions form{margin:0}.danger-btn{border-color:#fecaca!important;background:#fff1f2!important;color:#b42318!important}.duplicate-badge{background:#fff3cd;color:#8a5b00}.possible-duplicate-row{background:#fffdf4}.self-order-badge{background:#e8f7ef;color:#0f6b36}.orders-identifiers div{white-space:nowrap;margin-bottom:2px}.order-detail-grid{display:grid;grid-template-columns:1.4fr .6fr;gap:18px}.detail-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.detail-list div{padding:12px;border:1px solid var(--line);border-radius:12px;background:#fafbfc}.detail-list span{display:block;color:var(--muted);font-size:12px}.detail-list b{display:block;margin-top:3px}.detail-money b,.detail-money strong{display:block;font-size:28px;margin:8px 0}.detail-money small{font-size:12px;color:var(--muted);font-weight:700}.danger-zone{border:1px solid #fecaca;background:#fffafa}@media(max-width:1200px){.orders-filters{grid-template-columns:repeat(3,minmax(150px,1fr))}}@media(max-width:760px){.orders-filters{grid-template-columns:1fr}.orders-filter-actions{flex-direction:column;align-items:stretch}.order-detail-grid,.detail-list{grid-template-columns:1fr}}

/* V5.14 - Cliente estero / IVA esente */
.foreign-card{grid-column:span 2;border:1px solid rgba(5,150,105,.35);background:rgba(5,150,105,.06)}
.foreign-card input:checked + span b{color:#047857}
.vat-exempt-total{outline:2px solid rgba(5,150,105,.25)}
.vat-exempt-total::after{content:'IVA ESENTE';font-size:.72rem;font-weight:800;letter-spacing:.05em;color:#047857}



/* ==========================================================
   V5.38 — DASHBOARD PREMIUM DARK
   Stile coordinato al Monitor Incentivi
   Applicato solo alle pagine con body.premium-ui
   ========================================================== */
body.premium-ui{
  --p-bg:#06110f;
  --p-bg2:#0a211d;
  --p-panel:rgba(7,31,27,.88);
  --p-panel2:rgba(10,39,34,.92);
  --p-panel3:rgba(15,46,41,.78);
  --p-line:rgba(116,233,176,.15);
  --p-line-strong:rgba(61,225,135,.34);
  --p-text:#f6fbf9;
  --p-muted:#9fb8b1;
  --p-green:#22dc7e;
  --p-green2:#0aa95d;
  --p-red:#ef4545;
  --p-red2:#a81f25;
  --p-blue:#4bb9ff;
  --p-gold:#f6c956;
  --p-shadow:0 18px 50px rgba(0,0,0,.32);
  background:
    radial-gradient(circle at 77% 0%,rgba(19,103,84,.33),transparent 28%),
    radial-gradient(circle at 12% 96%,rgba(0,146,85,.16),transparent 29%),
    linear-gradient(135deg,#050e0d 0%,#071a17 52%,#081410 100%);
  color:var(--p-text);
}
body.premium-ui .app-shell{background:transparent}
body.premium-ui .main{
  background:transparent;
  color:var(--p-text);
  padding:26px 28px 42px;
}
body.premium-ui .sidebar{
  background:
    radial-gradient(circle at 20% 95%,rgba(0,207,116,.14),transparent 30%),
    linear-gradient(180deg,#05110f 0%,#061916 48%,#07130f 100%);
  border-right:1px solid rgba(69,211,139,.13);
  box-shadow:16px 0 45px rgba(0,0,0,.22);
}
body.premium-ui .brand-logo-main{
  background:#071b17;
  border-color:rgba(67,227,144,.24);
  box-shadow:0 12px 35px rgba(0,0,0,.35);
}
body.premium-ui .brand-wordmark .word-arredi{color:#f6fbf9}
body.premium-ui .brand-wordmark .word-report{color:var(--p-green)}
body.premium-ui .brand-wordmark small{color:#78988f}
body.premium-ui .sidebar nav a{
  color:#b7cbc5;
  border:1px solid transparent;
  border-radius:12px;
  transition:.16s ease;
}
body.premium-ui .sidebar nav a:hover{
  color:#fff;
  background:linear-gradient(90deg,rgba(13,163,91,.18),rgba(20,78,66,.12));
  border-color:rgba(46,215,125,.16);
  transform:translateX(2px);
}
body.premium-ui .side-user{
  color:#fff;
  background:rgba(7,35,30,.62);
  border-color:rgba(69,211,139,.14);
}
body.premium-ui .side-user small{color:#8ca89f}
body.premium-ui .side-user a{color:#73e8aa}

body.premium-ui .page-head{
  margin-bottom:22px;
  align-items:flex-start;
}
body.premium-ui .page-head h1{
  color:#fff;
  font-size:32px;
  letter-spacing:-.7px;
  margin-bottom:4px;
}
body.premium-ui .page-head h1::after{
  content:" PREMIUM";
  color:var(--p-green);
  font-size:.62em;
  font-weight:900;
  letter-spacing:-.3px;
}
body.premium-ui .page-head p,
body.premium-ui .panel-head p,
body.premium-ui .section-title p,
body.premium-ui .muted{
  color:var(--p-muted)!important;
}
body.premium-ui h1,
body.premium-ui h2,
body.premium-ui h3,
body.premium-ui h4{color:#fff}

body.premium-ui .btn{
  color:#eaf5f1;
  background:linear-gradient(180deg,rgba(19,50,45,.96),rgba(8,29,25,.96));
  border:1px solid rgba(112,211,166,.20);
  box-shadow:0 8px 20px rgba(0,0,0,.16);
}
body.premium-ui .btn:hover{border-color:rgba(65,233,143,.52);color:#fff}
body.premium-ui .btn.primary{
  color:#fff;
  background:linear-gradient(105deg,#087c47 0%,#10a65f 52%,#b62c29 100%);
  border-color:rgba(83,231,151,.38);
  box-shadow:0 0 0 1px rgba(60,231,145,.07),0 12px 28px rgba(0,0,0,.28);
}
body.premium-ui .btn.primary:hover{filter:brightness(1.08)}
body.premium-ui .btn.danger,
body.premium-ui .danger-btn{background:linear-gradient(180deg,#5d191c,#321012)!important;color:#ffdede!important;border-color:#7f2c31!important}

body.premium-ui .panel,
body.premium-ui .sales-group,
body.premium-ui .metric-card,
body.premium-ui .count-pill,
body.premium-ui .mini-card{
  color:var(--p-text);
  background:
    radial-gradient(circle at 100% 0%,rgba(36,174,116,.055),transparent 34%),
    linear-gradient(145deg,rgba(8,34,30,.95),rgba(7,25,23,.96))!important;
  border:1px solid var(--p-line)!important;
  box-shadow:var(--p-shadow);
}
body.premium-ui .panel.soft{background:linear-gradient(145deg,rgba(7,31,27,.93),rgba(8,25,23,.97))!important}
body.premium-ui .panel:hover,
body.premium-ui .metric-card:hover{
  border-color:rgba(55,224,132,.27)!important;
}
body.premium-ui .panel-head{border-bottom-color:rgba(116,233,176,.09)}

body.premium-ui .hero-summary{gap:14px}
body.premium-ui .hero-card{
  position:relative;
  overflow:hidden;
  color:#fff;
  border:1px solid rgba(36,228,127,.29);
  border-radius:18px;
  background:
    radial-gradient(circle at 104% -5%,rgba(77,255,160,.13),transparent 38%),
    linear-gradient(135deg,#073a29,#09221e 68%,#19211e);
  box-shadow:0 14px 35px rgba(0,0,0,.22),inset 0 0 34px rgba(0,255,133,.03);
}
body.premium-ui .hero-card:nth-child(2){
  border-color:rgba(239,69,69,.34);
  background:
    radial-gradient(circle at 100% 0%,rgba(255,92,75,.16),transparent 38%),
    linear-gradient(135deg,#4a1717,#261314 68%,#121c1a);
}
body.premium-ui .hero-card:nth-child(3){
  background:
    radial-gradient(circle at 100% 0%,rgba(31,241,139,.16),transparent 38%),
    linear-gradient(135deg,#08472f,#08251f 68%,#101f1d);
}
body.premium-ui .hero-card.dark{
  border-color:rgba(75,185,255,.28);
  background:
    radial-gradient(circle at 100% 0%,rgba(75,185,255,.15),transparent 40%),
    linear-gradient(135deg,#0b2832,#0b2024 65%,#081717);
}
body.premium-ui .hero-card:after,
body.premium-ui .sales-box:after{
  content:"";
  position:absolute;
  width:110px;height:110px;
  right:-38px;top:-46px;
  border-radius:50%;
  background:rgba(255,255,255,.055);
}
body.premium-ui .hero-card small{color:#d6e8e2}
body.premium-ui .hero-card strong{color:#d2e7e0}
body.premium-ui .hero-card b{color:#fff}
body.premium-ui .hero-card span{color:#b6cac4}

body.premium-ui .dashboard-section{margin-top:22px}
body.premium-ui .section-title{margin-bottom:12px}
body.premium-ui .section-title h2{font-size:22px}
body.premium-ui .sales-groups{gap:13px}
body.premium-ui .sales-group{padding:14px;border-radius:17px}
body.premium-ui .sales-group-head{margin-bottom:9px}
body.premium-ui .sales-group-head h3{font-size:16px;color:#fff}
body.premium-ui .sales-group-head p{color:#88a59d!important}
body.premium-ui .sales-box{
  min-height:105px;
  color:#fff;
  border:1px solid rgba(57,229,139,.18);
  background:
    radial-gradient(circle at 100% 0%,rgba(50,231,139,.10),transparent 38%),
    linear-gradient(145deg,#073529,#0a2824)!important;
  box-shadow:0 10px 24px rgba(0,0,0,.17);
}
body.premium-ui .sales-box.internal{
  border-color:rgba(239,69,69,.22);
  background:
    radial-gradient(circle at 100% 0%,rgba(255,85,66,.09),transparent 38%),
    linear-gradient(145deg,#301a18,#16201d)!important;
}
body.premium-ui .sales-box.online{
  border-color:rgba(75,185,255,.22);
  background:
    radial-gradient(circle at 100% 0%,rgba(75,185,255,.09),transparent 38%),
    linear-gradient(145deg,#0b3035,#092623)!important;
}
body.premium-ui .sales-box.total{
  border-color:rgba(70,229,151,.27);
  background:
    radial-gradient(circle at 100% 0%,rgba(33,221,129,.11),transparent 38%),
    linear-gradient(145deg,#0a392c,#091e1b)!important;
}
body.premium-ui .sales-group.total-row{background:rgba(5,27,23,.68)!important;border-color:rgba(50,224,133,.24)!important}
body.premium-ui .sales-box span{color:#b7cac4}
body.premium-ui .sales-box strong{color:#fff}

body.premium-ui .metric-grid{gap:14px}
body.premium-ui .metric-card{
  border-radius:17px;
  background:
    radial-gradient(circle at 100% 0%,rgba(31,221,129,.08),transparent 38%),
    linear-gradient(145deg,#07392b,#091f1d)!important;
}
body.premium-ui .metric-card:nth-child(2){
  background:linear-gradient(145deg,#351919,#18201d)!important;
  border-color:rgba(239,69,69,.25)!important;
}
body.premium-ui .metric-card:nth-child(4){
  background:linear-gradient(145deg,#0a2f38,#091f22)!important;
  border-color:rgba(75,185,255,.22)!important;
}
body.premium-ui .metric-card span{color:#a9c3bb}
body.premium-ui .metric-card small{color:#7f9c94}
body.premium-ui .metric-card b,
body.premium-ui .metric-card strong{color:#fff}
body.premium-ui .metric-card em{color:#91b7ac}

body.premium-ui .count-strip{gap:10px}
body.premium-ui .count-pill{
  border-radius:14px;
  box-shadow:none;
}
body.premium-ui .count-pill small{color:#89a89f}
body.premium-ui .count-pill b{color:#fff}
body.premium-ui .count-pill span{color:#8fa99f}
body.premium-ui .count-pill.warn{
  background:linear-gradient(145deg,#321b19,#191e1c)!important;
  border-color:rgba(239,69,69,.19)!important;
}

body.premium-ui .kpi-row{
  border-bottom-color:rgba(116,233,176,.09);
}
body.premium-ui .kpi-row span,
body.premium-ui .kpi-row b{color:#f5fbf8}
body.premium-ui .kpi-row small{color:#839e96}
body.premium-ui .kpi-values small{color:#8fb1a8}

body.premium-ui table{
  color:#eaf4f1;
  border-collapse:separate;
  border-spacing:0;
}
body.premium-ui thead th{
  color:#9db9b0;
  background:#09241f;
  border-bottom:1px solid rgba(116,233,176,.13);
}
body.premium-ui tbody tr{background:rgba(7,28,25,.58)}
body.premium-ui tbody tr:nth-child(even){background:rgba(12,37,33,.42)}
body.premium-ui tbody tr:hover{background:rgba(18,67,55,.44)}
body.premium-ui td{border-bottom-color:rgba(116,233,176,.08)}
body.premium-ui td small{color:#89a59c}
body.premium-ui .table-wrap{
  border:1px solid rgba(116,233,176,.09);
  border-radius:14px;
  background:rgba(5,22,20,.48);
}
body.premium-ui .thumb-link,
body.premium-ui .linkbtn{color:#5ce69c}
body.premium-ui .badge{
  background:#17372f;
  color:#b9d4cb;
  border-color:rgba(100,216,163,.16);
}
body.premium-ui .badge.ok{background:#0c5133;color:#91f0b9}
body.premium-ui .badge.no{background:#5a1f22;color:#ffd0d0}

body.premium-ui input,
body.premium-ui select,
body.premium-ui textarea{
  color:#f2f8f6;
  background:#071f1b;
  border:1px solid rgba(110,214,166,.18);
  box-shadow:none;
}
body.premium-ui input:focus,
body.premium-ui select:focus,
body.premium-ui textarea:focus{
  outline:none;
  border-color:#24d67d;
  box-shadow:0 0 0 3px rgba(36,214,125,.10);
}
body.premium-ui option{background:#09231f;color:#fff}
body.premium-ui label{color:#b5cbc4}

body.premium-ui .filters,
body.premium-ui .filters.wide{
  background:transparent;
}
body.premium-ui .product-row,
body.premium-ui .pay-summary{
  border-bottom-color:rgba(116,233,176,.09);
}
body.premium-ui .product-row span,
body.premium-ui .pay-summary small{color:#8da79f}
body.premium-ui .pay-summary b,
body.premium-ui .product-row b,
body.premium-ui .product-row strong{color:#fff}

body.premium-ui .logistics-switch{gap:10px}
body.premium-ui .log-tab{
  color:#b8cdc6;
  background:#071f1b;
  border:1px solid rgba(116,233,176,.14);
  box-shadow:0 8px 18px rgba(0,0,0,.14);
}
body.premium-ui .log-tab:hover{border-color:rgba(54,225,136,.38);color:#fff}
body.premium-ui .log-tab span{background:#11372e;color:#8ceeb5}
body.premium-ui .log-tab.active{
  color:#fff;
  background:linear-gradient(100deg,#097948,#0ca45e);
  border-color:#36df88;
}
body.premium-ui .log-tab.active span{background:#e7fff1;color:#086a3f}
body.premium-ui .okbtn{background:#0b5032!important;color:#a8f5c9!important;border-color:#18794b!important}
body.premium-ui .nobtn{background:#4b1d20!important;color:#ffc8ca!important;border-color:#7a2c31!important}

body.premium-ui .split{gap:14px}
body.premium-ui .flash{box-shadow:0 10px 25px rgba(0,0,0,.22)}
body.premium-ui .flash.success{background:#0b4b31;color:#baf3d0;border-color:#167346}
body.premium-ui .flash.error{background:#4d1d20;color:#ffd0d2;border-color:#7d2e33}

@media(max-width:1100px){
  body.premium-ui .main{padding:20px}
  body.premium-ui .sales-group-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
  body.premium-ui .main{padding:15px}
  body.premium-ui .page-head h1{font-size:27px}
  body.premium-ui .sales-group-grid{grid-template-columns:1fr}
}




/* ==========================================================
   V5.39 — PREMIUM FULL UI
   Tema ufficiale ArrediReport: dark emerald / teal / red.
   Applicato a TUTTE le pagine basate su base.html.
   ========================================================== */
body.premium-ui{
  --p-bg:#050e0d;
  --p-bg2:#071a17;
  --p-panel:#08221e;
  --p-panel2:#0a2b26;
  --p-panel3:#0d342e;
  --p-line:rgba(88,229,158,.16);
  --p-line2:rgba(88,229,158,.28);
  --p-text:#f7fbfa;
  --p-muted:#91aaa3;
  --p-green:#19dc7d;
  --p-green2:#099756;
  --p-red:#ee4247;
  --p-blue:#4ab9ff;
  --p-gold:#f2c856;
  --p-shadow:0 16px 42px rgba(0,0,0,.28);
  background:
    radial-gradient(circle at 82% 0%,rgba(10,104,82,.27),transparent 28%),
    radial-gradient(circle at 8% 100%,rgba(0,197,111,.12),transparent 31%),
    linear-gradient(135deg,#040c0b 0%,#071916 54%,#06120f 100%);
  color:var(--p-text);
}
body.premium-ui .app-shell{background:transparent}
body.premium-ui .main{background:transparent;color:var(--p-text)}
body.premium-ui .sidebar{
  background:
    radial-gradient(circle at 18% 94%,rgba(0,213,120,.12),transparent 31%),
    linear-gradient(180deg,#04100e 0%,#061916 55%,#06110f 100%);
  border-right:1px solid rgba(72,223,147,.14);
}
body.premium-ui .sidebar nav a{color:#b6cac4}
body.premium-ui .sidebar nav a:hover{
  color:#fff;
  background:linear-gradient(90deg,rgba(9,140,79,.24),rgba(14,60,51,.14));
  border-color:rgba(41,218,127,.22)
}
body.premium-ui .brand-logo-main{background:#071b17;border-color:rgba(70,228,146,.22)}
body.premium-ui .brand-wordmark .word-arredi{color:#f7fbfa}
body.premium-ui .brand-wordmark .word-report{color:var(--p-green)}
body.premium-ui .brand-wordmark small{color:#77958c}
body.premium-ui .side-user{background:rgba(7,31,27,.62);border-color:rgba(76,220,147,.14);color:#fff}
body.premium-ui .side-user small{color:#86a59c}
body.premium-ui .side-user a{color:#65e39e}

body.premium-ui h1,body.premium-ui h2,body.premium-ui h3,body.premium-ui h4{color:#fff}
body.premium-ui .page-head p,
body.premium-ui .panel-head p,
body.premium-ui .muted{color:var(--p-muted)!important}

body.premium-ui .panel,
body.premium-ui .metric-card,
body.premium-ui .mini-card,
body.premium-ui .report-card,
body.premium-ui .attachment-card,
body.premium-ui .order-mode-card,
body.premium-ui .order-section,
body.premium-ui .seller-card,
body.premium-ui .count-pill,
body.premium-ui .inc-card,
body.premium-ui .seller-inc{
  color:var(--p-text);
  background:
    radial-gradient(circle at 100% 0%,rgba(44,214,137,.055),transparent 34%),
    linear-gradient(145deg,rgba(8,34,30,.96),rgba(6,24,21,.97))!important;
  border:1px solid var(--p-line)!important;
  box-shadow:var(--p-shadow);
}
body.premium-ui .panel.soft{background:linear-gradient(145deg,rgba(7,31,27,.94),rgba(7,24,22,.98))!important}
body.premium-ui .panel-head{border-bottom-color:rgba(91,223,157,.10)!important}

body.premium-ui .btn,
body.premium-ui button:not(.audio-btn){
  color:#edf8f4;
  background:linear-gradient(180deg,rgba(18,49,44,.98),rgba(7,28,25,.98));
  border:1px solid rgba(108,214,166,.20);
}
body.premium-ui .btn:hover,
body.premium-ui button:not(.audio-btn):hover{border-color:rgba(57,232,140,.47);color:#fff}
body.premium-ui .btn.primary,
body.premium-ui button.primary{
  background:linear-gradient(105deg,#087a46 0%,#0da35c 54%,#b62e2b 100%)!important;
  border-color:rgba(77,228,146,.38)!important;
  color:#fff!important;
}
body.premium-ui .danger-link,
body.premium-ui .danger-btn{color:#ff9ea2!important}

body.premium-ui input,
body.premium-ui select,
body.premium-ui textarea{
  color:#f4faf8!important;
  background:#071f1b!important;
  border:1px solid rgba(105,213,163,.18)!important;
}
body.premium-ui input:focus,
body.premium-ui select:focus,
body.premium-ui textarea:focus{
  outline:none;
  border-color:#22d77c!important;
  box-shadow:0 0 0 3px rgba(34,215,124,.10)!important;
}
body.premium-ui option{background:#08231f;color:#fff}
body.premium-ui label{color:#b7cbc5}

body.premium-ui table{color:#ecf5f2}
body.premium-ui thead th{
  color:#9eb8b1;
  background:#09231f!important;
  border-bottom-color:rgba(93,225,159,.13)!important
}
body.premium-ui tbody tr{background:rgba(7,28,25,.56)!important}
body.premium-ui tbody tr:nth-child(even){background:rgba(11,38,33,.42)!important}
body.premium-ui tbody tr:hover{background:rgba(18,67,55,.42)!important}
body.premium-ui td{border-bottom-color:rgba(94,223,158,.08)!important}
body.premium-ui .table-wrap{background:rgba(5,22,20,.50)!important;border:1px solid rgba(94,223,158,.10)!important}
body.premium-ui .thumb-link,
body.premium-ui .linkbtn{color:#63e5a0!important}

body.premium-ui .badge{background:#15372e!important;color:#bbd5cd!important;border-color:rgba(94,218,162,.16)!important}
body.premium-ui .badge.ok{background:#0b5233!important;color:#9bf1be!important}
body.premium-ui .badge.no{background:#5a1e22!important;color:#ffd0d2!important}

body.premium-ui .form-grid,
body.premium-ui .grid-2,
body.premium-ui .split,
body.premium-ui .filters,
body.premium-ui .filters.wide{color:var(--p-text)}
body.premium-ui .form-grid small,
body.premium-ui .field-head-row small,
body.premium-ui .attachment-card small,
body.premium-ui .order-mode-card small{color:#8ea99f!important}

body.premium-ui .order-page-head,
body.premium-ui .delegate-panel,
body.premium-ui .order-mode-panel,
body.premium-ui .payment-section,
body.premium-ui .products-section,
body.premium-ui .premium-fields,
body.premium-ui .total-box,
body.premium-ui .outside-card,
body.premium-ui .foreign-card,
body.premium-ui .check-card,
body.premium-ui .self-order-panel,
body.premium-ui .prestashop-section,
body.premium-ui .date-panel,
body.premium-ui .call-panel,
body.premium-ui .report-block,
body.premium-ui .notes-field,
body.premium-ui .date-toolbar{
  background:
    radial-gradient(circle at 100% 0%,rgba(42,218,139,.045),transparent 34%),
    linear-gradient(145deg,rgba(8,34,30,.95),rgba(7,24,22,.97))!important;
  border-color:var(--p-line)!important;
  color:var(--p-text)!important;
}
body.premium-ui .order-step,
body.premium-ui .eyebrow,
body.premium-ui .block-title{color:#63e5a0!important}
body.premium-ui .delegate-banner,
body.premium-ui .delegate-status,
body.premium-ui .today-badge,
body.premium-ui .order-account-chip{
  color:#aef2c9!important;
  background:#0b4630!important;
  border-color:#146b46!important;
}
body.premium-ui .sticky-save{
  background:linear-gradient(180deg,rgba(5,19,17,0),rgba(5,17,15,.96) 38%)!important;
}
body.premium-ui .premium-total{color:#fff!important}

body.premium-ui .log-tab{background:#071f1b!important;color:#b9cdc7!important;border-color:rgba(103,215,164,.16)!important}
body.premium-ui .log-tab.active{background:linear-gradient(100deg,#087a47,#0ca35d)!important;color:#fff!important;border-color:#32de85!important}
body.premium-ui .okbtn{background:#0b5032!important;color:#a8f5c9!important;border-color:#18794b!important}
body.premium-ui .nobtn{background:#4b1d20!important;color:#ffc8ca!important;border-color:#7a2c31!important}

body.premium-ui .mini-card,
body.premium-ui .activity-total{background:linear-gradient(145deg,#08231f,#071b18)!important}
body.premium-ui .activity-total.requests{border-color:rgba(40,219,125,.25)!important}
body.premium-ui .activity-total.quotes{border-color:rgba(75,185,255,.25)!important}
body.premium-ui .activity-total.contacts{border-color:rgba(242,200,86,.25)!important}
body.premium-ui .activity-total.facebook{border-color:rgba(97,130,255,.25)!important}
body.premium-ui .activity-total-title{color:#8ea79f!important}

body.premium-ui .inc-hero,
body.premium-ui .inc-rank,
body.premium-ui .inc-admin-grid{color:var(--p-text)}
body.premium-ui .inc-bar{background:#183b33!important}
body.premium-ui .inc-bar i{background:linear-gradient(90deg,#18c96e,#68e89d)!important}
body.premium-ui .threshold-row{background:#08231f!important;border-color:rgba(87,224,156,.14)!important}
body.premium-ui .status-pill.ok{background:#0b5133!important;color:#9af0bc!important}
body.premium-ui .status-pill.learn{background:#4c3b18!important;color:#ffe49b!important}
body.premium-ui .status-pill.off{background:#3b1c1f!important;color:#f7b1b4!important}

body.premium-ui .login-card{
  background:
    radial-gradient(circle at 100% 0%,rgba(34,221,129,.09),transparent 35%),
    linear-gradient(145deg,#08231f,#061916)!important;
  border-color:rgba(69,224,147,.18)!important;
  box-shadow:0 24px 70px rgba(0,0,0,.42)!important;
}
body.premium-ui .login-wordmark .word-arredi{color:#fff}
body.premium-ui .login-wordmark .word-report{color:var(--p-green)}
body.premium-ui .main-login{
  background:
    radial-gradient(circle at 70% 10%,rgba(9,103,81,.28),transparent 30%),
    linear-gradient(135deg,#040c0b,#071a17)!important;
}

/* Commercial matrix – must ALWAYS remain cards, never text list */
body.premium-ui .commercial-matrix{
  display:grid;
  gap:12px;
}
body.premium-ui .commercial-row{
  display:grid;
  grid-template-columns:minmax(180px,.80fr) repeat(4,minmax(0,1fr));
  gap:10px;
  align-items:stretch;
}
body.premium-ui .commercial-label{
  border-radius:15px;
  padding:14px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  background:
    radial-gradient(circle at 100% 0%,rgba(40,222,132,.09),transparent 40%),
    linear-gradient(145deg,#07382b,#09251f);
  border:1px solid rgba(57,228,138,.20);
}
body.premium-ui .commercial-label.internal{
  background:linear-gradient(145deg,#301816,#17211e);
  border-color:rgba(238,66,71,.20)
}
body.premium-ui .commercial-label.online{
  background:linear-gradient(145deg,#0a3137,#09231f);
  border-color:rgba(74,185,255,.20)
}
body.premium-ui .commercial-label.total{
  background:linear-gradient(145deg,#0a3c2d,#08221e);
  border-color:rgba(60,230,142,.28)
}
body.premium-ui .commercial-label h3{margin:0 0 5px;font-size:16px}
body.premium-ui .commercial-label p{margin:0;color:#8fa89f;font-size:12px;line-height:1.35}
body.premium-ui .commercial-card{
  min-height:102px;
  border-radius:15px;
  padding:13px 14px;
  position:relative;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  justify-content:center;
  color:#fff;
  background:
    radial-gradient(circle at 100% 0%,rgba(38,231,137,.11),transparent 40%),
    linear-gradient(145deg,#07372a,#092720);
  border:1px solid rgba(45,224,132,.20);
  box-shadow:0 8px 20px rgba(0,0,0,.17)
}
body.premium-ui .commercial-card.week{
  background:
    radial-gradient(circle at 100% 0%,rgba(239,66,71,.10),transparent 40%),
    linear-gradient(145deg,#321817,#19211e);
  border-color:rgba(239,66,71,.22)
}
body.premium-ui .commercial-card.month{
  background:linear-gradient(145deg,#07382b,#09251f);
}
body.premium-ui .commercial-card.year{
  background:
    radial-gradient(circle at 100% 0%,rgba(74,185,255,.10),transparent 40%),
    linear-gradient(145deg,#0a2e36,#09211f);
  border-color:rgba(74,185,255,.22)
}
body.premium-ui .commercial-card small{font-size:10px;font-weight:900;letter-spacing:.7px;color:#a9c0b9}
body.premium-ui .commercial-card strong{font-size:23px;line-height:1.1;margin:6px 0 4px;color:#fff}
body.premium-ui .commercial-card span{font-size:11px;color:#a9bdb7;line-height:1.25}

@media(max-width:1180px){
  body.premium-ui .commercial-row{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.premium-ui .commercial-label{grid-column:1/-1}
}
@media(max-width:720px){
  body.premium-ui .commercial-row{grid-template-columns:1fr}
}




/* === V5.40 compact top10 and euro formatting === */
.top10-compact-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.top10-card{background:#fafbfc;border:1px solid var(--line);padding:12px 13px;border-radius:16px}
.top10-head{display:flex;justify-content:space-between;align-items:flex-end;gap:10px;margin-bottom:10px}
.top10-head h3{margin:0;font-size:15px}
.top10-head span{font-size:11px;color:var(--muted);font-weight:700}
.top10-list{display:flex;flex-direction:column;gap:6px}
.top10-row{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center;padding:7px 9px;border-radius:10px;background:rgba(17,24,39,.03);border:1px solid rgba(20,30,50,.05)}
.top10-code{font-size:14px;line-height:1.2;color:#172033;word-break:break-word}
.top10-qty{font-size:16px;line-height:1;color:#172033;min-width:34px;text-align:right}
body.premium-ui .top10-card{background:linear-gradient(145deg,#082620,#071c19)!important;border:1px solid rgba(79,228,148,.16)!important;box-shadow:0 10px 24px rgba(0,0,0,.16)}
body.premium-ui .top10-head h3,body.premium-ui .top10-code,body.premium-ui .top10-qty{color:#fff}
body.premium-ui .top10-head span{color:#90aca3}
body.premium-ui .top10-row{background:linear-gradient(145deg,rgba(255,255,255,.03),rgba(255,255,255,.01));border:1px solid rgba(85,221,154,.10)}
@media(max-width:1100px){.top10-compact-grid{grid-template-columns:1fr}}



/* === V5.41 premium contrast fixes === */
body.premium-ui .kpi-row{
  background:
    radial-gradient(circle at 100% 0%,rgba(42,218,139,.05),transparent 34%),
    linear-gradient(145deg,rgba(8,34,30,.97),rgba(7,24,22,.98))!important;
  border:1px solid rgba(93,225,159,.14)!important;
  box-shadow:0 10px 24px rgba(0,0,0,.16);
}
body.premium-ui .kpi-row span,
body.premium-ui .kpi-row b,
body.premium-ui .kpi-values b{color:#ffffff!important}
body.premium-ui .kpi-row small,
body.premium-ui .kpi-values small{color:#c6d9d3!important}

body.premium-ui .seller-head strong,
body.premium-ui .seller-stats b{color:#ffffff!important}
body.premium-ui .seller-head span{
  color:#ffffff!important;
  font-weight:900!important;
  text-shadow:0 1px 0 rgba(0,0,0,.25);
}
body.premium-ui .seller-head span small,
body.premium-ui .seller-stats span{color:#d3e3de!important}
body.premium-ui .seller-stats small{color:#9db7b0!important}

body.premium-ui .order-mode-card b,
body.premium-ui .order-mode-card .order-mode-icon,
body.premium-ui .outside-manual-note b,
body.premium-ui .outside-manual-note span{
  color:#f7fcfa!important;
}
body.premium-ui .order-mode-status{
  background:rgba(255,255,255,.05)!important;
  color:#cfdfda!important;
  border:1px solid rgba(95,224,159,.12)!important;
}
body.premium-ui .order-mode-status.active{
  background:#0b4630!important;
  color:#b7ffd5!important;
  border-color:#146b46!important;
}
body.premium-ui .outside-manual-note{
  background:linear-gradient(145deg,#0b2c26,#081f1b)!important;
  border:1px solid rgba(95,224,159,.15)!important;
}

body.premium-ui .panel h1,
body.premium-ui .panel h2,
body.premium-ui .panel h3,
body.premium-ui .panel h4,
body.premium-ui .panel b,
body.premium-ui .panel strong{color:#ffffff}
body.premium-ui .panel p,
body.premium-ui .panel span,
body.premium-ui .panel small,
body.premium-ui .panel li{color:#d3e1dd}

body.premium-ui .top-products-panel .muted,
body.premium-ui .seller-panel .muted,
body.premium-ui .section-approved .muted,
body.premium-ui .section-rejected .muted,
body.premium-ui .order-mode-panel .muted{color:#95afa8!important}



/* ==========================================================
   V5.42 — PREMIUM READABILITY AUDIT
   Revisione generale contrasto e coerenza del tema premium.
   ========================================================== */

/* Sezioni legacy che avevano ancora sfondi chiari */
body.premium-ui .section-sales,
body.premium-ui .section-orders,
body.premium-ui .section-approved,
body.premium-ui .section-rejected,
body.premium-ui .section-sellers,
body.premium-ui .section-products,
body.premium-ui .section-details{
  background:
    radial-gradient(circle at 100% 0%,rgba(43,220,139,.045),transparent 34%),
    linear-gradient(145deg,#08241f,#071a18)!important;
  color:#f7fbfa!important;
}
body.premium-ui .section-sales{border-top-color:#19dc7d!important}
body.premium-ui .section-orders{border-top-color:#4ab9ff!important}
body.premium-ui .section-approved{border-top-color:#19dc7d!important}
body.premium-ui .section-rejected{border-top-color:#ef4545!important}
body.premium-ui .section-sellers{border-top-color:#19dc7d!important}
body.premium-ui .section-products{border-top-color:#f2c856!important}
body.premium-ui .section-details{border-top-color:#6d8790!important}

/* Dilazioni approvate: niente più card bianche */
body.premium-ui .section-approved .kpi-list{gap:9px}
body.premium-ui .section-approved .kpi-row{
  background:linear-gradient(145deg,#0a2e27,#08201c)!important;
  border:1px solid rgba(53,225,137,.20)!important;
  border-left:4px solid #19dc7d!important;
  color:#fff!important;
}
body.premium-ui .section-approved .kpi-row span,
body.premium-ui .section-approved .kpi-row b,
body.premium-ui .section-approved .kpi-values b{
  color:#fff!important;
  font-weight:900!important;
}
body.premium-ui .section-approved .kpi-row small,
body.premium-ui .section-approved .kpi-values small{
  color:#b9cec7!important;
}

/* Dilazioni non approvate */
body.premium-ui .section-rejected .count-pill{
  background:linear-gradient(145deg,#35191a,#161d1b)!important;
  border:1px solid rgba(239,69,69,.20)!important;
  border-left:4px solid #ef4545!important;
}
body.premium-ui .section-rejected .count-pill small,
body.premium-ui .section-rejected .count-pill span{color:#d8c5c5!important}
body.premium-ui .section-rejected .count-pill b,
body.premium-ui .section-rejected .count-pill strong{color:#fff!important}

/* Venditori: elimina definitivamente il vecchio viola */
body.premium-ui .seller-card{
  background:linear-gradient(145deg,#082720,#071c19)!important;
  border-color:rgba(54,225,139,.17)!important;
}
body.premium-ui .seller-head strong,
body.premium-ui .seller-head span,
body.premium-ui .seller-head span small,
body.premium-ui .seller-stats b{
  color:#fff!important;
}
body.premium-ui .seller-head span{
  font-weight:900!important;
  letter-spacing:.1px;
}
body.premium-ui .seller-stats small{color:#8faea5!important}
body.premium-ui .seller-stats span{color:#bcd0ca!important}

/* Inserimento ordine: testi sempre chiari e card più eleganti */
body.premium-ui .order-mode-panel{
  background:
    radial-gradient(circle at 20% 0%,rgba(25,220,125,.08),transparent 32%),
    linear-gradient(145deg,#071f1b,#061714)!important;
}
body.premium-ui .order-mode-head h2{color:#fff!important}
body.premium-ui .order-mode-head p{color:#91aaa3!important}
body.premium-ui .order-mode-card{
  background:
    radial-gradient(circle at 100% 0%,rgba(50,222,141,.055),transparent 35%),
    linear-gradient(145deg,#092820,#071b18)!important;
  border:1px solid rgba(83,224,155,.18)!important;
}
body.premium-ui .order-mode-card.site:hover{
  border-color:#19dc7d!important;
  box-shadow:0 10px 30px rgba(0,220,125,.10)!important;
}
body.premium-ui .order-mode-card.outside:hover{
  border-color:#ef4545!important;
  box-shadow:0 10px 30px rgba(239,69,69,.10)!important;
}
body.premium-ui .order-mode-card.site.selected{
  background:linear-gradient(145deg,#0b3a2b,#08241e)!important;
  border-color:#19dc7d!important;
  box-shadow:0 0 0 3px rgba(25,220,125,.10)!important;
}
body.premium-ui .order-mode-card.outside.selected{
  background:linear-gradient(145deg,#37191a,#171e1b)!important;
  border-color:#ef4545!important;
  box-shadow:0 0 0 3px rgba(239,69,69,.09)!important;
}
body.premium-ui .order-mode-card b{
  color:#fff!important;
  font-size:17px;
  font-weight:900!important;
}
body.premium-ui .order-mode-card small{
  color:#bfd1cb!important;
}
body.premium-ui .order-mode-icon{filter:drop-shadow(0 4px 10px rgba(0,0,0,.25))}
body.premium-ui .order-mode-status{
  background:#0a2923!important;
  color:#d8e7e2!important;
  border:1px solid rgba(74,220,148,.14)!important;
}

/* Form / componenti legacy chiari */
body.premium-ui .check-card,
body.premium-ui .outside-card,
body.premium-ui .premium-total,
body.premium-ui .attachment-card,
body.premium-ui .delegate-field,
body.premium-ui .prestashop-help,
body.premium-ui .order-print-reader,
body.premium-ui .order-print-preview,
body.premium-ui .detail-list div,
body.premium-ui .info-box{
  background:linear-gradient(145deg,#092720,#071b18)!important;
  border-color:rgba(82,221,153,.16)!important;
  color:#f3faf7!important;
}
body.premium-ui .attachment-card.required-attachment{
  background:linear-gradient(145deg,#351819,#191d1b)!important;
  border-color:#a83b3f!important;
}
body.premium-ui .attachment-required{color:#ffb5b8!important}
body.premium-ui .attachment-ok{color:#75e9a9!important}
body.premium-ui .delegate-field small,
body.premium-ui .prestashop-help,
body.premium-ui .order-print-file small,
body.premium-ui .detail-list span{color:#a5bdb5!important}
body.premium-ui .order-print-file input{background:#071f1b!important}
body.premium-ui .order-print-status{
  background:#0a2923!important;
  color:#cbded8!important;
}
body.premium-ui .order-print-status.working{background:#3c3217!important;color:#ffe99b!important}
body.premium-ui .order-print-status.good{background:#0b4b31!important;color:#aaf2c8!important}
body.premium-ui .order-print-status.bad{background:#4b1c20!important;color:#ffc4c7!important}
body.premium-ui .extract-ok{color:#7cebae!important}
body.premium-ui .extract-warnings{color:#f3cf79!important}
body.premium-ui .info-box{color:#d8ebe4!important}

/* Report: textarea/pre non devono tornare chiari */
body.premium-ui .report-block textarea,
body.premium-ui .report-cols pre{
  background:#071f1b!important;
  color:#edf8f4!important;
  border-color:rgba(90,218,158,.16)!important;
}
body.premium-ui .block-title>span{
  background:linear-gradient(135deg,#087a46,#0da35c)!important;
  color:#fff!important;
}
body.premium-ui .block-title p{color:#9fb7af!important}

/* Ordini / dettaglio / badge legacy */
body.premium-ui .duplicate-badge{
  background:#4a3716!important;
  color:#ffe59b!important;
}
body.premium-ui .possible-duplicate-row{background:#251f13!important}
body.premium-ui .self-order-badge{background:#0b4c31!important;color:#aaf2c8!important}
body.premium-ui .danger-zone{
  background:linear-gradient(145deg,#36191a,#191c1a)!important;
  border-color:#7b2c31!important;
}
body.premium-ui .detail-list div b{color:#fff!important}
body.premium-ui .detail-money small{color:#a2bbb3!important}
body.premium-ui .thumb-link{
  background:#0b4630!important;
  color:#b8ffd5!important;
  border-color:#176a46!important;
}

/* Piccoli pulsanti X e azioni */
body.premium-ui .x{
  background:#15332c!important;
  color:#fff!important;
  border:1px solid rgba(93,222,158,.14)!important;
}
body.premium-ui .x:hover{background:#21443b!important}

/* Incentivi seller/admin: elimina i box inline chiari ancora presenti */
body.premium-ui .inc-card[style],
body.premium-ui #incFields{
  background:linear-gradient(145deg,#092720,#071b18)!important;
  color:#f7fbfa!important;
  border-color:rgba(72,224,148,.18)!important;
}
body.premium-ui .inc-card[style] span,
body.premium-ui .inc-card[style] small,
body.premium-ui #incFields small{color:#c1d4ce!important}

/* Alert obiettivi amministratore */
body.premium-ui .panel[style*="#fff7f7"]{
  background:linear-gradient(145deg,#321819,#181d1b)!important;
  border-color:#7d3034!important;
}
body.premium-ui .panel[style*="#fff7f7"] h2{color:#ffb8bb!important}

/* Regole generali di sicurezza contrasto */
body.premium-ui .panel,
body.premium-ui .seller-card,
body.premium-ui .metric-card,
body.premium-ui .mini-card,
body.premium-ui .count-pill,
body.premium-ui .kpi-row{
  --ink:#f7fbfa;
  --muted:#98b0a9;
}
body.premium-ui .panel a:not(.btn):not(.thumb-link):not(.linkbtn){color:#72e7aa}
body.premium-ui .panel hr{border-color:rgba(89,218,158,.10)}




/* ==========================================================
   V5.44 — MONITOR TV SAFE AREA + COMPACT LAYOUT
   Ottimizzato per TV 16:9 con overscan e più venditori visibili.
   ========================================================== */
body.monitor-body{
  box-sizing:border-box!important;
  width:100vw!important;
  height:100vh!important;
  min-height:100vh!important;
  overflow:hidden!important;
  padding:clamp(8px,1.05vw,20px)!important;
}
body.monitor-body *, body.monitor-body *:before, body.monitor-body *:after{
  box-sizing:border-box!important;
}
.monitor-shell{
  width:100%!important;
  max-width:none!important;
  height:calc(100vh - clamp(16px,2.1vw,40px))!important;
  margin:0 auto!important;
  padding:0!important;
  overflow:hidden!important;
}
.monitor-topbar{
  min-height:clamp(34px,4.2vh,52px)!important;
  height:auto!important;
  margin:0 0 clamp(5px,.7vh,9px)!important;
  padding:0 clamp(4px,.4vw,8px)!important;
}
.monitor-topbar .brand{font-size:clamp(18px,1.8vw,32px)!important}
.monitor-topbar .clock{font-size:clamp(14px,1.25vw,24px)!important}

.monitor-grid{
  height:calc(100% - clamp(40px,5vh,61px))!important;
  min-height:0!important;
  gap:clamp(6px,.7vw,12px)!important;
  grid-template-columns:minmax(0,1.72fr) minmax(300px,.83fr)!important;
}
.monitor-left{
  min-width:0!important;
  min-height:0!important;
  display:grid!important;
  grid-template-rows:minmax(0,54%) minmax(0,46%)!important;
  gap:clamp(6px,.75vh,10px)!important;
}
.monitor-left-bottom{
  min-height:0!important;
  display:grid!important;
  grid-template-columns:minmax(0,1.35fr) minmax(220px,.65fr)!important;
  gap:clamp(6px,.7vw,10px)!important;
}
.monitor-card{
  min-width:0!important;
  min-height:0!important;
  overflow:hidden!important;
  border-radius:clamp(12px,1vw,20px)!important;
}
.monitor-goal{
  padding:clamp(12px,1.25vw,22px)!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:flex-start!important;
}
.monitor-goal-head{margin-bottom:clamp(5px,.6vh,8px)!important}
.monitor-goal h1,
.monitor-goal .goal-value{font-size:clamp(38px,4.8vw,82px)!important;line-height:.95!important}
.monitor-goal .next-step{font-size:clamp(25px,3vw,52px)!important;line-height:1!important}
.monitor-goal .missing{font-size:clamp(16px,1.5vw,27px)!important;margin-top:3px!important}
.monitor-progress{margin:clamp(6px,.8vh,10px) 0!important;height:clamp(10px,1.35vh,16px)!important}
.monitor-steps{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:clamp(5px,.55vw,9px)!important;
  margin-top:clamp(4px,.5vh,7px)!important;
}
.monitor-step{
  min-height:0!important;
  padding:clamp(6px,.65vh,10px) clamp(4px,.45vw,8px)!important;
  font-size:clamp(13px,1.15vw,21px)!important;
  line-height:1.05!important;
}
.monitor-step strong{font-size:clamp(15px,1.35vw,24px)!important}

.monitor-ranking,
.monitor-how{
  padding:clamp(10px,1vw,17px)!important;
  height:100%!important;
  min-height:0!important;
  overflow:hidden!important;
}
.monitor-ranking h2,
.monitor-how h2{font-size:clamp(20px,2vw,34px)!important;line-height:1.05!important;margin:0 0 3px!important}
.monitor-ranking .subtitle,
.monitor-how .subtitle{font-size:clamp(11px,.95vw,17px)!important;line-height:1.2!important;margin-bottom:5px!important}

/* Più venditori contemporaneamente */
.monitor-ranking-list{
  display:flex!important;
  flex-direction:column!important;
  gap:0!important;
  margin-top:clamp(3px,.4vh,6px)!important;
  overflow:hidden!important;
}
.monitor-ranking-row{
  min-height:0!important;
  padding:clamp(3px,.42vh,6px) 0!important;
  margin:0!important;
  font-size:clamp(12px,1.05vw,19px)!important;
  line-height:1.05!important;
}
.monitor-ranking-row .rank{width:clamp(24px,2.2vw,38px)!important}
.monitor-ranking-row .seller-name{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.monitor-ranking-row .percent{font-size:clamp(12px,1.05vw,19px)!important;font-weight:900!important}
.monitor-ranking-row .bar{height:clamp(6px,.75vh,10px)!important}

.monitor-how{
  font-size:clamp(11px,1.05vw,18px)!important;
  line-height:1.22!important;
}
.monitor-how p{margin:0 0 clamp(5px,.7vh,9px)!important}
.monitor-how strong{font-weight:900!important}

/* Salvadanaio: compatto senza perdere il maialino */
.monitor-pig{
  padding:clamp(10px,1vw,18px)!important;
  height:100%!important;
  min-height:0!important;
}
.monitor-pig h2{
  white-space:nowrap!important;
  font-size:clamp(22px,2.55vw,44px)!important;
  line-height:1!important;
  margin:0!important;
}
.monitor-pig .pig-stage{
  min-height:0!important;
  flex:1 1 auto!important;
  margin:clamp(3px,.5vh,7px) 0!important;
}
.monitor-pig .pig-amount{font-size:clamp(34px,3.7vw,64px)!important;line-height:1!important;margin:2px 0!important}
.monitor-pig .pig-month-net{font-size:clamp(11px,1vw,18px)!important;margin:2px 0!important}
.monitor-pig .challenge-box{
  padding:clamp(6px,.65vw,10px)!important;
  margin:clamp(4px,.6vh,8px) 0!important;
}
.monitor-pig .challenge-box *{line-height:1.1!important}
.monitor-pig .pig-note{font-size:clamp(10px,.9vw,16px)!important;line-height:1.15!important;margin:3px 0 0!important}

/* TV con altezza ridotta: recupera ancora più spazio */
@media (max-height:800px){
  .monitor-left{grid-template-rows:minmax(0,51%) minmax(0,49%)!important}
  .monitor-goal{padding:10px 14px!important}
  .monitor-step{padding:5px 3px!important}
  .monitor-ranking,.monitor-how{padding:9px 12px!important}
  .monitor-ranking-row{padding:3px 0!important}
  .monitor-pig{padding:9px 12px!important}
}
@media (max-height:650px){
  .monitor-topbar{min-height:30px!important;margin-bottom:4px!important}
  .monitor-grid{height:calc(100% - 34px)!important}
  .monitor-left{grid-template-rows:minmax(0,49%) minmax(0,51%)!important}
  .monitor-ranking .subtitle{display:none!important}
  .monitor-how{font-size:11px!important}
}
/* ========================================================== */




/* ==========================================================
   V5.45 — MONITOR: CLASSIFICA SUBITO SOTTO GLI STEP
   Più aria ai bordi, eliminazione dello spazio vuoto centrale.
   ========================================================== */
body.monitor-body{
  padding:clamp(14px,1.35vw,26px)!important;
}
.monitor-shell{
  height:calc(100vh - clamp(28px,2.7vw,52px))!important;
}
.monitor-grid{
  gap:clamp(10px,.9vw,16px)!important;
}

/* La parte alta finisce subito dopo 50/75/100/200 mila */
.monitor-left{
  grid-template-rows:auto minmax(0,1fr)!important;
  gap:clamp(10px,1vh,15px)!important;
}
.monitor-goal{
  padding:clamp(13px,1.15vw,21px)!important;
  height:auto!important;
  min-height:0!important;
}
.monitor-goal-head{
  margin-bottom:4px!important;
}
.monitor-progress{
  margin:6px 0!important;
}
.monitor-steps{
  margin-top:4px!important;
  margin-bottom:0!important;
}
.monitor-step{
  padding:clamp(6px,.65vh,9px) 4px!important;
}

/* Classifica e Come funziona salgono immediatamente sotto gli step */
.monitor-left-bottom{
  align-self:stretch!important;
  min-height:0!important;
  grid-template-columns:minmax(0,1.28fr) minmax(230px,.72fr)!important;
  gap:clamp(10px,.9vw,16px)!important;
}
.monitor-ranking,
.monitor-how{
  padding:clamp(14px,1.15vw,21px)!important;
}

/* Più aria interna, ma righe classifica compatte */
.monitor-ranking-list{
  margin-top:8px!important;
}
.monitor-ranking-row{
  padding:clamp(4px,.5vh,7px) 0!important;
}
.monitor-how p{
  margin-bottom:clamp(8px,.85vh,12px)!important;
}

/* Anche la colonna salvadanaio mantiene un margine visivo più elegante */
.monitor-pig{
  padding:clamp(14px,1.2vw,22px)!important;
}

/* Sui TV bassi mantieni comunque il blocco classifica attaccato agli step */
@media (max-height:800px){
  body.monitor-body{padding:12px 16px!important}
  .monitor-shell{height:calc(100vh - 24px)!important}
  .monitor-left{grid-template-rows:auto minmax(0,1fr)!important}
  .monitor-goal{padding:10px 14px!important}
  .monitor-left-bottom{gap:9px!important}
}
@media (max-height:650px){
  body.monitor-body{padding:9px 12px!important}
  .monitor-shell{height:calc(100vh - 18px)!important}
  .monitor-left{grid-template-rows:auto minmax(0,1fr)!important}
}
/* ========================================================== */




/* ==========================================================
   V5.46 — TV REAL LAYOUT FIX
   Override finale: più bordo esterno e classifica realmente
   attaccata agli step, senza altezza fissa del blocco superiore.
   ========================================================== */
html,body.monitor-body{
  width:100%!important;
  height:100%!important;
  overflow:hidden!important;
}
body.monitor-body{
  padding:18px 24px 22px!important;
}
.monitor-shell{
  width:100%!important;
  height:calc(100vh - 40px)!important;
  max-width:none!important;
  margin:0!important;
}
.monitor-topbar{
  margin-bottom:8px!important;
  padding:0 4px!important;
}
.monitor-grid{
  height:calc(100% - 52px)!important;
  gap:18px!important;
  align-items:stretch!important;
}
.monitor-left{
  display:flex!important;
  flex-direction:column!important;
  height:100%!important;
  gap:10px!important;
}
.monitor-goal{
  flex:0 0 auto!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  padding:14px 20px 12px!important;
}
.monitor-goal-head{margin:0 0 4px!important}
.monitor-progress{margin:6px 0!important}
.monitor-steps{margin:4px 0 0!important}
.monitor-step{padding:6px 4px!important;min-height:54px!important}

/* QUESTO è il punto principale: nessuna riga percentuale riserva spazio sotto */
.monitor-left-bottom{
  flex:1 1 auto!important;
  height:auto!important;
  min-height:0!important;
  margin-top:0!important;
  align-self:stretch!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  gap:14px!important;
}
.monitor-ranking,.monitor-how{
  height:100%!important;
  min-height:0!important;
  margin:0!important;
  padding:14px 18px!important;
}
.monitor-ranking h2,.monitor-how h2{margin:0 0 4px!important}
.monitor-ranking-list{margin-top:6px!important}
.monitor-ranking-row{padding:4px 0!important}

/* aria anche sul lato destro */
.monitor-pig{
  margin:0!important;
  padding:16px 20px!important;
  height:100%!important;
}

/* forza anche le classi originali più probabili qualora il browser abbia markup cached */
body.monitor-body .hero.monitor-goal{
  height:auto!important;
  min-height:0!important;
}
body.monitor-body .bottom-grid.monitor-left-bottom{
  margin-top:0!important;
  height:auto!important;
}

@media (max-height:800px){
  body.monitor-body{padding:14px 20px 16px!important}
  .monitor-shell{height:calc(100vh - 30px)!important}
  .monitor-grid{height:calc(100% - 45px)!important;gap:14px!important}
  .monitor-goal{padding:10px 16px 9px!important}
  .monitor-step{min-height:48px!important;padding:4px!important}
  .monitor-left-bottom{gap:10px!important}
  .monitor-ranking,.monitor-how{padding:10px 14px!important}
}



/* ==========================================================
   V5.49 — FIX SCROLL PAGINE / INSERISCI REPORT
   Le pagine operative devono poter scorrere normalmente.
   Il Monitor Incentivi resta fullscreen senza scroll.
   ========================================================== */
html:not(:has(body.monitor-body)){
  min-height:100%!important;
  height:auto!important;
  overflow-y:auto!important;
}
body:not(.monitor-body){
  min-height:100vh!important;
  height:auto!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
}
body:not(.monitor-body) main,
body:not(.monitor-body) .main-content,
body:not(.monitor-body) .content,
body:not(.monitor-body) .page-content,
body:not(.monitor-body) .app-content{
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:visible!important;
}
body:not(.monitor-body) form{
  height:auto!important;
  max-height:none!important;
  overflow:visible!important;
  padding-bottom:48px!important;
}
/* Report form: spazio finale sufficiente per pulsanti e campi inferiori */
body:not(.monitor-body) .report-form,
body:not(.monitor-body) form[action*="report"]{
  padding-bottom:72px!important;
}



/* ==========================================================
   V5.51 — FIX GLOBALE SCROLL PAGINE OPERATIVE
   ========================================================== */

/* Tutte le normali pagine applicative devono poter crescere e scorrere. */
html{
  min-height:100%;
}
html:has(body:not(.monitor-body)){
  height:auto!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
}
body:not(.monitor-body){
  position:relative!important;
  height:auto!important;
  min-height:100vh!important;
  max-height:none!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
}

/* Contenitori principali: nessun viewport fisso o overflow che intrappola la rotella. */
body:not(.monitor-body) .app,
body:not(.monitor-body) .app-shell,
body:not(.monitor-body) .layout,
body:not(.monitor-body) .shell,
body:not(.monitor-body) .page,
body:not(.monitor-body) .page-shell,
body:not(.monitor-body) .main,
body:not(.monitor-body) main,
body:not(.monitor-body) .main-content,
body:not(.monitor-body) .content,
body:not(.monitor-body) .page-content,
body:not(.monitor-body) .app-content,
body:not(.monitor-body) .dashboard-wrap,
body:not(.monitor-body) .premium-shell{
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:visible!important;
}

/* Sidebar può restare visibile, ma non deve bloccare lo scroll della pagina. */
body:not(.monitor-body) .sidebar{
  min-height:100vh!important;
}

/* Form lunghi (Report, Inserisci ordine, Dilazioni ecc.) */
body:not(.monitor-body) form,
body:not(.monitor-body) .form-page,
body:not(.monitor-body) .form-wrap,
body:not(.monitor-body) .report-form,
body:not(.monitor-body) .order-form{
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:visible!important;
}

/* margine finale per non lasciare pulsanti sotto la barra inferiore/sticky */
body:not(.monitor-body) main,
body:not(.monitor-body) .main-content,
body:not(.monitor-body) .content{
  padding-bottom:96px!important;
}

/* Il monitor incentivi resta intenzionalmente fullscreen. */
body.monitor-body{
  height:100vh!important;
  min-height:100vh!important;
  overflow:hidden!important;
}


/* V5.52 — MONITOR INCENTIVI: ripristino layout TV separato dalle pagine operative */
body.monitor-body{
  width:100vw!important;
  height:100vh!important;
  min-height:100vh!important;
  max-height:100vh!important;
  margin:0!important;
  overflow:hidden!important;
}
body.monitor-body .monitor-shell,
body.monitor-body .monitor-page,
body.monitor-body main{
  max-height:100vh;
}


/* V5.72 — Footer copyright software */
.app-copyright{margin:44px auto 0;padding:18px 20px 22px;max-width:1100px;text-align:center;border-top:1px solid rgba(148,163,184,.22);font-size:12px;line-height:1.55;opacity:.72}
.app-copyright strong,.app-copyright span,.app-copyright small{display:block}
.app-copyright strong{font-size:13px;margin-bottom:3px;opacity:1}
.app-copyright small{font-size:11px;margin-top:2px}
body.monitor-body .app-copyright{display:none!important}

/* V5.79 - selettore mese utile gestionale: allineamento pulito */
.profit-panel-head{align-items:flex-start!important}
.profit-head-actions{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap;margin-left:auto}
.profit-month-form{display:flex;flex-direction:column;gap:5px;margin:0;min-width:180px}
.profit-month-form label{font-size:11px;font-weight:800;opacity:.8;line-height:1;margin:0}
.profit-month-form input{margin:0;min-width:180px;height:42px;padding:9px 12px}
.profit-cost-btn{height:42px;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap}
@media(max-width:760px){.profit-panel-head{align-items:stretch!important}.profit-head-actions{width:100%;margin-left:0}.profit-month-form{flex:1;min-width:150px}.profit-month-form input{min-width:0}.profit-cost-btn{flex:0 0 auto}}
\n\n/* V5.81 — controlli utile mensile orizzontali + azioni spese allineate */
.profit-panel-head{align-items:center!important;gap:18px}
.profit-head-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:nowrap;margin-left:auto}
.profit-month-form{display:flex;flex-direction:row;align-items:center;gap:9px;margin:0;min-width:0}
.profit-month-form label{font-size:12px;font-weight:800;opacity:.82;line-height:1;margin:0;white-space:nowrap}
.profit-month-form input{margin:0;width:180px;min-width:180px;height:42px;padding:9px 12px}
.profit-cost-btn{height:42px;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;margin:0}
.expense-row-actions{display:flex;align-items:center;gap:8px;flex-wrap:nowrap}
.expense-delete-form{display:inline-flex;align-items:center;margin:0;padding:0}
.expense-action-btn{height:32px;min-width:72px;padding:0 10px!important;display:inline-flex!important;align-items:center;justify-content:center;line-height:1;font:inherit;font-size:12px!important;box-sizing:border-box}
@media(max-width:760px){
  .profit-panel-head{align-items:flex-start!important;flex-direction:column}
  .profit-head-actions{width:100%;margin-left:0;justify-content:flex-start;flex-wrap:wrap}
  .profit-month-form{flex:1 1 auto}
  .profit-month-form input{width:170px;min-width:0}
  .profit-cost-btn{flex:0 0 auto}
}


/* V5.155 - Campi chiari nella schermata ordine */
body.premium-ui .order-form input,
body.premium-ui .order-form select,
body.premium-ui .order-form textarea{
  background:#dcf6e8!important;
  color:#10251c!important;
  border:1px solid rgba(18,120,75,.28)!important;
}
body.premium-ui .order-form input::placeholder,
body.premium-ui .order-form textarea::placeholder{
  color:#4a5f57!important;
}
body.premium-ui .order-form input:focus,
body.premium-ui .order-form select:focus,
body.premium-ui .order-form textarea:focus{
  border-color:#11925a!important;
  box-shadow:0 0 0 3px rgba(17,146,90,.14)!important;
}
body.premium-ui .order-form option{
  background:#ecfbf2!important;
  color:#10251c!important;
}
body.premium-ui .order-form .check-card,
body.premium-ui .order-form .delegate-status,
body.premium-ui .order-form .order-mode-status{
  color:#d7ece5;
}
body.premium-ui .order-form .muted,
body.premium-ui .order-form small{
  color:#b8d2c8!important;
}
