:root {
  --bg: #f0f2f5;
  --bg-card: #ffffff;
  --fg: #1a1a2e;
  --fg-mut: #4a4a6a;
  --accent: #8e44ad;
  --green: #27ae60;
  --orange: #e87722;
  --red: #e74c3c;
  --blue: #2980b9;
  --row-even: #ffffff;
  --row-odd: #f0f2f5;
  --row-hover: #e9d8f4;
  --th-bg: #d0d5dd;
  --border: #cccccc;
}
*{margin:0;padding:0;box-sizing:border-box}
html,body{background:var(--bg);color:var(--fg);font-family:Helvetica,Arial,sans-serif;font-size:14px}
.wrap{max-width:1400px;margin:0 auto;padding:8px}
.tb{display:flex;flex-wrap:wrap;align-items:center;gap:6px;background:var(--bg-card);border-radius:10px;padding:6px 10px;margin-bottom:4px}
.tb2{display:flex;flex-wrap:wrap;align-items:center;gap:6px;background:var(--bg-card);border-radius:10px;padding:6px 10px;margin-bottom:2px}
h1{font-size:16px;font-weight:700;color:var(--accent);margin:0;letter-spacing:-.3px}
.btn{display:inline-block;padding:5px 12px;border:none;border-radius:4px;color:#fff;font-size:11px;font-weight:600;cursor:pointer;white-space:nowrap;background:var(--accent)}
.btn-sm{padding:3px 8px;font-size:10px;line-height:1.2}
.btn-secondary{background:#dce1e8!important;color:#1a1a2e!important}
.btn-edit{background:#2980b9!important;color:#fff!important}
.btn-del{background:#c0392b!important;color:#fff!important}
.btn-select{background:#e67e22!important;color:#fff!important}
.fx-art-row{cursor:pointer}
.fx-art-row:hover td{background:var(--row-hover)}
.fx-art-row.fx-art-sel td{background:#ede7f6;font-weight:600}
.fx-art-rub-table{table-layout:fixed;width:100%}
.fx-art-rub-table col.fx-art-col-sku{width:68px}
.fx-art-rub-table col.fx-art-col-hs{width:72px}
.fx-art-rub-table col.fx-art-col-orig{width:34px}
.fx-art-rub-table col.fx-art-col-weight{width:48px}
.fx-art-rub-table col.fx-art-col-actions{width:168px}
.fx-art-rub-table th:first-child,
.fx-art-rub-table td.fx-art-col-desc{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fx-art-rub-table th:not(:first-child),
.fx-art-rub-table td:not(.fx-art-col-desc):not(.fx-art-col-actions){font-size:11px;padding:4px 3px;text-align:center}
.fx-art-rub-table td.fx-art-col-actions{text-align:right;white-space:nowrap;padding:4px 2px}
.btn:hover{opacity:.85}
.btn:disabled{opacity:.4;cursor:not-allowed}
.inp{padding:5px 8px;border:1px solid var(--border);border-radius:4px;font-size:12px;background:#fff;color:var(--fg)}
.sel{padding:5px 6px;border:1px solid var(--border);border-radius:4px;font-size:11px;background:var(--th-bg);color:var(--fg)}
.tbl-wrap{overflow-x:auto;background:var(--bg-card);border-radius:10px;padding:0}
/* Tab Documenti e Spedizioni — wizard 1:1 desktop plus_orders.py:3845-4230 */
.sped-scroll{max-height:calc(100vh - 120px);overflow-y:auto;padding:4px 8px 16px}
.sped-card{background:var(--bg-card);border-radius:10px;padding:10px 14px;margin:8px 8px 4px;border:1px solid #e0e4ea}
.sped-card h2{font-size:14px;font-weight:700;margin:0 0 8px}
.sped-card h2.sped-t-orange{color:var(--orange)}
.sped-card h2.sped-t-blue{color:var(--blue)}
.sped-card h2.sped-t-green{color:var(--green)}
.sped-card h2.sped-t-purple{color:#4a148c}
.sped-muted{font-size:11px;color:var(--fg-mut);white-space:pre-wrap;line-height:1.45}
.sped-alert{
  display:block;font-size:12px;font-weight:700;line-height:1.45;white-space:pre-wrap;
  padding:10px 12px;margin:6px 0;border-radius:8px;color:#fff;
  background:#c0392b;border:2px solid #922b21;box-shadow:0 4px 14px rgba(192,57,43,.28);
}
.sped-alert:empty{display:none;padding:0;margin:0;border:none;box-shadow:none;background:transparent}
.sped-alert-error{background:#a93226;border-color:#7b241c}
.sped-alert-ok{background:#1e8449;border-color:#196f3d;box-shadow:0 4px 14px rgba(30,132,73,.24)}
.sped-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:8px}
.sped-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px 8px;margin-bottom:8px}
.sped-grid .sped-wide{grid-column:1/-1}
.sped-grid label{display:block;font-size:11px;color:var(--fg-mut);margin-bottom:2px}
.sped-grid .inp,.sped-grid .sel{width:100%;max-width:none}
#ddtNColli{width:5.6rem;max-width:5.6rem}
#ddtPeso{width:7.2rem;max-width:7.2rem}
.sped-hidden{display:none!important}
.sped-btn-lg{padding:10px 16px;font-size:13px;font-weight:700;border-radius:6px}
.sped-btn-gray{background:#dce1e8;color:#1a1a2e}
.sped-pkg-hdr{display:flex;gap:4px;font-size:10px;font-weight:700;color:var(--fg-mut);margin-bottom:4px;align-items:center}
.sped-pkg-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-bottom:6px}
.sped-pkg-row .pkg-n{width:25px;flex:0 0 25px;font-size:11px;color:var(--fg-mut);font-weight:700;text-align:center}
.sped-pkg-row .pkg-w{width:80px;flex:0 0 80px;max-width:80px}
.sped-pkg-row .pkg-l,.sped-pkg-row .pkg-wi,.sped-pkg-row .pkg-h{width:65px;flex:0 0 65px;max-width:65px}
.sped-pkg-row .pkg-del{flex:0 0 auto}
.sped-pkg-row .inp{
  appearance:none;-webkit-appearance:none;border-radius:999px;width:auto;max-width:100%;
}
.pkg-box-wrap{display:flex;align-items:center;gap:4px;width:140px;flex:0 0 140px}
.pkg-box-wrap .pkg-box-q{flex:1 1 auto;min-width:0;width:100%;border-radius:999px}
.pkg-box-wrap .btn-sm{padding:2px 6px;font-size:11px;min-width:26px;flex:0 0 auto}
.sped-progress{height:6px;width:min(400px,100%);background:#e0e4ea;border-radius:3px;overflow:hidden}
.sped-progress>div{height:100%;background:#4a148c;width:0%;transition:width .3s}
.fx-subtabs{display:flex;flex-wrap:wrap;gap:6px;margin:8px 8px 4px}
.fx-subtabs .btn{font-size:12px;padding:6px 12px}
.fx-rates-tbl{width:100%;font-size:11px;border-collapse:collapse;margin:8px 0}
.fx-rates-tbl th,.fx-rates-tbl td{padding:5px 8px;border-bottom:1px solid var(--border);text-align:left}
.fx-rates-tbl tr.fx-rate-sel td{background:#ede7f6;font-weight:700}
.fx-rates-tbl tr:hover td{background:var(--row-hover)}
.fx-compare-grid{display:grid!important;grid-template-columns:1fr 1fr;gap:12px;margin:8px 0}
.fx-compare-grid.fx-compare-grid-single{grid-template-columns:1fr;max-width:520px}
@media(max-width:720px){.fx-compare-grid{grid-template-columns:1fr}}
.fx-compare-panel{border-radius:10px;padding:10px 12px;border:2px solid var(--border);background:var(--bg-card);min-width:0}
.fx-compare-fedex{border-color:#7e57c2;background:#faf8ff}
.fx-compare-dhl{border-color:#ffcc00;background:#fffbea}
.fx-compare-panel-title{margin:0 0 8px;font-size:13px;font-weight:700}
.fx-compare-svc-row{display:flex;align-items:center;gap:8px;margin:0 0 8px;flex-wrap:wrap}
.fx-compare-svc-lbl{font-size:11px;color:var(--fg-mut);font-weight:600;white-space:nowrap}
.fx-compare-svc-sel{flex:1;min-width:160px;max-width:100%}
.fx-compare-fedex .fx-compare-panel-title{color:#4a148c}
.fx-compare-dhl .fx-compare-panel-title{color:#b8860b}
.fx-compare-panel .fx-rates-carrier-tbl{margin:4px 0 0}
.fx-rates-carrier-tbl{table-layout:fixed;width:100%}
.fx-rates-carrier-tbl col.fx-col-svc{width:34%}
.fx-rates-carrier-tbl col.fx-col-cost{width:34%}
.fx-rates-carrier-tbl col.fx-col-del{width:24%}
.fx-rates-carrier-tbl col.fx-col-ok{width:10%}
.fx-rate-cost{line-height:1.35;white-space:normal}
.fx-rate-cost-stack{display:flex;flex-direction:column;gap:2px}
.fx-rate-cost-line{display:block;white-space:normal}
.fx-rate-vat-tag{
  font-weight:700;font-size:10px;letter-spacing:.02em;
  color:#333;background:rgba(0,0,0,.07);padding:1px 4px;border-radius:3px
}
.fx-compare-fedex .fx-rate-vat-tag{color:#4a148c;background:rgba(74,20,140,.12)}
.fx-compare-dhl .fx-rate-vat-tag{color:#8a6500;background:rgba(255,204,0,.35)}
.fx-rate-cost-line-gross{margin-top:1px}
.fx-rate-vat-tag-gross{font-weight:400;opacity:.75;background:transparent;padding:0}
.fx-rate-cost-net{
  font-weight:800;color:#4a148c;
  background:rgba(237,231,246,.75);padding:1px 5px;border-radius:4px
}
.fx-rate-cost-gross{color:#1a1a2e;font-weight:400}
.fx-compare-dhl .fx-rate-cost-net{color:#8a6500;background:rgba(255,236,120,.65)}
.fx-rates-tbl tr.fx-rate-sel .fx-rate-cost-net{font-weight:900}
.fx-rates-tbl tr.fx-rate-sel .fx-rate-cost-gross{font-weight:400}
.fx-ship-banner{font-size:11px;line-height:1.45;padding:8px 10px;margin-bottom:8px;background:#ede7f6;border-left:3px solid #4a148c;border-radius:4px;color:#1a1a2e;white-space:pre-wrap}
.fx-ship-banner:empty{display:none;padding:0;margin:0;border:none;background:transparent}
.fx-compare-panel .fx-pay-box{margin:10px 0}
.fx-compare-dhl .fx-pay-box{border-color:rgba(255,204,0,.45);background:rgba(255,252,234,.85)}
.fx-rate-breakdown{margin:6px 0 0;padding:8px;background:#f7f8fa;border:1px solid #d0d4dc;border-radius:6px;font-size:11px}
.fx-rate-bd-row{display:flex;justify-content:space-between;gap:12px;padding:2px 0;font-size:11px}
.fx-rate-bd-total-net .fx-rate-bd-label{font-weight:700}
.fx-rate-bd-total-net .fx-rate-bd-amt{
  font-weight:800;background:rgba(237,231,246,.75);padding:1px 6px;border-radius:4px
}
.fx-rate-bd-total-gross .fx-rate-bd-label,.fx-rate-bd-total-gross .fx-rate-bd-amt{font-weight:400}
.fx-compare-dhl .fx-rate-breakdown .fx-rate-bd-total-net .fx-rate-bd-amt{background:rgba(255,236,120,.65)}
.fx-ship-cost-net-inp{font-weight:700;background:#ede7f6!important}
.fx-ship-cost-gross-inp{font-weight:400;background:#f7f8fa!important}
.fx-compare-create-btn{width:100%;margin-top:10px}
.fx-email-carrier-cols{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:4px}
@media(max-width:720px){.fx-email-carrier-cols{grid-template-columns:1fr}}
.fx-email-carrier-col{border-radius:8px;padding:8px 10px;border:1px solid rgba(126,87,194,.25)}
.fx-email-fedex-col{background:rgba(237,231,246,.45)}
.fx-email-dhl-col{background:rgba(255,252,234,.85);border-color:rgba(255,204,0,.45)}
.fx-email-carrier-title{display:block;font-size:12px;font-weight:700;margin-bottom:4px}
.fx-email-fedex-col .fx-email-carrier-title{color:#4a148c}
.fx-email-dhl-col .fx-email-carrier-title{color:#b8860b}
.fx-email-dhl-col .fx-email-notify-col strong{color:#b8860b}
.fx-email-dhl-note{padding:6px 0 2px}
@media (max-width:720px){
  .fx-rates-tbl{font-size:12px;border-collapse:separate;border-spacing:0}
  .fx-rates-tbl thead{display:none}
  .fx-rates-tbl tbody{display:block}
  .fx-rates-tbl tr.fx-rate-row,
  .fx-rates-tbl tr.fx-rate-msg{
    display:block;border:1px solid var(--border);border-radius:10px;
    padding:10px 12px;margin-bottom:8px;background:var(--bg-card);
    box-shadow:0 1px 3px rgba(0,0,0,.06)
  }
  .fx-rates-tbl tr.fx-rate-row.fx-rate-sel{
    border-color:#7e57c2;background:#ede7f6;
    box-shadow:0 0 0 2px rgba(126,87,194,.2)
  }
  .fx-compare-dhl .fx-rates-tbl tr.fx-rate-row.fx-rate-sel{
    border-color:#ffcc00;background:#fff8dc;
    box-shadow:0 0 0 2px rgba(255,204,0,.25)
  }
  .fx-rates-tbl tr.fx-rate-row.fx-rate-err{border-color:#e8b4b4;background:#fdf5f5}
  .fx-rates-tbl tr.fx-rate-row.fx-rate-unavail{opacity:.88}
  .fx-rates-tbl tr.fx-rate-row.fx-rate-sel td,
  .fx-rates-tbl tr.fx-rate-row:hover td{background:transparent!important;font-weight:inherit}
  .fx-rates-tbl tr.fx-rate-row td{
    display:flex;justify-content:space-between;align-items:flex-start;gap:10px;
    padding:4px 0;border:none;white-space:normal!important;
    overflow:visible!important;text-overflow:clip!important;text-align:right
  }
  .fx-rates-tbl tr.fx-rate-row .fx-rate-service::before{content:"Servizio"}
  .fx-rates-tbl tr.fx-rate-row .fx-rate-cost::before{content:"Tariffa IVA escl. / incl."}
  .fx-rates-tbl tr.fx-rate-row .fx-rate-delivery::before{content:"Consegna"}
  .fx-rates-tbl tr.fx-rate-row td::before{
    font-weight:600;font-size:10px;text-transform:uppercase;
    letter-spacing:.03em;color:var(--fg-mut);text-align:left;flex:0 0 auto;max-width:44%
  }
  .fx-rates-tbl:not(.fx-rates-carrier-tbl) tr.fx-rate-row .fx-rate-carrier{
    display:block;padding:0 0 8px;margin-bottom:6px;border-bottom:1px solid var(--border);
    text-align:left;font-size:13px;font-weight:700
  }
  .fx-rates-tbl:not(.fx-rates-carrier-tbl) tr.fx-rate-row .fx-rate-carrier::before{display:none}
  .fx-rates-tbl tr.fx-rate-row.fx-rate-sel .fx-rate-carrier{border-bottom-color:rgba(126,87,194,.35)}
  .fx-rates-tbl tr.fx-rate-row .fx-rate-ok{display:none}
  .fx-rates-tbl tr.fx-rate-row:not(.fx-rate-err):not(.fx-rate-unavail){
    cursor:pointer;-webkit-tap-highlight-color:rgba(126,87,194,.12);
    touch-action:manipulation;min-height:44px
  }
  .fx-rates-tbl tr.fx-rate-msg{border-style:dashed;color:var(--fg-mut)}
  .fx-rates-tbl tr.fx-rate-msg td{display:block;padding:0;border:none;text-align:center}
}
.fx-dest-wrap{max-width:420px;position:relative;margin-bottom:6px;overflow:visible}
.fx-sender-wrap{position:relative;flex:1;min-width:220px;overflow:visible}
.fx-sender-wrap .inp,.fx-c-cat-wrap .inp{font-size:11px}
.fx-dest-wrap .inp{font-size:12px}
.fx-ship-fill-box{overflow:visible}
.fx-dest-drop,.fx-rubrica-drop{display:none;position:absolute;left:0;right:0;top:100%;z-index:12000;background:var(--bg-card);border:1px solid var(--border);border-radius:8px;padding:4px 6px;margin-top:2px;max-height:280px;overflow:auto;font-size:12px;box-shadow:0 8px 24px rgba(0,0,0,.18)}
.fx-rubrica-drop.fx-fixed{position:fixed;right:auto;z-index:200}
.ship-cat-drop-item{padding:5px 8px;border:1px solid #c5cad3;border-radius:6px;margin:2px 0;cursor:pointer;background:#fff;font-size:11px}
.ship-cat-drop-item:hover{background:#ede7f6}
.fx-c-cat-wrap{position:relative;display:flex;gap:2px;align-items:center;min-width:0}
.fx-c-cat-wrap .fx-c-cat-q{flex:1;min-width:0}
.fx-c-cat-wrap .btn{padding:3px 5px;font-size:10px;line-height:1;min-width:0}
.fx-pay-box{background:#f0f4f8;border:1px solid #c5cdd8;border-radius:8px;padding:12px 14px;margin:10px 0}
.fx-value-pay-grid{display:grid;grid-template-columns:minmax(280px,1fr) minmax(260px,1fr);gap:16px;align-items:start}
@media(max-width:860px){.fx-value-pay-grid{grid-template-columns:1fr}}
.fx-value-pay-left,.fx-value-pay-right{min-width:0}
.fx-value-pay-right{border-left:2px solid #d0d4dc;padding-left:16px}
@media(max-width:860px){.fx-value-pay-right{border-left:none;border-top:2px solid #d0d4dc;padding-left:0;padding-top:14px}}
.fx-value-currency-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.fx-value-currency-row .inp{text-align:right}
.fx-currency-inp{width:74px;font-weight:700;text-transform:uppercase;letter-spacing:.04em}
.fx-dhl-terms-grid{display:grid;grid-template-columns:minmax(200px,0.9fr) minmax(300px,1.1fr);gap:16px;align-items:start}
@media(max-width:860px){.fx-dhl-terms-grid{grid-template-columns:1fr}}
.fx-pickup-grid{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;gap:12px;align-items:stretch;width:100%}
.fx-pickup-col{flex:1 1 0!important;min-width:0;width:50%;max-width:50%;padding:10px 12px;border:1px solid var(--border,#d0d4dc);border-radius:8px;background:#fafbfc;box-sizing:border-box}
.fx-pickup-col.fx-pickup-fedex{border-top:3px solid #4a148c}
.fx-pickup-col.fx-pickup-dhl{border-top:3px solid #b8860b}
.fx-pickup-fields{display:none;flex-direction:column;gap:6px}
.fx-pickup-col .fx-pickup-fields{display:flex!important;flex-direction:column;gap:6px}
.fx-pickup-check:checked ~ .fx-pickup-fields{display:flex!important}
#fxPickupRowSec #fxPickupSenderSec{display:block!important}
#fxPickupOnlyStatus{min-height:1.4em;padding:6px 0;font-size:12px;line-height:1.45}
#fxPickupOnlyStatus:empty{display:none}
.fx-pickup-only-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:10px}
.fx-pickup-only-date{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0}
.fx-pickup-only-scope{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0;justify-content:flex-end;text-align:right}
.fx-ship-date-hint{display:none;font-size:10px;color:#c0392b;font-weight:600;max-width:420px;line-height:1.4}
.fx-pickup-only-btns{display:flex;gap:12px;width:100%;align-items:flex-start}
.fx-pickup-only-btn-col{flex:1 1 0;min-width:0;display:flex}
.fx-pickup-only-btn-col-dhl{justify-content:flex-end}
.fx-pickup-btn-fedex{background:#6f42c1!important;border-color:#5a32a3!important;color:#fff!important}
.fx-pickup-btn-fedex:hover{background:#5a32a3!important}
.fx-pickup-btn-dhl{background:#f1c40f!important;border-color:#d4ac0d!important;color:#1a1a1a!important;font-weight:600}
.fx-pickup-btn-dhl:hover{background:#f39c12!important;border-color:#d68910!important}
@media(max-width:720px){
  .fx-pickup-only-toolbar{flex-direction:column;align-items:stretch}
  .fx-pickup-only-scope{justify-content:flex-start;text-align:left}
  .fx-pickup-only-btn-col,.fx-pickup-only-btn-col-dhl{justify-content:flex-start}
}
.fx-pickup-check-label{font-size:12px;display:flex;align-items:center;gap:6px;margin:0 0 8px;cursor:pointer}
#fxPickupRowSec.is-pickup-on #fxPickupSenderSec{display:block!important}
.fx-pickup-where-line{font-size:10px;line-height:1.45;margin:0 0 8px;padding:8px 10px;border-radius:6px;background:#eef1fb;border:1px solid #c5cae9;color:#283593}
.fx-pickup-where-line strong{font-weight:700}
.fx-pickup-where-line .fx-pickup-where-btn{margin-left:6px;padding:0;border:none;background:none;color:#4a148c;font-size:10px;font-weight:600;text-decoration:underline;cursor:pointer}
.fx-pickup-auto-hint{font-size:9px;color:#666;font-weight:400;margin-left:4px}
.fx-pickup-dims-row{padding:6px 8px;border-radius:6px;background:#f3f5f9;border:1px dashed #c5cad3}
.fx-pickup-svc-cards{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0 0 12px}
.fx-pickup-svc-card{
  appearance:none;-webkit-appearance:none;
  display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:4px;
  min-height:64px;text-align:left;padding:12px 14px;
  border:2px solid #d5d9e3;border-radius:12px;background:linear-gradient(180deg,#fff 0%,#f7f8fb 100%);
  cursor:pointer;line-height:1.35;box-shadow:0 1px 2px rgba(40,53,147,.06);
  transition:border-color .15s,background .15s,box-shadow .15s,transform .1s;
  font:inherit;color:inherit;width:100%;box-sizing:border-box;
}
.fx-pickup-svc-card:hover{border-color:#7e57c2;box-shadow:0 2px 8px rgba(79,55,138,.12);transform:translateY(-1px)}
.fx-pickup-svc-card strong{display:block;font-size:12px;font-weight:700;color:#4a148c;margin:0;letter-spacing:.01em}
.fx-pickup-svc-card span{display:block;font-size:10px;color:#5c6370;margin:0}
.fx-pickup-svc-card.is-active{
  border-color:#4a148c;background:linear-gradient(180deg,#f3e5f5 0%,#ede7f6 100%);
  box-shadow:0 0 0 1px #4a148c,0 2px 10px rgba(74,20,140,.14);
}
.fx-pickup-svc-card.is-active strong{color:#311b92}
@media(max-width:520px){.fx-pickup-svc-cards{grid-template-columns:1fr}}
.fx-pickup-only-btns .btn{
  border-radius:10px!important;padding:10px 16px!important;font-weight:600!important;
  box-shadow:0 2px 6px rgba(0,0,0,.08);transition:transform .1s,box-shadow .15s,background .15s;
}
.fx-pickup-only-btns .btn:hover{transform:translateY(-1px);box-shadow:0 4px 12px rgba(0,0,0,.12)}
.fx-pickup-sender-wrap{position:relative;margin-bottom:8px}
.fx-pickup-sender-drop{position:absolute;left:0;right:0;top:100%;z-index:40;max-height:220px;overflow:auto;background:#fff;border:1px solid var(--border,#d0d4dc);border-radius:6px;box-shadow:0 4px 12px rgba(0,0,0,.12)}
@media(max-width:520px){.fx-pickup-grid{flex-direction:column!important;flex-wrap:wrap!important}.fx-pickup-col{width:100%!important;max-width:100%!important;flex:1 1 100%!important}}
.fx-dhl-terms-left,.fx-dhl-terms-right{min-width:0}
.fx-dhl-terms-right{border-left:2px solid #d0d4dc;padding-left:16px}
@media(max-width:860px){.fx-dhl-terms-right{border-left:none;border-top:2px solid #d0d4dc;padding-left:0;padding-top:12px}}
.fx-dhl-terms-right .sel{width:100%;max-width:none}
.fx-pay-display-compact{padding:7px 10px;font-size:12px;line-height:1.3}
.fx-intl-goods-desc-row{margin:0 0 8px}
.fx-intl-goods-desc-row label{display:block;font-size:11px;color:var(--fg-mut);font-weight:600;margin-bottom:4px}
.fx-intl-goods-desc-row .inp,
#fxEuDesc.fx-goods-desc-wide,
#fxIntlGoodsDesc{
  width:100%;
  max-width:720px;
  min-width:min(100%,480px);
  box-sizing:border-box;
}
.fx-cod-box{background:#fffdf5;border:2px solid #e8d48a;border-radius:8px;padding:10px 12px;margin:10px 0 0;transition:border-color .15s,background .15s,box-shadow .15s}
.fx-cod-box.fx-cod-active{background:#fff8e1;border-color:#d4a017;box-shadow:0 0 0 2px rgba(212,160,23,.18)}
.fx-cod-box.fx-cod-ready{border-color:#b8860b;box-shadow:0 0 0 3px rgba(184,134,11,.22)}
.fx-cod-box.fx-cod-active #fxDhlCodAmount{font-weight:700;border-color:#b8860b;background:#fffef8}
.fx-cod-box.fx-cod-inactive{opacity:.92}
.fx-cod-title{font-size:12px;color:#8a6d00;margin:0 0 8px;font-weight:700}
.fx-cod-hint{font-size:10px;max-width:320px;line-height:1.4;color:#6b5a1a}
.fx-cod-note{font-size:10px;line-height:1.45;color:#6b5a1a;margin:8px 0 0;max-width:640px}
.fx-cod-box.fx-cod-active .fx-cod-note{color:#5c4300;font-weight:600}
.fx-cod-box.fx-cod-active .fx-cod-hint{color:#5c4300;font-weight:600}
.fx-cod-pay-wrap{display:none;flex-direction:column;gap:2px}
.fx-cod-box.fx-cod-active .fx-cod-pay-wrap{display:flex!important}
.fx-email-notify-box{background:#f3e8ff;border:2px solid #7e57c2;border-radius:8px;padding:10px 12px;margin:10px 0}
.fx-email-notify-box h3{font-size:12px;color:#4a148c;margin:0 0 4px;font-weight:700}
.fx-email-notify-cols{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:8px}
@media(max-width:720px){.fx-email-notify-cols{grid-template-columns:1fr}}
.fx-account-cols{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media(max-width:720px){.fx-account-cols{grid-template-columns:1fr}}
.fx-account-col{display:flex;flex-direction:column;gap:4px;min-width:0}
.fx-account-lbl{font-size:13px;font-weight:700;color:#4a148c;letter-spacing:.01em}
select.fx-account-sel.sel,
.fx-account-sel{
  width:100%;font-weight:800;font-size:18px;line-height:1.3;
  padding:12px 14px;min-height:52px;border-radius:8px;border:3px solid #aab4c0;
  background:#fff;color:#1a1a2e;cursor:pointer;
  box-shadow:0 1px 4px rgba(0,0,0,.1);
}
select.fx-account-sel.sel:focus,
.fx-account-sel:focus{outline:none;box-shadow:0 0 0 3px rgba(74,20,140,.22)}
select.fx-account-sel.sel.fx-account-sel--559594180,
.fx-account-sel--559594180{background:#fff3e0;border-color:#ea580c;color:#9a3412}
select.fx-account-sel.sel.fx-account-sel--200191626,
.fx-account-sel--200191626{background:#f3e5f5;border-color:#7b1fa2;color:#4a148c}
select.fx-account-sel.sel.fx-account-sel--801405622,
.fx-account-sel--801405622{background:#e3f2fd;border-color:#1976d2;color:#0d47a1}
select.fx-account-sel.sel.fx-account-sel--other,
.fx-account-sel--other{background:#eceff1;border-color:#546e7a;color:#263238}
select.fx-account-sel.sel.fx-account-sel--dhl,
.fx-account-sel--dhl{background:#fff8e1;border-color:#f9a825;color:#5d4037}
.fx-dhl-transport-display{font-size:15px;font-weight:700;background:#fff8e1;border-color:#f9a825}
.fx-dhl-transport-display strong{font-size:15px;color:#5d4037}
.fx-account-sel option.fx-acct-opt--559594180{background:#fff3e0;color:#9a3412;font-weight:700}
.fx-account-sel option.fx-acct-opt--200191626{background:#f3e5f5;color:#4a148c;font-weight:700}
.fx-account-sel option.fx-acct-opt--801405622{background:#e3f2fd;color:#0d47a1;font-weight:700}
.fx-account-sel option.fx-acct-opt--other{background:#f5f5f5;color:#212121;font-weight:700}
.fx-account-sel option.fx-acct-opt--dhl{background:#fff8e1;color:#5d4037;font-weight:700}
.fx-email-notify-col strong{display:block;font-size:11px;color:#4a148c;margin-bottom:4px}
.fx-email-flag{display:flex;align-items:flex-start;gap:6px;font-size:11px;margin:5px 0;line-height:1.35}
.fx-email-flag input{margin-top:2px;accent-color:#4a148c;flex-shrink:0}
.fx-email-flag-unsupported{color:#7a6a4a}
.fx-email-flag-unsupported input{accent-color:#b8860b}
.fx-email-flag-unsupported span{opacity:.88}
.fx-email-flag-dhl-opt{color:#6a5a2a}
.fx-email-flag-dhl-opt input{accent-color:#b8860b}
.fx-email-flag-dhl-opt span{opacity:.92}
.fx-email-flag-locked{opacity:.95;cursor:default}
.fx-email-flag-locked input{cursor:not-allowed;accent-color:#2e7d32}
.fx-email-flag-locked span{font-weight:600}
.fx-email-hint{display:block;font-size:10px;margin-top:6px;color:#5c4d7a}
.fx-email-hint.missing{color:#c0392b;font-weight:600}
.fx-ship-fill-box{border-radius:8px;padding:10px 12px;margin:10px 0}
.fx-ship-fill-title{font-size:11px;font-weight:700;margin:0 0 8px;line-height:1.35}
.fx-ship-fill-mitt{background:#e8f4fc;border:2px solid #2e86ab}
.fx-ship-fill-mitt .fx-ship-fill-title{color:#1a5f7a}
.fx-ship-fill-mitt h3{color:#1a5f7a;margin:0 0 6px}
.fx-ship-fill-dest{background:#fff4e5;border:2px solid #e87722}
.fx-ship-fill-dest .fx-ship-fill-title{color:#b45309}
.fx-ship-fill-dest h3{color:#c05621;margin:0 0 6px}
.fx-ship-fill-dest .inp{background:#fff;border-color:#e8b26a}
.fx-ship-fill-dest .inp:focus{border-color:#e87722;box-shadow:0 0 0 2px rgba(232,119,34,.25)}
.fx-ship-fill-dest label{color:#5c4033;font-weight:600}
.fx-ship-fill-dest .fx-dest-wrap > label{color:#b45309;font-weight:700}
.fx-ship-fill-dest .fx-dest-search-row{display:flex;gap:6px;align-items:center;margin-bottom:4px}
.fx-ship-fill-dest .fx-inp-dest-search{
  font-size:13px;font-weight:600;
  background:#e8f4fc;border:2px solid #3498db;color:#1a3a5c;
}
.fx-ship-fill-dest .fx-inp-dest-search:focus{
  border-color:#1a5276;box-shadow:0 0 0 2px rgba(26,82,118,.28);outline:none
}
.fx-ship-fill-dest .fx-inp-dest-search::placeholder{color:#5a7ab0;font-weight:500}
.fx-dest-field-company,.fx-dest-field-name{grid-column:span 2}
.fx-dest-field-hint{display:block;font-size:10px;font-weight:400;color:var(--fg-mut);margin:-1px 0 4px;line-height:1.3}
.fx-dest-field-name label{color:#6d4c2a;font-weight:600}
.fx-dest-field-name .fx-inp-name{background:#fffaf5;border:1px solid #d4a574}
.fx-dest-field-name .fx-inp-name:focus{border-color:#e87722;box-shadow:0 0 0 2px rgba(232,119,34,.2)}
.fx-tnt-preview{background:#fff4e5;border:2px solid #e87722;border-radius:8px;padding:10px 12px;margin:10px 0;font-size:11px;line-height:1.45}
.fx-tnt-preview .fx-tnt-preview-title{font-weight:700;color:#c05621;margin-bottom:6px;font-size:12px}
.fx-tnt-preview .fx-tnt-preview-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px;flex-wrap:wrap}
.fx-tnt-preview .fx-tnt-preview-head .fx-tnt-preview-title{margin-bottom:0}
.fx-tnt-preview .fx-tnt-copy-btn{padding:3px 8px;font-size:10px;line-height:1.2;background:#e87722;color:#fff;border:none;border-radius:5px;cursor:pointer;font-weight:600}
.fx-tnt-preview .fx-tnt-copy-btn:hover{background:#c05621}
.fx-tnt-preview .fx-tnt-copy-btn.fx-tnt-copy-ok{background:#27ae60}
.fx-tnt-preview .fx-tnt-preview-grid{display:grid;grid-template-columns:1fr 1fr;gap:4px 16px}
@media(max-width:720px){.fx-tnt-preview .fx-tnt-preview-grid{grid-template-columns:1fr}}
#fxTntRubBody tr{cursor:pointer}
#fxTntRubBody tr.fx-tnt-sel{background:#ede7f6}
.fx-box-rub-table{table-layout:fixed;width:100%}
.fx-box-rub-table th.fx-box-col-dim,
.fx-box-rub-table td.fx-box-col-dim{
  width:32px;max-width:36px;text-align:center;padding:4px 1px;font-size:11px
}
.fx-box-rub-table th.fx-box-col-unit,
.fx-box-rub-table td.fx-box-col-unit{
  width:24px;max-width:28px;text-align:center;padding:4px 1px;font-size:10px;color:var(--fg-mut)
}
.fx-box-rub-table th.fx-box-col-actions,
.fx-box-rub-table td.fx-box-col-actions{
  width:118px;min-width:118px;text-align:right;padding:4px 2px;white-space:nowrap;overflow:visible
}
.fx-box-form-grid{
  display:grid;grid-template-columns:1fr 64px 64px 64px;gap:6px 8px;margin-bottom:8px
}
.fx-box-form-grid label{display:block;font-size:11px;color:var(--fg-mut);margin-bottom:2px}
.fx-box-form-grid .inp{width:100%;max-width:none}
.fx-box-form-grid .fx-box-form-notes{grid-column:1/-1}
#fxPaneBox{padding-bottom:12px}
.fx-tnt-rub-table{table-layout:fixed}
.fx-tnt-rub-table th.fx-tnt-col-account,
.fx-tnt-rub-table td.fx-tnt-col-account{width:52px;max-width:56px;text-align:center;padding:4px 2px;font-size:11px}
.fx-tnt-rub-table th.fx-tnt-col-mitt,
.fx-tnt-rub-table td.fx-tnt-col-mitt{width:28px;max-width:32px;text-align:center;padding:4px 1px;font-size:11px}
.fx-tnt-rub-table th.fx-tnt-col-country,
.fx-tnt-rub-table td.fx-tnt-col-country{width:34px;max-width:38px;text-align:center;padding:4px 2px}
.fx-tnt-rub-table th.fx-tnt-col-actions,
.fx-tnt-rub-table td.fx-tnt-col-actions{
  width:198px;min-width:198px;max-width:none;
  overflow:visible;text-overflow:clip;white-space:nowrap;padding:4px 2px
}
.fx-tnt-actions{display:flex;flex-wrap:nowrap;gap:3px;align-items:center;justify-content:flex-end}
.fx-tnt-actions .btn{padding:3px 5px;font-size:10px;line-height:1.15;min-width:0}

.fx-fic-preview{background:#eef6ff;border-color:#2980b9}
.fx-fic-preview .fx-tnt-preview-title{color:#1a5276}
.fx-fic-rub-table{table-layout:fixed;width:100%}
.fx-fic-rub-table .fx-fic-col-hint{width:32px;min-width:32px;max-width:32px;text-align:center;padding:4px 2px}
.fx-fic-rub-table .fx-fic-col-company{width:14%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fx-fic-rub-table .fx-fic-col-street{width:16%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fx-fic-rub-table .fx-fic-col-city{width:8%}
.fx-fic-rub-table .fx-fic-col-country{width:34px;min-width:34px;text-align:center;padding:4px 2px}
.fx-fic-rub-table .fx-fic-col-contacts{width:15%;font-size:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:4px 3px}
.fx-fic-rub-table .fx-fic-col-sped{width:46px;min-width:46px;max-width:46px;text-align:center;font-size:10px;font-weight:600;padding:4px 2px}
.fx-fic-rub-table .fx-fic-col-mod{width:72px;min-width:72px;max-width:72px;font-size:10px;white-space:nowrap;padding:4px 2px}
.fx-fic-rub-table th.fx-fic-col-sped,
.fx-fic-rub-table th.fx-fic-col-mod{text-align:center}
.fx-fic-rub-table td.fx-tnt-col-actions,
.fx-fic-rub-table th.fx-tnt-col-actions{width:158px;min-width:158px;max-width:158px;padding:4px 2px}
.fx-fic-badge{display:inline-block;padding:1px 5px;border-radius:4px;font-size:9px;font-weight:700;line-height:1.3}
.fx-fic-badge-std{background:#dceefb;color:#1a5276}
.fx-fic-badge-ship{background:#fdebd0;color:#b9770e}
#fxFicRubBody tr.fx-tnt-sel{background:#e8f4fc}
.fx-fic-pager{display:flex;align-items:center;justify-content:center;gap:10px;margin:8px 0;padding:6px 0}
.fx-fic-pager-info{font-size:11px;color:var(--fg-mut);min-width:120px;text-align:center}
.fx-fic-pager-btn{min-width:36px;padding:4px 10px;font-size:14px;line-height:1.2}
.fx-fic-pager-btn:disabled{opacity:.45;cursor:not-allowed}
.fx-pay-row{margin-bottom:10px}
.fx-pay-row:last-child{margin-bottom:0}
.fx-pay-row label{display:block;font-size:11px;font-weight:700;color:var(--fg-mut);margin-bottom:4px;text-transform:uppercase;letter-spacing:.02em}
.fx-pay-display{background:#fff;border:1px solid #aab4c0;border-radius:6px;padding:8px 11px;font-size:13px;color:var(--fg);line-height:1.35}
.fx-pay-display strong{font-weight:700;color:#1a237e}
.fx-pay-summary{background:#ede7f6;border:1px solid #b39ddb;border-radius:8px;padding:8px 12px;font-size:12px;line-height:1.5;margin:10px 0 4px}
.fx-pay-summary span{display:block}
.fx-customs-wrap{border:1px solid #d0d7e2;border-radius:8px;padding:10px 12px;margin:8px 0;background:#fafbfc;overflow-x:auto}
.fx-customs-hdr,.fx-customs-row{
  display:grid;
  grid-template-columns:220px 180px 104px 52px 68px 68px 88px 50px 72px 76px 32px;
  gap:4px;align-items:center;width:max-content;max-width:100%
}
.fx-customs-hdr span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fx-customs-row .fx-c-ro{font-size:11px;font-weight:700;color:#1a237e;text-align:right;padding:0 4px;white-space:nowrap;line-height:1.2}
.fx-origin-select{min-width:220px;max-width:280px;font-size:12px}
.fx-currency-select{width:72px;font-size:12px;font-weight:600}
.fx-customs-hdr{font-size:10px;font-weight:700;color:var(--fg-mut);text-transform:uppercase;padding:0 2px 6px;border-bottom:1px solid var(--border);margin-bottom:6px}
.fx-customs-row{padding:5px 2px;margin-bottom:4px;background:#fff;border:1px dashed var(--border);border-radius:6px}
.fx-customs-row .inp,.fx-customs-row .sel{font-size:11px;padding:5px 6px;min-width:0;width:100%;box-sizing:border-box}
.fx-customs-row .fx-c-desc{font-size:11px}
.fx-customs-row .fx-c-hs{font-size:11px;font-family:monospace}
.fx-customs-row .fx-c-qty::-webkit-outer-spin-button,
.fx-customs-row .fx-c-qty::-webkit-inner-spin-button,
.fx-customs-row .fx-c-wu::-webkit-outer-spin-button,
.fx-customs-row .fx-c-wu::-webkit-inner-spin-button,
.fx-customs-row .fx-c-price::-webkit-outer-spin-button,
.fx-customs-row .fx-c-price::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.fx-customs-row .fx-c-qty,
.fx-customs-row .fx-c-wu,
.fx-customs-row .fx-c-price{-moz-appearance:textfield;appearance:textfield}
.fx-customs-actions{display:flex;gap:3px;align-items:center;justify-content:flex-end}
.fx-customs-actions .btn{font-size:10px;padding:4px 6px;line-height:1.2}
.fx-docs-box{border:1px solid #d0d7e2;border-radius:8px;padding:10px 12px;margin:10px 0;background:#f8fafc}
.fx-docs-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:8px}
.fx-docs-row:last-child{margin-bottom:0}
.fx-doc-btn{background:var(--blue);color:#fff;border:none;padding:6px 14px;border-radius:4px;font-size:12px;font-weight:600;cursor:pointer;white-space:nowrap}
.fx-doc-btn:hover{opacity:.88}
.fx-doc-btn.alt{background:#4a148c}
.fx-doc-lbl{min-width:160px;font-size:12px;font-weight:600;color:var(--fg-mut)}
.fx-doc-name{font-size:11px;color:var(--green);font-weight:600}
.fx-extra-doc{display:flex;align-items:center;gap:8px;font-size:11px;padding:4px 0;border-bottom:1px solid #e8ecf0}
table{width:100%;border-collapse:collapse;font-size:13px;font-family:Helvetica,Arial,sans-serif}
th{background:var(--th-bg);color:var(--fg);font-size:12px;font-weight:700;padding:9px 4px;text-align:left;border-bottom:1px solid var(--border);position:sticky;top:0;z-index:1;white-space:nowrap}
td{padding:5px 4px;border-bottom:1px solid #e0e0e0;vertical-align:middle;font-size:13px;white-space:nowrap}
tr:hover td{background:var(--row-hover)!important}
/* Zebra striping tabella Pagamenti (Fatture Scadute FIC): righe alternate bianco/grigio chiaro */
#pgBody tr:nth-child(odd) td{background:#ffffff}
#pgBody tr:nth-child(even) td{background:#f3f5f8}
/* Riga fattura cliccabile -> apre fattura su Fatture in Cloud (desktop _pag_on_double_click 5636-5641) */
#pgBody tr.pg-clickable{cursor:pointer}

/* Row tag colors — ESATTI da plus_orders.py:3179-3186 */
.approvato td{background:#d4edda!important;color:#1a1a2e!important}
.approvato-extra td{background:#4598CA!important;color:#FFD700!important}
.stato3d td{background:#d4edda!important;color:#1a1a2e!important}
.attivo td{background:#E3F2FD!important;color:#1a1a2e!important}
.attivo-extra td{background:#E3F2FD!important;color:#856404!important}
.extra td{background:#FFF3CD!important;color:#856404!important}

.dot{font-size:16px;line-height:1}
.pg{display:flex;justify-content:space-between;align-items:center;margin-top:4px;font-size:11px;color:#666}
.check-sel{width:20px;height:20px;cursor:pointer;accent-color:var(--accent)}

/* Tabella a layout fisso con larghezze bilanciate */
table{table-layout:fixed}
th,td{overflow:hidden;text-overflow:ellipsis}
/* Colonne Flag/€/Docs — larghezze FISSE in px (replica desktop sel=28, pay=40, docs=28).
   Centrate orizz./vert.: il flag resta SEMPRE in colonna fissa e l'assenza del
   pallino non sposta nulla, perche' chk e docs sono celle separate a larghezza fissa. */
/* PARTE A — colonna FLAG/DOCS a griglia FISSA a 2 celle (checkbox + pallino).
   Ordine desktop REV1: [€ canvas a sx] | sel(✓ 28px) | docs(28px).
   Web: col-eur (€) poi col-flagdocs che contiene una grid 2 celle fisse.
   Se il pallino manca (es. ORD_D455, job chiuso) la cella docs resta
   OCCUPATA vuota: il flag NON si sposta MAI. Tutto centrato verticalmente
   sulla stessa baseline di € e pallini. */
.col-eur{width:30px;text-align:center;vertical-align:middle;padding:2px 1px}
.mp-stato-pay{display:inline-block;margin-left:6px;font-size:15px;color:#e65100;cursor:pointer;vertical-align:middle;line-height:1;filter:drop-shadow(0 0 1px rgba(230,81,0,.4))}
.mp-stato-pay:hover{transform:scale(1.12)}
tr.row-merce-pronta{box-shadow:inset 4px 0 0 #e65100}
tr.row-merce-pronta td.col-ord{color:#c62828!important}
.mp-detail-banner{background:linear-gradient(90deg,#ffebee 0%,#fff3e0 100%);border:2px solid #e65100;border-radius:8px;padding:12px 16px;margin-bottom:12px;box-shadow:0 2px 8px rgba(230,81,0,.15)}
.mp-detail-banner .mp-detail-title{font-size:15px;font-weight:800;color:#bf360c;margin-bottom:6px;letter-spacing:.02em}
.mp-detail-banner .mp-detail-body{font-size:13px;font-weight:600;color:#e65100;line-height:1.45}
.mp-hdr-badge{display:inline-block;margin-left:8px;padding:3px 8px;border-radius:5px;background:#e65100;color:#fff;font-size:11px;font-weight:800;vertical-align:middle;letter-spacing:.03em}
.col-flagdocs{width:58px;padding:0 2px 0 0;vertical-align:middle}
/* HEADER e RIGA: checkbox | pallino DOCS (rubrica in ultima colonna) */
.fd-head{display:grid;grid-template-columns:26px 30px;align-items:center;justify-items:start;padding-left:1px}
.fd-head .fd-h-docs{justify-self:center;text-align:center;font-size:10px;line-height:1.1}
.flagdocs-grid{display:grid;grid-template-columns:26px 30px;align-items:center;justify-items:start;padding-left:1px;height:22px}
.flagdocs-grid > :nth-child(2){justify-self:center}
.docs-box,.ana-box{display:inline-flex;align-items:center;justify-content:center;width:22px;height:18px;line-height:1;cursor:default}
/* Anteprima grafica WeClapp — solo on-click, zero costo apertura lista */
.gfx-list-btn{display:inline-flex;align-items:center;justify-content:center;width:20px;height:18px;margin-left:2px;padding:0;border:0;border-radius:4px;background:#f3e8ff;color:#6b21a8;font-size:12px;line-height:1;cursor:pointer;flex:0 0 auto;vertical-align:middle}
.gfx-list-btn:hover{background:#e9d5ff}
.ana-gfx-wrap{display:inline-flex;align-items:center;justify-content:center;gap:2px;max-width:100%}
/* Larga come Job 3D Print — non ereditare max-width 460px di .cfm-box */
#gfxPreviewOverlay.cfm-ov{z-index:10050;padding:10px}
#gfxPreviewOverlay.cfm-ov.gfx-prev-ov--max{padding:0;align-items:stretch;justify-content:stretch}
#gfxPreviewOverlay .cfm-box.gfx-prev-box,
.gfx-prev-box{
  max-width:min(1280px,98vw)!important;width:98vw!important;
  max-height:94vh!important;height:94vh!important;
  min-width:640px;min-height:420px;resize:both;
  display:flex;flex-direction:column;overflow:hidden;
  background:#fff;border-radius:10px;box-shadow:0 10px 40px rgba(0,0,0,.4)
}
#gfxPreviewOverlay .cfm-box.gfx-prev-box.gfx-prev-box--max,
.gfx-prev-box.gfx-prev-box--max{
  width:100vw!important;height:100vh!important;
  max-width:100vw!important;max-height:100vh!important;
  min-width:0;min-height:0;resize:none;border-radius:0
}
.gfx-prev-box.gfx-prev-box--wide-prev .gfx-prev-list{display:none}
.gfx-prev-hdr{background:#5b2c6f;display:flex;align-items:center;justify-content:space-between;gap:10px;flex:0 0 auto;padding:10px 14px;color:#fff;font-weight:700}
.gfx-prev-hdr #gfxPreviewTitle{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gfx-prev-hdr-actions{display:inline-flex;align-items:center;gap:8px;flex:0 0 auto;flex-wrap:wrap}
.gfx-prev-size-btn{background:#1abc9c;color:#fff;border:0;padding:4px 10px;border-radius:5px;font-size:12px;font-weight:700;cursor:pointer}
.gfx-prev-close{flex:0 0 auto;background:#7d3c98;color:#fff;border:1px solid rgba(255,255,255,.35)}
.gfx-prev-close:hover{background:#6c3483}
.gfx-prev-layout{display:flex;gap:0;min-height:0;flex:1 1 auto;overflow:hidden;border-bottom:1px solid #e0e4ea}
.gfx-prev-list{width:168px;max-width:28%;overflow:auto;border-right:1px solid #e0e4ea;background:#f8fafc;padding:8px;flex:0 0 auto}
.gfx-prev-list button{display:block;width:100%;text-align:left;border:0;border-radius:6px;padding:8px 10px;margin-bottom:4px;background:transparent;color:#1a1a2e;font-size:11px;cursor:pointer;line-height:1.35;word-break:break-word}
.gfx-prev-list button:hover{background:#ede9fe}
.gfx-prev-list button.active{background:#5b2c6f;color:#fff}
.gfx-prev-main{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;background:#2b2b33;position:relative;overflow:hidden}
.gfx-prev-status{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#4a4a6a;font-size:13px;padding:16px;text-align:center;z-index:2;pointer-events:none;background:#eceff4;white-space:pre-wrap}
.gfx-prev-status.err{color:#b91c1c}
.gfx-prev-frame{flex:1 1 auto;width:100%;min-width:100%;height:100%;min-height:100%;border:0;background:#2b2b33}
.gfx-prev-main .pt-drive-img-viewport{background:#0f172a}
.gfx-prev-img{display:block;width:auto;max-width:none;height:auto;object-fit:contain;object-position:center top;background:#2b2b33;padding:0;margin:0}
.gfx-prev-img[hidden],.gfx-prev-frame[hidden]{display:none!important}
.gfx-prev-foot{flex:0 0 auto;justify-content:flex-start;padding:8px 14px;background:#fff}
.gfx-prev-foot #gfxPreviewHint{font-size:11px;color:#6b7280}
@media (max-width:700px){
  .gfx-prev-layout{flex-direction:column}
  .gfx-prev-list{width:100%;max-width:none;max-height:88px;border-right:0;border-bottom:1px solid #e0e4ea}
  .gfx-prev-box,#gfxPreviewOverlay .cfm-box.gfx-prev-box{height:96vh!important;max-height:96vh!important}
}
.ana-box{font-size:15px;font-weight:800;line-height:1;font-family:Helvetica,Arial,sans-serif}
.ana-box.clickable{cursor:pointer}
.col-ana{width:52px;text-align:center;vertical-align:middle;padding:0 2px}
.cli-name-wrap{display:inline-flex;align-items:center;gap:4px;max-width:100%}
.cli-ana{font-size:13px;font-weight:700;flex:0 0 auto;line-height:1}
/* checkbox: contenitore IDENTICO header+riga, margini azzerati per pixel-perfect */
.chk-box{display:inline-flex;align-items:center;justify-content:center;width:22px;height:20px}
.chk-box input{margin:0}
/* € header e celle: simbolo MOLTO piu' grande e visibile (c'e' spazio libero) */
.eur-box{display:inline-flex;align-items:center;justify-content:center;height:20px;line-height:1;font-size:11px}
.col-eur .eur-h{font-size:16px;font-weight:700;color:#1a1a2e;line-height:1}
.col-ord{width:9%}
.col-cli{width:18%}
.col-data{width:8%}
.col-job{width:11%}
.col-art{width:14%}
.col-qty{width:6%}
.col-fatt{width:7%;font-size:11px}
.col-stato{width:14%;font-size:11px;overflow:visible;text-overflow:clip;white-space:normal}
.sped-mark{color:#27ae60;font-weight:700;font-size:10px;margin-left:4px;white-space:nowrap}
.ship-mark-wrap{display:inline-flex;align-items:center;gap:4px;margin-left:6px;white-space:nowrap;vertical-align:middle;cursor:default}
.ship-mark-ico{font-size:20px;line-height:1;color:#e87722;filter:grayscale(0)}
.ship-mark-date{font-size:12px;font-weight:700;color:#e87722;line-height:1}
.china-ship-wrap{display:inline-flex;align-items:center;gap:3px;margin-left:6px;white-space:nowrap;vertical-align:middle;cursor:default}
.china-ship-ico{font-size:16px;line-height:1;color:#c0392b}
.china-ship-lbl{font-size:11px;font-weight:700;color:#c0392b;line-height:1}
.plan-ship-wrap{display:inline-flex;align-items:center;gap:4px;margin-left:6px;white-space:nowrap;vertical-align:middle;cursor:default}
.plan-ship-ico{font-size:16px;line-height:1;filter:grayscale(0)}
.plan-ship-date{font-size:12px;font-weight:700;color:#1565c0!important;line-height:1}
.plan-ship-mark{display:inline-block;margin-left:6px;font-size:12px;font-weight:700;color:#1565c0!important;line-height:1;white-space:nowrap;vertical-align:middle}

/* Barra azioni sotto la tabella */
.actbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;background:var(--bg-card);border-radius:10px;padding:8px 12px;margin-top:6px}
.actbar .selcount{font-size:12px;font-weight:700;color:var(--fg)}
.act-btn{display:inline-block;padding:6px 14px;border:none;border-radius:5px;color:#fff;font-size:11px;font-weight:700;cursor:pointer;white-space:nowrap}
.act-btn:disabled{opacity:.45;cursor:not-allowed}
/* Pulsanti dettaglio — replica desktop (font/peso come desktop) */
.dbtn{display:inline-block;padding:6px 12px;border:none;border-radius:5px;color:#fff;font-size:11px;font-weight:700;cursor:pointer;white-space:nowrap}
.dbtn:hover{opacity:.88}
/* Sezioni dettaglio — card bianche su BG chiaro */
.dsec{background:#ffffff;border-radius:8px;border:1px solid #e0e0e0;margin-bottom:10px;overflow:hidden}
.dsec-h{background:#8e44ad;color:#fff;font-size:12px;font-weight:700;padding:6px 12px;letter-spacing:.2px}
.dsec-b{padding:10px 12px}
.dfield{display:flex;padding:3px 0;font-size:13px;align-items:baseline}
.dfield .dlab{min-width:170px;color:#4a4a6a;font-weight:600;font-size:12px}
.dfield .dval{color:#1a1a2e;flex:1}
.ditbl{width:100%;border-collapse:collapse;font-size:12px}
.ditbl th{background:#d0d5dd;color:#1a1a2e;font-weight:700;padding:5px 6px;text-align:left;border-bottom:1px solid #ccc}
.ditbl td{padding:4px 6px;border-bottom:1px solid #eee;color:#1a1a2e}
.ditbl-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}
#itemsBody tr.item-main-row td{vertical-align:middle}
#itemsBody tr.itemDescRow td{vertical-align:middle;padding-top:0;padding-bottom:6px;border-bottom:1px solid #eee}
#itemsBody tr.itemDescRow td.item-aq-col{padding-left:2px;padding-right:2px}
.item-code-col .fItemCode,.item-aq-col .fItemCost{box-sizing:border-box;max-width:100%}
.item-code-col .fItemCode{width:92px}
.item-aq-col .item-aq-row{display:grid;grid-template-columns:auto 12px 1fr;gap:2px;align-items:center;width:92px}
.item-aq-col .item-aq-lbl{font-size:9px;color:#6b7280;font-weight:700;line-height:1}
.item-aq-cur,.ord-cost-cur{font-size:10px;font-weight:700;color:#c0392b;line-height:1}
.item-aq-col .fItemCost,#noCostoAcq,#a_71646,#a_77316{color:#c0392b;font-weight:700}
.item-aq-col .fItemCost:hover,
.item-aq-col .fItemCost:focus{
  background:#fff9db !important;
  border-color:#facc15 !important;
  box-shadow:0 0 0 2px rgba(250,204,21,.35);
  outline:none;
}
.ord-cost-paste-src:hover,
.ord-cost-paste-src:focus{
  border-color:#2980b9 !important;
  box-shadow:0 0 0 2px rgba(41,128,185,.2);
}
.item-aq-col .fItemCost{width:100%;min-width:0;text-align:right}
#itemsBody tr.item-main-row .dedit{box-sizing:border-box;height:28px;line-height:1.2}
#itemsBody tr.item-main-row .fItemQty{width:54px}
#itemsBody tr.item-main-row .fItemPrice,#itemsBody tr.item-main-row .fItemTot{width:82px}
#itemsBody tr.item-main-row .fItemDisc{width:52px}
#itemsBody tr.item-main-row .fItemUsc{width:74px}
#itemsBody tr.item-main-row .fItemIva{width:48px}
/* Campi editabili del dettaglio (web sostituisce desktop: tutto editabile) */
.dedit{padding:4px 7px;border:1px solid #b9c0cc;border-radius:4px;font-size:12px;background:#fff;color:#1a1a2e;font-family:inherit}
.dedit:focus{outline:none;border-color:#8e44ad;box-shadow:0 0 0 2px rgba(142,68,173,.15)}
.cum-step{display:inline-block;padding:4px 10px;border-radius:999px;font-size:11px;font-weight:600;border:1px solid #dde3ea;background:#f4f6f9;color:#5d6d7e}
.cum-step-active{border-color:#2c6cb5;background:#eaf2fb;color:#1a5276}
.cum-step-done{border-color:#27ae60;background:#e8f8ef;color:#145a32}
.cum-step-error{border-color:#c0392b;background:#fdecea;color:#922b21}
/* Modale conferme sequenziali (replica messagebox desktop _crea_doc_fic) */
.cfm-ov{display:none;position:fixed;inset:0;background:rgba(26,26,46,.5);z-index:2000;align-items:center;justify-content:center;padding:16px}
#cfmOverlay{z-index:12000}
#anaPendingOverlay,#anaSyncOverlay{z-index:2500}
.cfm-box{background:#fff;border-radius:10px;max-width:460px;width:100%;box-shadow:0 14px 44px rgba(0,0,0,.35);overflow:hidden}
.cfm-h{padding:12px 16px;font-size:14px;font-weight:700;color:#fff}
.cfm-b{padding:16px;font-size:13px;color:#1a1a2e;white-space:pre-line;line-height:1.5}
.cfm-f{padding:10px 16px;display:flex;gap:8px;justify-content:flex-end;border-top:1px solid #eee}
  .cfm-btn{padding:7px 16px;border:none;border-radius:5px;font-size:12px;font-weight:700;cursor:pointer}
/* Barra modulo: logo sempre arancione */
.pt-module-bar .pt-logo,.pt-module-bar .pt-logo .pt-spark{color:#e67800!important}
.pt-module-bar .pt-logo:hover{color:#c96800!important}
/* Legenda pallini — riga dedicata sotto i filtri */
.tb-leg{display:flex;flex-wrap:wrap;align-items:center;gap:8px;background:var(--bg-card);border-radius:10px;padding:4px 10px;margin-bottom:4px}

/* Legenda colori riga — dentro Guida rapida Lista ordini */
.pt-order-color-legend{list-style:none;margin:8px 0 0;padding:0;display:flex;flex-direction:column;gap:6px}
.pt-order-color-legend li{display:flex;align-items:flex-start;gap:8px;font-size:12px;line-height:1.45}
.pt-leg-swatch{display:inline-block;min-width:52px;padding:2px 8px;border-radius:4px;border:1px solid rgba(0,0,0,.12);font-size:11px;font-weight:700;text-align:center;flex-shrink:0}

/* ─── RIFINITURE WEB (responsive/usabilita') — NON tocca flag/DOCS grid ─── */
/* Il dettaglio diventa una colonna scorrevole comoda anche su schermi piccoli. */
#detailModal{ -webkit-overflow-scrolling:touch }
/* iPhone + iPad portrait (≤900) e iPad landscape touch (≤1100 + pointer:coarse). Mac tipici restano desktop. */
@media (max-width: 900px), (max-width: 1100px) and (pointer: coarse){
  .wrap{padding:6px}
  /* toolbar: i controlli vanno a capo in modo ordinato */
  .tb, .tb2{gap:5px;padding:6px 8px}
  h1{font-size:15px;flex:1 1 100%}
  /* Cerca / filtri: usabili a una mano su iPhone */
  .tb2 #searchField{flex:0 0 auto}
  .tb2 #searchInp{width:100%!important;flex:1 1 100%;min-width:0;font-size:16px;padding:10px 12px;min-height:44px}
  .tb2 > button.btn{min-height:44px;padding:10px 14px;font-size:13px}
  .tb2 > div[style*="display:flex"]{flex-wrap:wrap;margin-left:0!important;width:100%;gap:6px}
  .tb2 .leg-btn{min-height:36px;display:inline-flex;align-items:center;padding:6px 10px!important;font-size:12px!important}
  .tb2 #statoSel{width:100%!important;margin-left:0!important;min-height:44px;font-size:14px}
  .tb-leg{gap:6px;padding:6px 8px;font-size:11px}
  .tb-leg > span{font-size:11px}
  .actbar{gap:8px;padding:10px}
  .actbar .selcount{flex:1 1 100%;font-size:13px}
  .act-btn{min-height:44px;padding:10px 14px;font-size:12px}
  /* la modale dettaglio occupa quasi tutto lo schermo ed e' scrollabile */
  #detailModal{padding:6px;align-items:stretch}
  #detailModal > div{max-width:100%;max-height:100vh;display:flex;flex-direction:column}
  #detailBody{flex:1 1 auto;overflow:auto;-webkit-overflow-scrolling:touch}
  /* non tagliare lo scroll orizzontale delle tabelle dettaglio */
  #detailModal > div{overflow:visible}
  .dsec{overflow:visible}
  .dsec-b{overflow-x:visible;max-width:100%}
  /* Righe ordine: swipe a destra per Sconto / Totale / X */
  .ditbl-scroll{
    overflow-x:auto!important;-webkit-overflow-scrolling:touch;
    margin:0 -4px;padding:0 4px 8px;max-width:100%;
    touch-action:pan-x pan-y;
  }
  .ditbl-scroll .ditbl--order-lines{
    width:max-content!important;min-width:720px;table-layout:auto
  }
  .ditbl-scroll .ditbl--order-lines th,
  .ditbl-scroll .ditbl--order-lines td{
    overflow:visible;text-overflow:unset;white-space:nowrap
  }
  .ditbl-scroll .ditbl--order-lines .fItemName,
  .ditbl-scroll .ditbl--order-lines .fItemDesc{min-width:140px;white-space:normal}
  .ditbl-scroll .ditbl--order-lines .dedit{min-height:40px;font-size:16px}
  /* header/footer pulsanti: restano leggibili, vanno a capo */
  #detailModal .dbtn{font-size:11px;padding:6px 10px;min-height:40px}
  /* etichette campi: su mobile vanno sopra al valore (piu' spazio) */
  .dfield{flex-direction:column;align-items:stretch}
  .dfield .dlab{min-width:0;margin-bottom:2px}
  .dedit, .dfield .dval input, .dfield .dval select, .dfield .dval textarea{width:100%}

  /* ── Lista ordini: righe tabella + swipe orizzontale (no card) ──
     Desktop ≥901px invariato. Non altera .flagdocs-grid (26px+30px). */
  .tbl-wrap--orders{
    overflow-x:auto!important;
    -webkit-overflow-scrolling:touch;
    max-width:100%;
    touch-action:pan-x pan-y;
    margin:0 -4px;
    padding:0 4px 6px;
  }
  .tbl-wrap--orders > table{
    width:max-content!important;
    min-width:960px;
    table-layout:auto;
    border-collapse:collapse;
  }
  .tbl-wrap--orders > table thead th{
    position:sticky;
    top:0;
    z-index:2;
    background:#f4f6f8;
    white-space:nowrap;
    font-size:11px;
    padding:6px 8px;
  }
  .tbl-wrap--orders > table tbody tr{
    cursor:pointer;
    -webkit-tap-highlight-color:rgba(142,68,173,.12);
  }
  .tbl-wrap--orders > table tbody tr:active{opacity:.92}
  .tbl-wrap--orders > table tbody td{
    white-space:nowrap;
    overflow:visible;
    text-overflow:unset;
    padding:7px 8px;
    font-size:12px;
    vertical-align:middle;
  }
  .tbl-wrap--orders .col-eur{width:30px;padding:2px 1px}
  .tbl-wrap--orders .col-flagdocs{width:58px;padding:0 2px 0 0}
  .tbl-wrap--orders .col-ana{width:52px;padding:0 2px}
  .tbl-wrap--orders .col-ord{min-width:88px}
  .tbl-wrap--orders .col-cli{min-width:150px;max-width:220px;white-space:normal}
  .tbl-wrap--orders .col-cli .cli-name-wrap,
  .tbl-wrap--orders .col-cli .cli-name-wrap > span{
    overflow:visible!important;
    text-overflow:unset!important;
    white-space:normal!important;
    max-width:none;
  }
  .tbl-wrap--orders .col-data{min-width:74px;text-align:center}
  .tbl-wrap--orders .col-job{min-width:110px;white-space:normal}
  .tbl-wrap--orders .col-art{min-width:130px;white-space:normal}
  .tbl-wrap--orders .col-qty{min-width:52px;text-align:center}
  .tbl-wrap--orders .col-fatt{min-width:72px;font-size:11px;text-align:center}
  .tbl-wrap--orders .col-stato{min-width:110px;white-space:normal;text-align:center}
  tr.row-merce-pronta{box-shadow:inset 4px 0 0 #e65100}

  /* Tab spedizioni / rubriche — stack + scroll touch */
  .sped-grid{grid-template-columns:1fr 1fr!important}
  .sped-grid .sped-wide{grid-column:1/-1}
  .sped-btn-lg{min-height:44px;width:100%;max-width:100%}
  .sped-row{gap:8px}
  .sped-pkg-row{gap:6px}
  .pkg-box-wrap{width:100%;max-width:100%}
  .fx-subtabs .btn{min-height:44px;flex:1 1 calc(50% - 6px)}
  .tbl-wrap:has(.fx-art-rub-table),
  .tbl-wrap:has(.fx-fic-rub-table),
  .tbl-wrap:has(.fx-tnt-rub-table),
  .tbl-wrap:has(.fx-box-rub-table){
    overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%
  }
  .fx-art-rub-table,.fx-fic-rub-table,.fx-tnt-rub-table,.fx-box-rub-table{
    min-width:640px
  }
  .fx-art-rub-table td.fx-art-col-actions .btn,
  .fx-fic-rub-table .btn,
  .fx-tnt-actions .btn{
    min-height:40px;padding:8px 10px;font-size:12px
  }
  .fx-customs-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
  .fx-origin-select{min-width:0;max-width:100%;width:100%}
}
@media (max-width: 560px){
  html,body{font-size:13px}
  th,td{padding:5px 3px;font-size:12px}
  .col-cli{width:24%}
  .btn,.act-btn{font-size:11px}
  .sped-grid{grid-template-columns:1fr!important}
  /* la griglia indirizzo editabile passa a 1 colonna */
  #detailBody [style*="grid-template-columns:90px"]{grid-template-columns:1fr!important}
  .tbl-wrap--orders > table{min-width:900px}
  .tbl-wrap--orders > table tbody td{padding:6px 6px;font-size:11px}
}
/* Tabella lista: scroll orizzontale fluido su touch (gia' overflow-x:auto). */
.tbl-wrap{ -webkit-overflow-scrolling:touch }
.pt-recipient-chips{display:flex;flex-wrap:nowrap;gap:4px;margin:6px 0 8px;overflow-x:auto}
.pt-recipient-chip{display:inline-flex;align-items:center;gap:4px;flex-shrink:0;white-space:nowrap;padding:4px 8px;border-radius:999px;font-size:11px;font-weight:600;background:#f3f4f6;border:1px solid #e5e7eb;color:#374151;cursor:pointer;user-select:none}
.pt-recipient-chip:has(input:checked){background:#ede9fe;border-color:#8e44ad;color:#6b21a8}
.pt-recipient-chip input{accent-color:#8e44ad;cursor:pointer}
.pt-recipient-chips[data-all-selected="1"] .pt-recipient-chip:not(.pt-recipient-all){opacity:.72}
.pt-recipient-all:has(input:checked){background:#ecfdf5;border-color:#10b981;color:#047857}
.pt-recipient-name.online{color:#16a34a!important;font-weight:700}
.pt-recipient-chip:has(input:checked) .pt-recipient-name.online{color:#16a34a!important}
.pt-recipient-chips[data-all-selected="1"] .pt-recipient-name.online{opacity:1}
/* Commenti team — feed (solo lettura) vs compose (azione) */
.pt-comments-feed-label{font-size:11px;font-weight:600;color:#9ca3af;text-transform:uppercase;letter-spacing:.05em;margin:0 0 6px}
#ptCommentsList{max-height:220px;overflow:auto;padding:6px 2px;margin-bottom:10px;font-size:13px;color:#4a4a6a;border:1px solid #eef0f3;border-radius:10px;background:#f9fafb}
#ptCommentsList.pt-comments-list--empty{border:none;background:transparent;padding:12px 8px 4px;min-height:72px;display:flex;align-items:center;justify-content:center}
.pt-comments-empty{text-align:center;padding:4px 8px;pointer-events:none;user-select:none}
.pt-comments-empty-icon{display:block;font-size:1.75rem;line-height:1;margin-bottom:8px;opacity:.88}
.pt-comments-empty-title{margin:0 0 4px;font-size:13px;font-weight:700;color:#6b7280}
.pt-comments-empty-sub{margin:0;font-size:11px;color:#9ca3af;line-height:1.45;max-width:260px;margin-inline:auto}
.pt-comments-empty-arrow{display:block;margin-top:8px;font-size:13px;color:#c4b5fd;opacity:.85}
.pt-comments-compose{padding:12px;background:#fff;border:1px solid #e5e7eb;border-radius:10px;box-shadow:0 1px 3px rgba(0,0,0,.04)}
.pt-comments-compose-section+.pt-comments-compose-section{margin-top:10px;padding-top:10px;border-top:1px dashed #e5e7eb}
.pt-comments-compose-label{display:block;font-size:11px;font-weight:700;color:#4b5563;text-transform:uppercase;letter-spacing:.04em;margin-bottom:4px}
.pt-recipient-hint{font-size:11px;color:#9ca3af;margin:0 0 6px;line-height:1.35}
.pt-comments-input-row{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
#ptCommentInput{flex:1;min-width:160px;padding:8px 10px;border:1px solid #c5cad3;border-radius:6px;font-size:13px;background:#fff}
.pt-comment-reply-link{display:inline-block;margin-top:6px;font-size:11px;font-weight:700;color:#8e44ad;background:none;border:none;padding:0;cursor:pointer;text-decoration:underline}
.pt-comment-reply-link:hover{color:#6b21a8}

#toastWrap{
  position:fixed; top:18px; left:50%; transform:translateX(-50%);
  z-index:12000; display:flex; flex-direction:column; gap:10px;
  align-items:center; width:auto; max-width:min(92vw,560px); pointer-events:none;
}
.toast{
  pointer-events:auto; display:flex; align-items:flex-start; gap:10px;
  min-width:260px; max-width:100%; padding:13px 16px; border-radius:12px;
  font-size:13.5px; line-height:1.4; color:#fff; font-weight:500;
  box-shadow:0 8px 28px rgba(0,0,0,.18); border:1px solid rgba(255,255,255,.18);
  background:#3a3f5a; opacity:0; transform:translateY(-12px);
  transition:opacity .22s ease, transform .22s ease; word-break:break-word;
}
.fic-tpl-card{border:1px solid #dde1e6;border-radius:8px;padding:10px 12px;margin-bottom:10px;background:#fafbfc}
.fic-tpl-card-hdr{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:6px}
.fic-tpl-card-title{font-weight:700;color:#1a5276}
.fic-tpl-card-key{font-size:11px;color:#666;background:#eef2f6;padding:2px 8px;border-radius:999px}
.fic-tpl-card-meta{font-size:11px;color:#888}
.fic-tpl-card-rows{color:#4a4a6a;line-height:1.45;white-space:pre-wrap;margin:6px 0 8px}
.fic-tpl-card-actions{display:flex;flex-wrap:wrap;gap:8px}
.fic-tpl-flag{font-size:10px;font-weight:700;color:#117a65;background:#e8f5ee;padding:2px 7px;border-radius:999px}
.toast.toast-success{ background:linear-gradient(135deg,#1e9e5a,#16864b); }
.toast.toast-error{   background:linear-gradient(135deg,#d64545,#b5302f); }
.toast.toast-info{    background:linear-gradient(135deg,#5b6b8c,#48567a); }
.toast.toast-warning{ background:linear-gradient(135deg,#d68910,#b9770e); }
.toast .toast-ic{ flex:0 0 auto; font-size:16px; line-height:1.3; }
.toast .toast-msg{ flex:1 1 auto; white-space:pre-wrap; word-break:break-word; }
.toast .toast-msg a{ color:#fff; text-decoration:underline; font-weight:700; }
.toast .toast-x{
  flex:0 0 auto; background:rgba(255,255,255,.18); border:none; color:#fff;
  width:22px; height:22px; border-radius:6px; cursor:pointer; font-size:14px;
  font-weight:800; line-height:1; display:flex; align-items:center; justify-content:center;
  padding:0; transition:background .15s ease;
}
.toast .toast-x:hover{ background:rgba(255,255,255,.34); }
.pt-btn-busy{ opacity:.65 !important; cursor:wait !important; }
/* Barra stato globale — solo CSS animato, zero timer JS */
.pt-global-busy{
  position:fixed; top:0; left:0; right:0; z-index:99990;
  pointer-events:none; opacity:0; visibility:hidden;
  transition:opacity .12s ease, visibility .12s ease;
}
.pt-global-busy.show{ opacity:1; visibility:visible; }
.pt-global-busy-bar{
  height:3px; width:100%;
  background:linear-gradient(90deg, transparent 0%, var(--accent,#e67800) 45%, #ffb347 55%, transparent 100%);
  background-size:220% 100%;
  animation:ptBusySlide 1.1s linear infinite;
}
.pt-global-busy-label{
  position:fixed; top:6px; left:50%; transform:translateX(-50%);
  max-width:min(92vw,520px); padding:5px 14px; border-radius:999px;
  background:rgba(34,34,48,.93); color:#fff; font-size:11px; font-weight:700;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  box-shadow:0 4px 18px rgba(0,0,0,.22);
}
body.pt-global-busy-active{ cursor:wait; }
@keyframes ptBusySlide{
  0%{ background-position:200% 0; }
  100%{ background-position:-200% 0; }
}
@media (max-width:600px){ #toastWrap{ top:10px; left:8px; right:8px; transform:none; max-width:none; } }

/* Allegati email archiviate — download + ↑ WC + ↑ Drive (come Mail) */
.wc-email-att-list{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.wc-email-att-row{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px;
}
.wc-email-att-name{
  font-size:12px;
  color:#1a1a2e;
  min-width:0;
  flex:1 1 160px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.wc-email-att-actions{
  display:inline-flex;
  flex-wrap:wrap;
  align-items:center;
  gap:4px;
  flex:0 0 auto;
}
.wc-email-att-dl,
.wc-email-att-wc,
.wc-email-att-drive{
  padding:4px 9px!important;
  font-size:11px!important;
  font-weight:700;
  line-height:1.2;
  min-width:0;
  margin:0!important;
  box-shadow:0 1px 3px rgba(0,0,0,.12);
}
.wc-email-att-dl{
  background:#0099ff!important;
  color:#fff!important;
  border:1px solid #007acc!important;
}
.wc-email-att-dl:hover{
  background:#0080ff!important;
  opacity:1;
}
.wc-email-att-wc{
  background:linear-gradient(180deg,#7c3aed 0%,#5b21b6 100%)!important;
  color:#fff!important;
  border:1px solid #5b21b6!important;
}
.wc-email-att-drive{
  background:linear-gradient(180deg,#34a853 0%,#1e8e3e 100%)!important;
  color:#fff!important;
  border:1px solid #1e8e3e!important;
}

/* Toolbar + modale collega email da posta (dettaglio ordine) */
.pt-ord-emails-toolbar{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  align-items:center;
}
.pt-ord-inbox-box{
  max-width:560px;
  width:95vw;
  max-height:88vh;
  display:flex;
  flex-direction:column;
}
.pt-ord-inbox-hint{
  font-size:12px;
  color:#4a4a6a;
  margin:0 0 10px;
  line-height:1.45;
}
.pt-ord-inbox-q{
  width:100%;
  margin-bottom:10px;
  box-sizing:border-box;
}
.pt-ord-inbox-body{
  max-height:min(52vh,420px);
  overflow-y:auto;
  margin:0 -4px;
  padding:0 4px 4px;
}
.pt-ord-inbox-row{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 10px;
  margin-bottom:6px;
  background:#f4f6f9;
  border-radius:6px;
  border:1px solid #e0e4ea;
}

/* Mapping trasporto FIC ↔ WeClapp */
.pt-freight-map-hint{
  margin:8px 0 0;
  padding:6px 10px;
  font-size:12px;
  line-height:1.4;
  color:#1a5276;
  background:#eef6fb;
  border:1px solid #b8d4e8;
  border-radius:6px;
}
.pt-freight-map-hint code{
  font-size:11px;
  font-weight:700;
  padding:1px 5px;
  border-radius:4px;
  background:#fff;
  color:#0b3d5c;
  border:1px solid #c5d8e8;
}
.pt-freight-code-hint{
  margin-top:3px;
  font-size:10px;
  font-weight:700;
  color:#1a6a9a;
  line-height:1.2;
}

.pt-flow-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 8px 0 10px;
}
.pt-flow-path {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px dashed #cbd5e1;
  background: #fafafa;
}
.pt-flow-path-title {
  font-size: 12px;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 6px;
}
.pt-flow-path .sped-row { margin-bottom: 0; }
@media (max-width: 900px) {
  .pt-flow-split { grid-template-columns: 1fr; }
}

.awb-mode-tabs {
  margin: 0 0 10px;
  border-radius: 12px;
}
.awb-mode-tabs .pt-orders-tab {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
@media (max-width: 900px) {
  .awb-mode-tabs .pt-orders-tab {
    white-space: normal;
    text-align: center;
  }
}
