:root{--green:#153d29;--green-2:#2b6b49;--gold:#d3a331;--bg:#edf0ec;--surface:#fff;--ink:#17231c;--muted:#65736a;--line:#d9dfda;--soft:#eaf4ed;--warning:#8a6411;--warning-bg:#fff7df;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--bg)}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink)}button,input{font:inherit}button:disabled,input:disabled,a[aria-disabled=true]{cursor:not-allowed;opacity:.58}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.eyebrow{margin:0 0 7px;color:var(--green-2);font-size:.74rem;font-weight:800;letter-spacing:.12em;text-transform:uppercase}.brand-mark{display:grid;place-items:center;width:44px;height:44px;border-radius:13px;background:var(--gold);color:var(--green);font-size:1.35rem;font-weight:900}.message{position:fixed;z-index:10;top:16px;left:50%;transform:translateX(-50%);width:min(620px,calc(100% - 32px));padding:14px 18px;border-radius:12px;background:#8d2f27;color:white;box-shadow:0 16px 45px #14251a33}
.login-shell{display:grid;grid-template-columns:minmax(320px,.9fr) minmax(440px,1.1fr);min-height:100vh}.login-brand{display:flex;flex-direction:column;justify-content:center;padding:clamp(40px,8vw,110px);background:var(--green);color:#fff}.login-brand .eyebrow{margin-top:28px;color:#b9d2c1}.login-brand h1{margin:0;font-size:clamp(2.8rem,7vw,5.2rem);line-height:.95}.login-brand p:last-child{max-width:430px;color:#c7d9cd;font-size:1.08rem;line-height:1.6}.login-panel{display:grid;place-items:center;padding:30px}.login-card{width:min(470px,100%);padding:clamp(28px,5vw,52px);border-radius:22px;background:#fff;box-shadow:0 20px 70px #163b2720}.login-card h2{margin:0 0 22px;font-size:1.85rem}.integration-warning{display:grid;gap:6px;margin-bottom:24px;padding:16px;border:1px solid #ead599;border-radius:12px;background:var(--warning-bg);color:var(--warning)}.integration-warning span{font-size:.88rem;line-height:1.45}.integration-ready{border-color:#b8d9c2;background:var(--soft);color:var(--green)}.login-card label{display:block;margin:16px 0 7px;font-size:.84rem;font-weight:750}.login-card input{width:100%;min-height:50px;padding:0 14px;border:1px solid var(--line);border-radius:10px;background:#f4f6f4}.primary-button{width:100%;min-height:52px;margin-top:22px;border:0;border-radius:11px;background:var(--green-2);color:#fff;font-weight:800}.support-copy{margin:20px 0 0;color:var(--muted);font-size:.8rem}
.pos-shell{display:grid;grid-template-columns:224px minmax(0,1fr);min-height:100vh}.sidebar{display:flex;flex-direction:column;padding:18px 12px;background:var(--green);color:#fff}.sidebar-brand{display:flex;align-items:center;gap:11px;padding:0 8px 20px;border-bottom:1px solid #ffffff1c}.sidebar-brand strong,.sidebar-brand small{display:block}.sidebar-brand small{margin-top:2px;color:#aecbb9}.sidebar-brand .brand-mark{border-radius:0;background:transparent}.sidebar nav{display:grid;gap:7px;padding:18px 0}.sidebar nav a{display:grid;grid-template-columns:36px 1fr;grid-template-rows:auto auto;align-items:center;min-height:66px;padding:9px 10px;border-radius:12px;color:#d5e6db;text-decoration:none}.sidebar nav a>span{grid-row:1/3;display:grid;place-items:center;width:34px;height:34px;font-size:20px}.sidebar nav a b{font-size:.88rem}.sidebar nav a small{margin-top:2px;color:#9fc0ac;font-size:.69rem}.sidebar nav a.active{background:var(--green-2);color:#fff}.brand-mark img{display:block;width:35px;height:35px;object-fit:contain;filter:brightness(0) invert(1)}.cash-state{display:flex;align-items:center;gap:10px;margin-top:auto;padding:12px 9px;border-radius:11px;background:#ffffff12}.cash-state i{width:9px;height:9px;border-radius:50%;background:#acb7b0}.cash-state-open i{background:#70d08f;box-shadow:0 0 0 4px #70d08f22}.cash-state b,.cash-state small,.operator b,.operator small{display:block}.cash-state small,.operator small{margin-top:2px;color:#a9c6b4;font-size:.69rem}.operator{display:flex;align-items:center;gap:9px;padding:15px 8px 2px;margin-top:8px;border-top:1px solid #ffffff1c}.operator>span:nth-child(2){min-width:0}.avatar{display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:#e5efe8;color:var(--green);font-weight:850}.logout-form{margin:0 0 0 auto}.logout-button{display:grid;place-items:center;width:38px;height:38px;border:0;border-radius:9px;background:transparent;color:#d7e7dd;font-size:1.25rem}.logout-button:hover,.logout-button:focus-visible{background:#ffffff14;color:#fff}.workspace{min-width:0}.workspace-header{display:flex;align-items:center;gap:18px;height:72px;padding:10px 20px;border-bottom:1px solid var(--line);background:#fff}.workspace-title strong,.workspace-title small,.header-cash-status strong,.header-cash-status small{display:block}.workspace-title small,.header-cash-status small{margin-top:3px;color:var(--muted);font-size:.72rem}.header-cash-status{display:flex;align-items:center;gap:9px;margin-left:10px;padding:7px 11px;border-radius:10px;background:var(--soft);color:var(--green)}.header-cash-status i{width:8px;height:8px;border-radius:50%;background:#54bd76;box-shadow:0 0 0 3px #54bd7620}.header-cash-status strong{font-size:.76rem}.header-cash-error{background:var(--warning-bg);color:var(--warning)}.header-cash-error i{background:#d3a331}.status-pill{margin-left:auto;padding:8px 11px;border-radius:999px;font-size:.75rem;font-weight:800}.status-pending{background:var(--warning-bg);color:var(--warning)}.status-online{background:var(--soft);color:var(--green)}.sale-layout{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(330px,.7fr);min-height:calc(100vh - 72px)}.catalog{padding:22px 18px}.section-heading h1{margin:0 0 18px;font-size:1.9rem}.search-box{display:flex;gap:9px}.search-box input{width:100%;min-height:58px;padding:0 16px;border:2px solid var(--green-2);border-radius:13px;background:#fff}.search-box button{min-width:112px;border:0;border-radius:12px;background:var(--gold);color:var(--green);font-weight:850}.empty-state,.empty-cart{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:var(--muted)}.empty-state{min-height:350px}.empty-state>span,.empty-cart>span{font-size:2rem;color:var(--green-2)}.empty-state strong,.empty-cart strong{margin-top:10px;color:var(--ink)}.empty-state p{max-width:440px;line-height:1.55}.cart{display:flex;flex-direction:column;padding:22px;border-left:1px solid var(--line);background:#fff}.cart-title{display:flex;align-items:center;justify-content:space-between}.cart-title h2{margin:0}.cart-title span{padding:6px 9px;border-radius:999px;background:var(--soft);color:var(--green);font-size:.75rem;font-weight:800}.customer-button{display:flex;justify-content:space-between;min-height:50px;margin:18px 0;border:0;border-radius:11px;background:var(--soft);padding:0 14px;color:var(--green);font-weight:750}.empty-cart{min-height:230px;border-block:1px solid var(--line)}.empty-cart small{margin-top:5px}.totals{display:flex;align-items:end;justify-content:space-between;margin-top:auto;padding:24px 0 18px}.totals span{color:var(--muted)}.totals strong{font-size:1.8rem}.payment-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.payment-actions button{min-height:62px;border:1px solid var(--green-2);border-radius:12px;background:#fff;color:var(--green);font-weight:850}.payment-actions button:last-child{background:var(--green-2);color:#fff}.cash-opening-shell{display:grid;place-items:center;min-height:calc(100vh - 72px);padding:28px}.cash-opening-card{width:min(620px,100%);padding:clamp(28px,5vw,52px);border-radius:22px;background:#fff;box-shadow:0 20px 70px #163b2717}.cash-opening-card h1{margin:0 0 14px;font-size:clamp(1.9rem,4vw,2.7rem)}.cash-opening-card>p{color:var(--muted);line-height:1.55}.cash-opening-card code{padding:2px 6px;border-radius:5px;background:#f0f3f0;color:var(--green)}.cash-opening-form{margin-top:28px}.cash-opening-form label{display:block;margin-bottom:8px;font-weight:800}.cash-opening-form input{width:100%;min-height:64px;padding:0 16px;border:2px solid var(--green-2);border-radius:12px;background:#fff;font-size:1.35rem}.cash-opening-form small{display:block;margin-top:8px;color:var(--muted)}.cash-notice{margin-top:24px;padding:14px;border-radius:11px;background:var(--soft);color:var(--green);font-size:.84rem;line-height:1.45}.cash-notice-error{background:var(--warning-bg);color:var(--warning)}
@media(max-width:900px){.pos-shell{grid-template-columns:84px minmax(0,1fr)}.sidebar-brand{justify-content:center}.sidebar-brand>span:last-child,.sidebar nav a b,.sidebar nav a small,.cash-state span,.operator>span:nth-child(2),.logout-form{display:none}.sidebar nav a{grid-template-columns:1fr}.sidebar nav a>span{grid-row:auto;margin:auto}.cash-state,.operator{justify-content:center}.sale-layout{grid-template-columns:1fr}.cart{border-top:1px solid var(--line);border-left:0}.login-shell{grid-template-columns:1fr}.login-brand{min-height:280px;padding:40px}.login-brand h1{font-size:3.3rem}}@media(max-width:600px){.workspace-header div small{display:none}.sale-layout{display:block}.catalog,.cart{padding:18px 14px}.search-box{align-items:stretch;flex-direction:column}.search-box button{min-height:52px}.login-panel{padding:18px}.login-card{padding:26px}.pos-shell{grid-template-columns:68px minmax(0,1fr)}.sidebar{padding-inline:7px}}
.product-results{display:grid;gap:10px;margin-top:18px}.product-card{display:grid;grid-template-columns:72px minmax(0,1fr) auto;align-items:center;gap:14px;min-height:104px;padding:13px;border:0;border-radius:14px;background:#fff;box-shadow:0 3px 12px #173e2914}.product-mark{position:relative;display:grid;place-items:center;width:72px;height:72px;overflow:hidden;border-radius:11px;background:var(--soft);color:var(--green);font-weight:900}.product-mark img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:#fff}.product-copy{display:grid;gap:3px;min-width:0}.product-copy>strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.95rem}.product-copy>small{overflow:hidden;color:var(--muted);font-size:.72rem;text-overflow:ellipsis;white-space:nowrap}.inventory-summary{display:flex;align-items:center;gap:6px;margin-top:5px;overflow:hidden;white-space:nowrap}.inventory-summary b,.inventory-summary small{padding:3px 7px;border-radius:999px;background:var(--soft);color:var(--green);font-size:.65rem}.inventory-summary small{overflow:hidden;max-width:170px;text-overflow:ellipsis}.inventory-summary .inventory-unconfigured{background:var(--warning-bg);color:var(--warning)}.product-action{display:grid;gap:8px;justify-items:end}.product-action form{margin:0}.product-action button{min-height:42px;padding:0 16px;border:0;border-radius:10px;background:var(--green-2);color:#fff;font-weight:800}.cart-lines{display:grid;max-height:48vh;overflow:auto;border-bottom:1px solid var(--line)}.cart-line{display:grid;grid-template-columns:minmax(0,1fr) auto auto 34px;align-items:center;gap:10px;padding:14px 0;border-bottom:1px solid var(--line)}.cart-line:last-child{border-bottom:0}.cart-line-copy{display:grid;gap:4px;min-width:0}.cart-line-copy>strong{overflow:hidden;text-overflow:ellipsis}.cart-line-copy>button{justify-self:start;padding:0;border:0;background:transparent;color:var(--muted);font-size:.76rem}.quantity-control{display:flex;align-items:center;gap:7px}.quantity-step-form{margin:0}.quantity-step-form button,.remove-line{display:grid;place-items:center;width:34px;height:34px;padding:0;border:1px solid #ccd5ce;border-radius:9px;background:#fff;color:var(--ink);font-weight:800;text-decoration:none}.line-total{white-space:nowrap}.remove-line{border:0;color:#8d2f27;font-size:1.25rem}.cart form{margin-bottom:0}@media(max-width:600px){.product-card{grid-template-columns:58px minmax(0,1fr)}.product-mark{width:58px;height:58px}.product-action{grid-column:1/3;grid-template-columns:1fr auto;align-items:center;justify-items:stretch}.product-action form{justify-self:end}.inventory-summary{flex-wrap:wrap;white-space:normal}.cart-line{grid-template-columns:minmax(0,1fr) auto 34px}.line-total{grid-column:1/2}.header-cash-status small{display:none}}
.catalog-disclaimer{margin:9px 2px 0;color:var(--muted);font-size:.72rem;line-height:1.4}
.remove-line-form{margin:0}.cart-async-status.is-error{position:static;width:auto;height:auto;margin:0 0 10px;padding:8px 10px;overflow:visible;clip:auto;white-space:normal;border-radius:8px;background:#faecea;color:#8d2f27;font-size:.76rem;font-weight:700}.js-cart-form[aria-busy=true]{opacity:.62}.product-results,.cart-lines{scrollbar-color:#a9b9ad transparent;scrollbar-width:thin}
@media(min-width:901px){html,body{height:100%;overflow:hidden}.pos-shell{height:100dvh;min-height:0;overflow:hidden}.sidebar{height:100%;min-height:0;overflow:hidden}.workspace{display:grid;grid-template-rows:72px minmax(0,1fr);height:100%;min-height:0;overflow:hidden}.sale-layout{height:100%;min-height:0;overflow:hidden}.catalog{display:grid;grid-template-rows:auto auto auto minmax(0,1fr);min-height:0;overflow:hidden}.catalog>.eyebrow{margin-bottom:7px}.catalog>.product-results,.catalog>.empty-state{grid-row:4}.product-results{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding-right:6px;padding-bottom:18px}.catalog>.empty-state{height:100%;min-height:0}.cart{height:100%;min-height:0;overflow:hidden}.cart-lines{flex:1;min-height:0;max-height:none;overflow-y:auto;overscroll-behavior:contain;padding-right:5px}.empty-cart{flex:1;min-height:0}}
.product-results{align-content:start}.cart-lines{grid-auto-rows:max-content;align-content:start}.cart-line{grid-template-columns:minmax(0,1fr) auto 34px;grid-template-rows:auto auto;align-content:start}.cart-line-copy{grid-column:1;grid-row:1/3}.quantity-control{grid-column:2;grid-row:1;justify-self:end}.line-total{grid-column:2;grid-row:2;justify-self:end;font-size:1.15rem;font-weight:850;line-height:1.1}.remove-line-form{grid-column:3;grid-row:1/3;align-self:center}

/* Login: card unica, ispirata alla composizione approvata del Planner. */
.login-shell{display:grid;grid-template-columns:1fr;min-height:100dvh;padding:clamp(24px,5vw,72px);place-items:center;background:#f5f7f4}
.login-frame{position:relative;display:grid;grid-template-columns:1fr 1fr;width:min(820px,100%);min-height:480px;overflow:visible;border:1px solid var(--line);border-radius:22px;background:#fff;box-shadow:0 24px 70px #153d2917}
.login-brand{display:flex;min-width:0;min-height:480px;padding:clamp(42px,5vw,68px);flex-direction:column;justify-content:center;border-radius:21px 0 0 21px;background:var(--green);color:#fff}
.login-brand .eyebrow{margin:0 0 8px;color:#bcd3c4}
.login-brand h1{margin:0;font-size:3.75rem;line-height:.95;letter-spacing:-.045em}
.login-brand>p:last-of-type{max-width:285px;margin:25px 0 8px;color:#d2e0d7;font-size:.98rem;line-height:1.55}
.login-brand>small{color:#91b19e;font-size:.72rem}
.login-seal{position:absolute;z-index:2;top:50%;left:50%;display:grid;width:88px;height:88px;padding:10px;overflow:hidden;place-items:center;border:1px solid #cbd4ce;border-radius:50%;transform:translate(-50%,-50%);background:#fff;box-shadow:0 10px 28px #102c1d2b}
.login-seal img{display:block;width:100%;height:100%;border-radius:8px;object-fit:contain}
.login-panel{display:grid;min-width:0;padding:42px 48px 42px 58px;place-items:center;background:#fff;border-radius:0 21px 21px 0}
.login-card{width:100%;max-width:330px;padding:0;border-radius:0;background:transparent;box-shadow:none}
.login-card .eyebrow{margin:0 0 7px}
.login-card h2{margin:0 0 18px;font-size:1.8rem;letter-spacing:-.025em}
.login-card .integration-warning{gap:3px;margin-bottom:17px;padding:11px 13px;border-radius:9px}
.login-card .integration-warning strong{font-size:.78rem}
.login-card .integration-warning span{font-size:.69rem;line-height:1.35}
.login-card label{margin:12px 0 6px;font-size:.74rem}
.login-card input{min-height:46px;border-radius:7px;background:#f6f8f6}
.login-card .primary-button{min-height:48px;margin-top:16px;border-radius:7px}
.login-card .support-copy{margin-top:14px;font-size:.68rem;line-height:1.4}
.customer-button{align-items:center}.operator{margin-top:auto}.header-cash-status{margin-left:auto}
@media(max-width:780px){.login-shell{padding:20px}.login-frame{grid-template-columns:1fr;width:min(520px,100%)}.login-brand{min-height:250px;padding:42px 36px 56px;border-radius:21px 21px 0 0}.login-brand h1{font-size:3.5rem}.login-brand>p:last-of-type{margin-top:18px}.login-seal{top:250px;left:50%;width:80px;height:80px;padding:9px}.login-panel{padding:58px 34px 38px;border-radius:0 0 21px 21px}.login-card{max-width:360px}}
@media(max-width:420px){.login-shell{padding:0;background:#fff}.login-frame{min-height:100dvh;border:0;border-radius:0;box-shadow:none}.login-brand{min-height:225px;padding:34px 25px 50px;border-radius:0}.login-brand h1{font-size:3rem}.login-brand>small{display:none}.login-seal{top:225px}.login-panel{padding:55px 24px 32px;border-radius:0}}
.line-unit-price span{display:inline-block;margin-left:4px;padding:2px 5px;border-radius:999px;background:var(--warning-bg);color:var(--warning);font-size:.58rem;font-weight:800;text-transform:uppercase}.line-price-editor{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:6px;margin-top:5px}.line-price-editor[hidden]{display:none}.price-input-wrap{display:flex;align-items:center;min-height:38px;padding:0 8px;border:2px solid var(--green-2);border-radius:8px;background:#fff;color:var(--green);font-weight:800}.price-input-wrap input{width:100%;min-width:0;padding:0 0 0 5px;border:0;outline:0;background:transparent;color:var(--ink);font-weight:750}.line-price-editor>button{min-height:38px;padding:0 9px;border:1px solid var(--green-2);border-radius:8px;background:var(--green-2);color:#fff;font-size:.7rem;font-weight:800}.line-price-editor>.price-editor-cancel{border-color:var(--line);background:#fff;color:var(--muted)}.line-price-editor>small{grid-column:1/-1;color:var(--muted);font-size:.65rem}.cart-line.is-editing-price .cart-line-copy{grid-column:1/4}.cart-line.is-editing-price .quantity-control,.cart-line.is-editing-price .line-total,.cart-line.is-editing-price .remove-line-form{display:none}
.discount-dialog-open{align-self:flex-end;margin-top:10px;padding:0;border:0;background:transparent;color:var(--green-2);font-size:.74rem;font-weight:800;text-decoration:underline}.discount-dialog{width:min(410px,calc(100% - 28px));padding:0;border:0;border-radius:17px;background:#fff;color:var(--ink);box-shadow:0 24px 80px #102a1c55}.discount-dialog::backdrop{background:#102a1c88;backdrop-filter:blur(2px)}.discount-dialog-card{padding:24px}.discount-dialog-header{display:flex;align-items:start;justify-content:space-between;gap:18px}.discount-dialog-header h3{margin:0;font-size:1.35rem}.discount-dialog-close{display:grid;place-items:center;width:34px;height:34px;padding:0;border:0;border-radius:8px;background:var(--soft);color:var(--green);font-size:1.35rem}.discount-dialog-status.is-error{position:static;width:auto;height:auto;margin:14px 0 0;padding:9px 11px;overflow:visible;clip:auto;white-space:normal;border-radius:8px;background:#faecea;color:#8d2f27;font-size:.72rem;font-weight:700}.cart-discount-form{display:grid;gap:7px;margin:20px 0 0}.cart-discount-form label{margin-top:5px;color:var(--muted);font-size:.74rem;font-weight:800}.cart-discount-form select,.cart-discount-form input{width:100%;height:46px;padding:0 11px;border:1px solid #ccd5ce;border-radius:9px;background:#fff;color:var(--ink)}.discount-dialog-actions{display:grid;grid-template-columns:1fr 1.3fr;gap:8px;margin-top:14px}.discount-dialog-actions button{min-height:44px;border:1px solid var(--green-2);border-radius:9px;background:#fff;color:var(--green);font-weight:800}.discount-dialog-actions button:last-child{background:var(--green-2);color:#fff}.discount-summary{display:grid;grid-template-columns:1fr auto;gap:4px 12px;margin-top:7px;padding:9px 0;border-block:1px solid var(--line);font-size:.72rem}.discount-summary span{display:flex;grid-column:1/-1;justify-content:space-between;color:var(--muted)}.discount-summary span b{color:var(--ink)}.discount-summary form{grid-column:1/-1;justify-self:end;margin:0}.discount-remove{padding:0;border:0;background:transparent;color:#8d2f27;font-size:.68rem;text-decoration:underline}.discount-summary+.totals{padding-top:14px}
.payment-dialog{width:min(440px,calc(100% - 28px));padding:0;border:0;border-radius:17px;background:#fff;color:var(--ink);box-shadow:0 24px 80px #102a1c55}.payment-dialog::backdrop{background:#102a1c88;backdrop-filter:blur(2px)}.payment-dialog-card{padding:24px}.payment-dialog-header{display:flex;align-items:start;justify-content:space-between;gap:18px}.payment-dialog-header h3{margin:0;font-size:1.35rem}.payment-dialog-header>button{display:grid;place-items:center;width:34px;height:34px;padding:0;border:0;border-radius:8px;background:var(--soft);color:var(--green);font-size:1.35rem}.checkout-form{display:grid;gap:14px;margin-top:20px}.payment-total{display:flex;align-items:end;justify-content:space-between;padding:15px;border-radius:11px;background:var(--soft);color:var(--muted)}.payment-total strong{color:var(--ink);font-size:1.55rem}.payment-dialog-copy{margin:0;color:var(--muted);font-size:.84rem;line-height:1.45}.payment-confirmation{display:grid;grid-template-columns:auto 1fr;align-items:start;gap:10px;padding:13px;border:1px solid #cbd6ce;border-radius:10px;font-size:.82rem;line-height:1.4}.payment-confirmation input{width:20px;height:20px;margin:0;accent-color:var(--green-2)}.payment-dialog-actions{display:grid;grid-template-columns:1fr 1.45fr;gap:8px}.payment-dialog-actions button{min-height:48px;border:1px solid var(--green-2);border-radius:9px;background:#fff;color:var(--green);font-weight:800}.payment-dialog-actions button:last-child{background:var(--green-2);color:#fff}.checkout-form[aria-busy=true]{opacity:.65}
.checkout-outcome-workspace{display:grid;grid-template-rows:72px minmax(0,1fr);min-height:100vh}.checkout-outcome-shell{display:grid;min-height:0;padding:28px;place-items:center}.checkout-outcome-card{width:min(610px,100%);padding:clamp(28px,5vw,48px);border-radius:22px;background:#fff;box-shadow:0 20px 70px #163b2717;text-align:center}.checkout-success-mark{display:grid;width:58px;height:58px;margin:0 auto 18px;place-items:center;border-radius:50%;background:var(--soft);color:var(--green-2);font-size:1.8rem;font-weight:900}.checkout-outcome-card h1{margin:0;font-size:clamp(2.5rem,6vw,4rem);letter-spacing:-.04em}.checkout-reference{margin:8px 0 26px;color:var(--muted)}.fiscal-checklist{display:grid;gap:10px;text-align:left}.fiscal-checklist>div{display:grid;grid-template-columns:34px 1fr;gap:11px;padding:14px;border:1px solid var(--line);border-radius:11px}.fiscal-checklist>div>span{display:grid;width:34px;height:34px;place-items:center;border-radius:50%;background:var(--warning-bg);color:var(--warning);font-weight:850}.fiscal-checklist p{display:grid;gap:3px;margin:0}.fiscal-checklist small{color:var(--muted);line-height:1.4}.integration-note{margin:18px 0;color:var(--muted);font-size:.78rem;line-height:1.5}.outcome-primary-action{display:grid;min-height:52px;place-items:center;border-radius:10px;background:var(--green-2);color:#fff;font-weight:850;text-decoration:none}@media(max-width:600px){.checkout-outcome-shell{padding:14px}.checkout-outcome-card{padding:24px 18px}.status-pill{font-size:.68rem}}
.checkout-outcome-workspace{display:grid;grid-template-rows:72px minmax(0,1fr);min-height:100vh}.checkout-outcome-shell{display:grid;min-height:0;padding:28px;place-items:center}.checkout-outcome-card{width:min(610px,100%);padding:clamp(28px,5vw,48px);border-radius:22px;background:#fff;box-shadow:0 20px 70px #163b2717;text-align:center}.checkout-success-mark{display:grid;width:58px;height:58px;margin:0 auto 18px;place-items:center;border-radius:50%;background:var(--soft);color:var(--green-2);font-size:1.8rem;font-weight:900}.checkout-outcome-card h1{margin:0;font-size:clamp(2.5rem,6vw,4rem);letter-spacing:-.04em}.checkout-reference{margin:8px 0 4px;color:var(--muted)}.checkout-customer{margin:0 0 26px;color:var(--green);font-size:.78rem;font-weight:800}.fiscal-checklist{display:grid;gap:10px;text-align:left}.fiscal-checklist>div{display:grid;grid-template-columns:34px 1fr;gap:11px;padding:14px;border:1px solid var(--line);border-radius:11px}.fiscal-checklist>div>span{display:grid;width:34px;height:34px;place-items:center;border-radius:50%;background:var(--warning-bg);color:var(--warning);font-weight:850}.fiscal-checklist p{display:grid;gap:3px;margin:0}.fiscal-checklist small{color:var(--muted);line-height:1.4}.integration-note{margin:18px 0;color:var(--muted);font-size:.78rem;line-height:1.5}.outcome-primary-action{display:grid;min-height:52px;place-items:center;border-radius:10px;background:var(--green-2);color:#fff;font-weight:850;text-decoration:none}@media(max-width:600px){.checkout-outcome-shell{padding:14px}.checkout-outcome-card{padding:24px 18px}.status-pill{font-size:.68rem}}
.cash-tender{display:grid;grid-template-columns:1fr auto;align-items:center;gap:7px 12px}.cash-tender[hidden]{display:none}.cash-tender>label{grid-column:1/-1;color:var(--muted);font-size:.74rem;font-weight:800}.cash-received-input{display:flex;align-items:center;min-height:48px;padding:0 12px;border:2px solid var(--green-2);border-radius:9px;color:var(--green);font-weight:850}.cash-received-input input{width:100%;min-width:0;padding:0 0 0 6px;border:0;outline:0;background:transparent;font-weight:800}.cash-change{display:grid;min-width:132px;justify-items:end}.cash-change span{color:var(--muted);font-size:.68rem}.cash-change strong{font-size:1.25rem}.cash-tender>small{grid-column:1/-1;min-height:1em;color:#8d2f27;font-size:.7rem;font-weight:750}
.customer-button{text-decoration:none;align-items:center}.selected-customer{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:9px;min-height:58px;margin:18px 0;padding:9px 11px;border-radius:11px;background:var(--soft)}.selected-customer span,.selected-customer strong,.selected-customer small{display:block;min-width:0}.selected-customer strong,.selected-customer small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.selected-customer small{margin-top:3px;color:var(--muted);font-size:.68rem}.selected-customer>a{color:var(--green-2);font-size:.7rem;font-weight:800}.selected-customer form{margin:0}.selected-customer button{width:30px;height:30px;padding:0;border:0;background:transparent;color:#8d2f27;font-size:1.15rem}
.history-workspace,.customer-workspace{display:grid;grid-template-rows:72px minmax(0,1fr);min-height:100vh}.history-shell,.sale-detail-shell{min-height:0;padding:24px;overflow:auto}.history-heading{display:flex;align-items:end;justify-content:space-between;gap:20px}.history-heading h1,.customer-search-panel h1,.customer-create-card h2{margin:0;font-size:1.8rem}.history-heading>a,.outcome-primary-action{padding:11px 15px;border-radius:9px;background:var(--green-2);color:#fff;font-weight:800;text-decoration:none}.history-search{display:flex;gap:9px;margin:20px 0}.history-search input{width:100%;min-height:50px;padding:0 14px;border:1px solid #cbd4ce;border-radius:10px;background:#fff}.history-search button{min-width:105px;border:0;border-radius:9px;background:var(--gold);color:var(--green);font-weight:850}.sales-table-wrap{overflow:auto;border:1px solid var(--line);border-radius:14px;background:#fff}.sales-table{width:100%;border-collapse:collapse}.sales-table th,.sales-table td{padding:13px 14px;border-bottom:1px solid var(--line);text-align:left;vertical-align:middle}.sales-table th{color:var(--muted);font-size:.68rem;letter-spacing:.06em;text-transform:uppercase}.sales-table td{font-size:.8rem}.sales-table td:first-child strong,.sales-table td:first-child small,.sales-table td:first-child em,.sales-table td:nth-child(2) strong,.sales-table td:nth-child(2) small{display:block}.sales-table small{margin-top:3px;color:var(--muted);font-size:.67rem}.sales-table em{margin-top:4px;color:var(--green-2);font-size:.6rem;font-style:normal;text-transform:uppercase}.sales-table td:last-child a{color:var(--green-2);font-weight:800}.fiscal-badge{display:inline-flex;padding:5px 8px;border-radius:999px;background:var(--soft);color:var(--green);font-size:.66rem;font-weight:800}.fiscal-pending{background:var(--warning-bg);color:var(--warning)}.fiscal-failed,.fiscal-error{background:#faecea;color:#8d2f27}.history-pagination{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;margin-top:16px}.history-pagination a{color:var(--green-2);font-weight:800}.history-pagination a:last-child{justify-self:end}.history-pagination span{color:var(--muted);font-size:.75rem}.history-empty,.history-muted{padding:32px;color:var(--muted);text-align:center}.sale-detail-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.sale-detail-heading>a{color:var(--green-2);font-weight:800}.sale-detail-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.sale-detail-summary>div{display:grid;gap:4px;padding:16px;border-radius:12px;background:#fff}.sale-detail-summary small{color:var(--muted);font-size:.7rem}.sale-lines-card{margin-top:14px;padding:18px;border-radius:14px;background:#fff}.sale-lines-card h2{margin:0 0 10px}.history-line{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:18px;padding:13px 0;border-bottom:1px solid var(--line)}.history-line div{display:grid;gap:3px}.history-line small{color:var(--muted)}.sale-detail-totals{display:grid;gap:6px;width:min(330px,100%);margin:18px 0 0 auto}.sale-detail-totals span,.sale-detail-totals>strong{display:flex;justify-content:space-between}.sale-detail-totals>strong{padding-top:9px;border-top:1px solid var(--line);font-size:1.1rem}
.customer-shell{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(310px,.65fr);gap:18px;min-height:0;padding:24px;overflow:auto}.customer-search-panel,.customer-create-card{padding:22px;border-radius:16px;background:#fff}.customer-results{display:grid;gap:8px}.customer-result{display:grid;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:11px;padding:11px;border:1px solid var(--line);border-radius:11px}.customer-result.is-selected{border-color:var(--green-2);background:var(--soft)}.customer-result div{display:grid;gap:3px;min-width:0}.customer-result div strong,.customer-result div small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.customer-result div small{color:var(--muted);font-size:.7rem}.customer-result form{margin:0}.customer-result button{min-height:38px;padding:0 12px;border:1px solid var(--green-2);border-radius:8px;background:var(--green-2);color:#fff;font-weight:800}.customer-create-card>p{color:var(--muted);font-size:.82rem;line-height:1.45}.customer-create-form{display:grid;gap:6px;margin-top:18px}.customer-create-form label{margin-top:7px;color:var(--muted);font-size:.72rem;font-weight:800}.customer-create-form label small{font-weight:500}.customer-create-form input{min-height:46px;padding:0 12px;border:1px solid #cbd4ce;border-radius:9px}.customer-create-form>button{min-height:48px;margin-top:10px;border:0;border-radius:9px;background:var(--green-2);color:#fff;font-weight:850}.customer-privacy-note{margin-top:8px;color:var(--muted);font-size:.66rem;line-height:1.4}@media(max-width:950px){.customer-shell{grid-template-columns:1fr}.sale-detail-summary{grid-template-columns:1fr 1fr}}@media(max-width:650px){.history-shell,.sale-detail-shell,.customer-shell{padding:14px}.history-heading{align-items:start;flex-direction:column}.sales-table th:nth-child(3),.sales-table td:nth-child(3),.sales-table th:nth-child(4),.sales-table td:nth-child(4){display:none}.sale-detail-summary{grid-template-columns:1fr}.history-line{grid-template-columns:1fr auto}.history-line>span{grid-row:2}.customer-search-panel,.customer-create-card{padding:16px}.customer-result{grid-template-columns:38px minmax(0,1fr)}.customer-result form{grid-column:2}.history-search{align-items:stretch;flex-direction:column}.history-search button{min-height:46px}}

/* Sales/customer consolidation: responsive filters, recovery states and touch targets. */
.history-search{display:grid;grid-template-columns:minmax(0,1fr) auto}.history-search>input{width:100%}.history-filters{grid-column:1/-1;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#fff}.history-filters summary{cursor:pointer;color:var(--green);font-weight:800}.history-filter-grid{display:grid;grid-template-columns:repeat(5,minmax(120px,1fr)) auto;align-items:end;gap:10px;margin-top:12px}.history-filter-grid label{display:grid;gap:5px;color:var(--muted);font-size:.7rem;font-weight:800}.history-filter-grid input,.history-filter-grid select{width:100%;min-height:42px;padding:0 9px;border:1px solid #cbd4ce;border-radius:8px;background:#fff;color:var(--ink)}.history-filter-grid>a{display:grid;min-height:42px;place-items:center;color:var(--green-2);font-size:.75rem;font-weight:800}.history-error{padding:22px;border:1px solid #e4bd7a;border-radius:14px;background:var(--warning-bg);color:var(--warning)}.history-error p{margin:7px 0 13px;line-height:1.5}.history-error a,.sales-table td:last-child a,.history-pagination a,.sale-detail-heading>a{display:inline-flex;min-height:44px;align-items:center}.history-error a{margin-right:12px;color:inherit;font-weight:800}.customer-result button{min-height:44px}
@media(max-width:1100px){.history-filter-grid{grid-template-columns:repeat(3,minmax(140px,1fr))}}
@media(max-width:650px){.sales-table th:nth-child(3),.sales-table td:nth-child(3),.sales-table th:nth-child(4),.sales-table td:nth-child(4){display:revert}.sales-table-wrap{overflow:visible;border:0;background:transparent}.sales-table,.sales-table tbody,.sales-table tr,.sales-table td{display:block}.sales-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.sales-table tr{margin-bottom:12px;padding:9px 12px;border:1px solid var(--line);border-radius:12px;background:#fff}.sales-table td{display:grid;grid-template-columns:minmax(92px,.42fr) minmax(0,1fr);min-height:42px;padding:8px 0;border-bottom:1px solid var(--line)}.sales-table td:last-child{border:0}.sales-table td::before{content:attr(data-label);color:var(--muted);font-size:.66rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase}.sales-table td[data-label=""]::before{display:none}.history-search{display:grid;grid-template-columns:1fr}.history-search>button,.history-filters{grid-column:1}.history-filter-grid{grid-template-columns:1fr 1fr}.history-filter-grid>a{grid-column:1/-1}}

/* The customer flow follows the same main-content/right-sidebar composition as the sale screen. */
.customer-sale-layout{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(330px,.7fr);min-height:calc(100vh - 72px)}.customer-catalog{min-width:0;padding:22px 18px;overflow:auto}.customer-catalog h1,.customer-create-sidebar h2{margin:0;font-size:1.8rem}.customer-search-box{margin:18px 0}.customer-search-box input{border-color:var(--green-2)}.customer-create-sidebar{min-width:0;padding:22px;border-left:1px solid var(--line);background:#fff}.customer-create-sidebar>p{color:var(--muted);font-size:.82rem;line-height:1.45}.customer-create-sidebar .eyebrow{color:var(--green-2);font-weight:800}.customer-results{padding-bottom:22px}.customer-result{background:#fff}.customer-create-sidebar .customer-create-form{margin-top:18px}@media(max-width:950px){.customer-sale-layout{grid-template-columns:1fr;min-height:0}.customer-create-sidebar{border-top:1px solid var(--line);border-left:0}.customer-catalog{overflow:visible}}@media(max-width:650px){.customer-catalog,.customer-create-sidebar{padding:16px}.customer-search-box{display:flex;flex-direction:column;align-items:stretch}.customer-search-box button{min-height:46px}}
.fiscal-confirmation-card{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:14px;padding:18px;border:1px solid #e4bd7a;border-radius:14px;background:var(--warning-bg)}.fiscal-confirmation-card h2{margin:2px 0 5px;font-size:1.05rem}.fiscal-confirmation-card p:not(.eyebrow){margin:0;color:#6e5620;font-size:.78rem;line-height:1.45}.fiscal-confirmation-card form{margin:0;flex:0 0 auto}.fiscal-confirmation-card button{min-height:48px;padding:0 16px;border:0;border-radius:9px;background:var(--green-2);color:#fff;font-weight:850}.fiscal-confirmed-note{margin:14px 0 0;padding:11px 13px;border-radius:10px;background:var(--soft);color:var(--green);font-size:.78rem;font-weight:800}@media(max-width:650px){.fiscal-confirmation-card{align-items:stretch;flex-direction:column}.fiscal-confirmation-card form,.fiscal-confirmation-card button{width:100%}}
.fiscal-confirmation-form{margin:0 0 10px}.fiscal-confirmation-form button{width:100%;min-height:52px;border:0;border-radius:10px;background:var(--green-2);color:#fff;font-weight:850}

/* Storico vendite: stessa gerarchia lineare di catalogo e anagrafiche clienti. */
.history-shell{padding:22px 18px}.history-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px}.history-toolbar .eyebrow{margin:0}.history-toolbar>a{display:grid;min-height:40px;place-items:center;padding:8px 15px;border-radius:9px;background:var(--green-2);color:#fff;font-weight:800;text-decoration:none}.history-search{margin:18px 0}.history-search>input{min-height:58px;padding:0 16px;border:2px solid var(--green-2);border-radius:13px}.history-search>button{min-width:112px;min-height:58px;border-radius:12px}@media(max-width:650px){.history-shell{padding:16px}.history-toolbar{align-items:stretch;flex-direction:column}.history-toolbar>a{min-height:52px}.history-search>button{min-height:52px}}
.history-toolbar>a.history-new-sale-link{display:inline-flex;min-height:0;padding:0;align-items:center;border-radius:0;background:transparent;color:var(--green-2);font-size:.8rem;font-weight:800;text-decoration:underline;text-underline-offset:3px}@media(max-width:650px){.history-toolbar>a.history-new-sale-link{align-self:flex-start;min-height:0}}
.cash-closing-summary{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:24px 0}.cash-closing-summary div{display:grid;gap:4px;padding:14px;border-radius:11px;background:var(--soft)}.cash-closing-summary dt{color:var(--muted);font-size:.7rem;font-weight:800}.cash-closing-summary dd{margin:0;color:var(--green);font-size:1.2rem;font-weight:850}.cash-closing-confirmation{display:flex!important;align-items:flex-start;gap:9px;margin-top:18px!important;color:var(--ink)!important;font-size:.8rem!important}.cash-closing-confirmation input{width:18px;height:18px;min-height:18px;margin:0;accent-color:var(--green-2)}@media(max-width:600px){.cash-closing-summary{grid-template-columns:1fr}}
.discount-dialog textarea{width:100%;min-height:64px;padding:10px 12px;border:1px solid #cbd4ce;border-radius:9px;background:#fff;resize:vertical}.discount-dialog label small,.discount-reason-help,.discount-summary-reason{color:var(--muted);font-size:.7rem;font-weight:500}.discount-reason-help{display:block;margin-top:5px}.discount-summary-reason{grid-column:1/-1;display:block;margin-top:-3px}
.sale-detail-actions{display:flex;align-items:center;gap:12px}.sale-detail-actions>a{display:inline-flex;min-height:44px;align-items:center;color:var(--green-2);font-size:.78rem;font-weight:850}.receipt-copy-page{min-height:100vh;padding:28px;background:#e6ebe7}.receipt-copy{width:min(760px,100%);margin:0 auto}.receipt-copy-controls{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:18px}.receipt-copy-controls a{color:var(--green-2);font-size:.82rem;font-weight:850}.receipt-copy-controls button{min-height:46px;padding:0 16px;border:0;border-radius:9px;background:var(--green-2);color:#fff;font-weight:850}.receipt-copy-paper,.receipt-copy-unavailable{padding:clamp(24px,5vw,52px);background:#fff;box-shadow:0 16px 48px #173e2918}.receipt-copy-header{display:flex;align-items:center;gap:12px;padding-bottom:20px;border-bottom:2px solid var(--green)}.receipt-copy-header img{width:44px;height:44px;object-fit:contain}.receipt-copy-header strong,.receipt-copy-header span{display:block}.receipt-copy-header strong{color:var(--green);font-size:1.1rem}.receipt-copy-header span{margin-top:2px;color:var(--muted);font-size:.78rem}.receipt-copy-notice{display:grid;gap:3px;margin:20px 0;padding:12px 14px;border-left:4px solid var(--gold);background:var(--warning-bg);color:#6e5620;font-size:.78rem;line-height:1.4}.receipt-copy-reference{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 20px;padding:18px 0;border-bottom:1px solid var(--line)}.receipt-copy-reference-gift{grid-template-columns:1fr 1fr}.receipt-copy-reference div{display:grid;gap:3px}.receipt-copy-reference span{color:var(--muted);font-size:.68rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase}.receipt-copy-reference strong{font-size:.88rem}.receipt-copy-lines h1,.receipt-copy-paper>h1{margin:24px 0 4px;font-size:1.45rem}.receipt-copy-lines h2{margin:0 0 7px;color:var(--muted);font-size:.78rem;text-transform:uppercase}.receipt-copy-lines article{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:16px;align-items:center;padding:13px 0;border-bottom:1px solid var(--line);font-size:.86rem}.receipt-copy-lines article div{display:grid;gap:3px}.receipt-copy-lines article small{color:var(--muted);font-size:.7rem}.receipt-copy-lines article>span{white-space:nowrap;color:var(--muted)}.receipt-copy-lines article>strong{white-space:nowrap}.receipt-copy-empty{margin:24px 0;padding:16px;border:1px dashed var(--line);color:var(--muted);font-size:.83rem;line-height:1.45}.receipt-copy-totals{display:grid;gap:7px;width:min(310px,100%);margin:24px 0 0 auto}.receipt-copy-totals span,.receipt-copy-totals>strong{display:flex;justify-content:space-between;gap:18px}.receipt-copy-totals>strong{padding-top:10px;border-top:2px solid var(--green);font-size:1.08rem}.receipt-copy-footer{margin-top:32px;padding-top:16px;border-top:1px solid var(--line);color:var(--muted);font-size:.72rem;line-height:1.45;text-align:center}.receipt-copy-unavailable{color:var(--warning)}.receipt-copy-unavailable h1{margin-top:0;color:var(--ink)}@media(max-width:650px){.sale-detail-heading{align-items:flex-start}.sale-detail-actions{align-items:flex-end;flex-direction:column;gap:0}.sale-detail-actions>a{min-height:30px;font-size:.72rem}.receipt-copy-page{padding:14px}.receipt-copy-controls{align-items:stretch;flex-direction:column}.receipt-copy-controls button{width:100%}.receipt-copy-reference{grid-template-columns:1fr}.receipt-copy-lines article{grid-template-columns:minmax(0,1fr) auto}.receipt-copy-lines article>span{grid-column:1;grid-row:2}.receipt-copy-lines article>strong{grid-column:2;grid-row:1/3;align-self:center}}@media print{@page{margin:12mm}.receipt-copy-page{padding:0;background:#fff}.receipt-copy{width:100%;margin:0}.receipt-copy-controls{display:none}.receipt-copy-paper{padding:0;box-shadow:none}.receipt-copy-notice{break-inside:avoid}.receipt-copy-lines article{break-inside:avoid}.receipt-copy-footer{margin-top:20px}}
.cash-opening-header .workspace-title small{display:block}
