
:root{
  --blue:#0866f6;
  --blue2:#0052d9;
  --bg:#f7f9fc;
  --card:#ffffff;
  --line:#e7eaf0;
  --text:#101828;
  --muted:#667085;
  --green:#16a34a;
  --orange:#f59e0b;
  --purple:#7c3aed;
  --red:#ef4444;
  --shadow:0 8px 25px rgba(16,24,40,.06);
}
*{box-sizing:border-box;margin:0;padding:0;font-family:Arial,Helvetica,sans-serif}
body{background:var(--bg);color:var(--text)}
button,input,select,textarea{font:inherit}
button{border:0;cursor:pointer}
a{text-decoration:none;color:var(--blue)}
.hidden{display:none!important}
.auth-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#eef5ff,#fff);padding:20px}
.auth-card{width:100%;max-width:470px;background:#fff;border:1px solid var(--line);border-radius:28px;padding:30px;box-shadow:var(--shadow)}
.auth-card img{display:block;width:100%;max-width:330px;margin:0 auto 20px}
.auth-card h1{text-align:center;font-size:28px;color:var(--blue);margin-bottom:8px}
.auth-card p{text-align:center;color:var(--muted);margin-bottom:20px}
.tabs{display:grid;grid-template-columns:1fr 1fr;background:#f1f5f9;border-radius:16px;padding:5px;margin-bottom:18px}
.tabs button{background:transparent;border-radius:12px;padding:12px;font-weight:700;color:#64748b}
.tabs button.active{background:#fff;color:var(--blue);box-shadow:0 3px 10px rgba(0,0,0,.08)}
label{display:block;font-weight:700;font-size:13px;margin-bottom:13px}
input,select,textarea{width:100%;margin-top:7px;border:1px solid #d9dee8;border-radius:12px;padding:12px;background:#fff}
textarea{min-height:95px;resize:vertical}
.btn{padding:12px 16px;border-radius:12px;font-weight:800;background:#edf4ff;color:var(--blue)}
.btn.primary{background:linear-gradient(135deg,var(--blue),var(--blue2));color:#fff}
.btn.green{background:#12b76a;color:#fff}
.btn.gray{background:#f1f5f9;color:#334155}
.btn.red{background:#fee2e2;color:#991b1b}
.shell{min-height:100vh;display:grid;grid-template-columns:286px 1fr}
.sidebar{background:#fff;border-right:1px solid var(--line);display:flex;flex-direction:column;justify-content:space-between;padding:18px 20px}
.logo-box{height:95px;display:flex;align-items:center}
.logo-box img{width:240px;max-height:85px;object-fit:contain}
.nav{margin-top:8px}
.nav button{width:100%;background:transparent;text-align:left;padding:14px 16px;border-radius:12px;margin-bottom:8px;font-size:15px;color:#101828}
.nav button.active,.nav button:hover{background:linear-gradient(135deg,var(--blue),var(--blue2));color:#fff}
.nav .dot{display:inline-flex;width:22px;margin-right:10px;justify-content:center}
.help-box{border:1px solid var(--line);border-radius:16px;background:#fff;padding:18px;margin-bottom:10px}
.help-box p{font-size:13px;color:var(--muted);line-height:1.45;margin-bottom:12px}
.help-box button{width:100%}
.main-wrap{display:flex;flex-direction:column;min-width:0}
.topbar{height:78px;background:#fff;border-bottom:1px solid var(--line);display:flex;justify-content:flex-end;align-items:center;padding:0 34px;gap:18px}
.bell{position:relative;font-size:22px}
.bell span{position:absolute;top:-10px;right:-10px;background:#ef4444;color:#fff;border-radius:50%;font-size:11px;padding:3px 6px;font-weight:800}
.user-info{display:flex;align-items:center;gap:10px}
.avatar{width:38px;height:38px;border:2px solid #0f172a;border-radius:50%;display:flex;align-items:center;justify-content:center}
.user-info b{display:block;font-size:14px}
.user-info small{display:block;color:var(--muted)}
.logout{background:#fff;border:1px solid #d9dee8;padding:10px 18px;border-radius:10px;font-weight:800}
.content{padding:30px 38px}
.hero{margin-bottom:22px}
.hero h1{font-size:28px;margin-bottom:8px}
.hero p{color:var(--muted)}
.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin-bottom:20px}
.stat{background:#fff;border:1px solid var(--line);border-radius:16px;padding:22px;box-shadow:var(--shadow);min-height:126px}
.stat-row{display:flex;align-items:center;gap:18px}
.ico{width:56px;height:56px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:25px}
.ico.blue{background:var(--blue)}.ico.orange{background:var(--orange)}.ico.green{background:var(--green)}.ico.purple{background:var(--purple)}
.stat span{font-size:14px}.stat strong{display:block;font-size:30px;margin-top:6px}
.stat a{display:block;margin-top:15px;font-size:14px;font-weight:700}
.dash-grid{display:grid;grid-template-columns:1fr 1fr 390px;gap:20px;align-items:start}
.left-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;grid-column:1/3}
.card{background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);overflow:hidden}
.card h3{font-size:18px;padding:20px;border-bottom:1px solid var(--line)}
.card-body{padding:18px}
.ticket,.device,.quote,.customer{border-bottom:1px solid var(--line);padding:14px 0}
.ticket:first-child,.device:first-child,.quote:first-child,.customer:first-child{padding-top:0}
.ticket:last-child,.device:last-child,.quote:last-child,.customer:last-child{border-bottom:0;padding-bottom:0}
.ticket-top{display:flex;justify-content:space-between;gap:10px}
.ticket h4,.device h4,.quote h4,.customer h4{font-size:14px;margin-bottom:6px}
.muted{font-size:13px;color:var(--muted);line-height:1.45}
.badge{display:inline-block;border-radius:999px;padding:5px 9px;font-size:11px;font-weight:800}
.open{background:#dbeafe;color:#1d4ed8}.work{background:#fef3c7;color:#92400e}.closed{background:#dcfce7;color:#166534}.wait{background:#ede9fe;color:#6d28d9}.danger{background:#fee2e2;color:#991b1b}
.center-btn{display:block;width:220px;margin:18px auto 0;border:1px solid var(--blue);background:#fff;color:var(--blue);border-radius:10px;padding:11px;font-weight:800;text-align:center}
.device-row{display:flex;justify-content:space-between;align-items:center;gap:10px}
.device-left{display:flex;gap:12px;align-items:center}
.dev-icon{width:38px;height:38px;background:#f1f5f9;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:22px}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.full{grid-column:1/-1}
.form-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}
.form-actions .btn{flex:1}
.preview{background:#f8fafc;border:1px solid var(--line);border-radius:14px;padding:15px;white-space:pre-wrap;font-size:13px;color:#334155}
.cost-row{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.cost-pill{background:#f8fafc;border:1px solid var(--line);border-radius:999px;padding:7px 10px;font-size:12px;color:#334155}
.donut-wrap{display:flex;align-items:center;gap:30px;min-height:210px}
.donut{width:150px;height:150px;border-radius:50%;background:conic-gradient(var(--green) 0 80%,var(--orange) 80% 87%,var(--blue) 87% 100%);display:flex;align-items:center;justify-content:center}
.donut-inner{width:98px;height:98px;border-radius:50%;background:#fff;display:flex;align-items:center;justify-content:center;text-align:center;font-weight:800}
.legend p{margin-bottom:12px;font-size:14px}.legend i{display:inline-block;width:12px;height:12px;border-radius:50%;margin-right:8px}
.page-title{font-size:26px;margin-bottom:20px}
.page-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:20px}
.searchbar{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:16px}
.searchbar input,.searchbar select{max-width:280px;margin-top:0}
.empty{padding:18px;text-align:center;background:#f8fafc;border-radius:12px;color:var(--muted)}
.footer{border-top:1px solid var(--line);background:#fff;padding:14px 36px;display:flex;justify-content:space-between;color:var(--muted);font-size:13px}
@media(max-width:1200px){.dash-grid,.left-grid,.page-grid{grid-template-columns:1fr}.left-grid{grid-column:auto}.stats{grid-template-columns:repeat(2,1fr)}}
@media(max-width:800px){.shell{grid-template-columns:1fr}.sidebar{display:block}.topbar{justify-content:space-between;padding:12px;height:auto}.content{padding:18px}.stats,.form-grid{grid-template-columns:1fr}.dash-grid{grid-template-columns:1fr}.footer{flex-direction:column}.logo-box img{width:210px}}


/* Dashboard tecnico - card statistiche */
.dashboard-stats,
#stats{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(170px,1fr));
  gap:14px;
  margin:16px 0 22px;
}
.dashboard-stats .stat,
#stats .stat{
  background:#fff;
  border:1px solid rgba(15,23,42,.08);
  border-radius:18px;
  padding:18px;
  box-shadow:0 10px 26px rgba(15,23,42,.06);
  position:relative;
  overflow:hidden;
}
.dashboard-stats .stat::after,
#stats .stat::after{
  content:"";
  position:absolute;
  right:-28px;
  top:-28px;
  width:86px;
  height:86px;
  border-radius:50%;
  background:rgba(15,23,42,.05);
}
.dashboard-stats .stat-icon,
#stats .stat-icon{
  font-size:26px;
  margin-bottom:8px;
}
.dashboard-stats .stat h3,
#stats .stat h3{
  font-size:30px;
  line-height:1;
  margin:0 0 6px;
}
.dashboard-stats .stat p,
#stats .stat p{
  margin:0;
  color:#64748b;
  font-weight:600;
}


/* FIX DEFINITIVO: mesi Gennaio-Dicembre sempre su una sola riga */
.monthly-grid.twelve-months-grid,
div.monthly-grid.twelve-months-grid{
  display:grid !important;
  grid-template-columns:repeat(12,minmax(0,1fr)) !important;
  grid-auto-flow:column !important;
  gap:6px !important;
  width:100% !important;
  overflow-x:auto !important;
  padding-bottom:6px !important;
}
.monthly-grid.twelve-months-grid .month-box{
  min-width:0 !important;
  padding:9px 4px !important;
  text-align:center !important;
  border-radius:14px !important;
}
.monthly-grid.twelve-months-grid .month-box b{
  font-size:11px !important;
  line-height:1.1 !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
.monthly-grid.twelve-months-grid .month-box span{
  display:block !important;
  font-size:16px !important;
  line-height:1.15 !important;
  white-space:nowrap !important;
}
.monthly-grid.twelve-months-grid .month-box small{
  font-size:10px !important;
  white-space:nowrap !important;
}
@media(max-width:900px){
  .monthly-grid.twelve-months-grid,
  div.monthly-grid.twelve-months-grid{
    grid-template-columns:repeat(12,72px) !important;
  }
}


/* Campo IVA preventivo sempre visibile anche da smartphone */
.pc-vat-mobile-row{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  margin:0 0 13px !important;
  padding:12px 14px !important;
  border:1px solid var(--line) !important;
  border-radius:12px !important;
  background:#f8fafc !important;
  color:var(--text) !important;
  font-weight:800 !important;
  min-height:48px !important;
  visibility:visible !important;
  opacity:1 !important;
}
.pc-vat-mobile-row input{
  width:22px !important;
  min-width:22px !important;
  height:22px !important;
  margin:0 !important;
  padding:0 !important;
  display:inline-block !important;
  visibility:visible !important;
  opacity:1 !important;
}
.pc-vat-mobile-row span{
  display:inline-block !important;
  line-height:1.25 !important;
}
.quote-decision-amount{
  margin:10px 0 6px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#f8fafc;
  font-size:13px;
  color:#334155;
}
.quote-decision-actions{
  align-items:stretch;
}
@media(max-width:800px){
  .pc-vat-mobile-row{grid-column:1/-1 !important;}
  .quote .ticket-top{align-items:flex-start;}
  .quote-decision-amount{font-size:14px;}
}


/* FIX visibilità IVA preventivi lato cliente */
.quote-amount-side{min-width:120px;text-align:right}
.quote-vat-text{display:inline-block;margin-top:3px;font-size:12px;font-weight:700;color:var(--muted,#64748b);white-space:nowrap}
.quote-decision-amount .badge,.quote-vat-badge{white-space:nowrap}
@media(max-width:900px){
  .quote-amount-side{text-align:left;width:100%;margin-top:8px}
  .quote-vat-text{font-size:13px}
}

/* Dicitura IVA sempre visibile nel riquadro Preventivi cliente */
.quote-vat-visible{display:block!important;margin-top:4px;font-size:12px;font-weight:800;color:#334155;white-space:nowrap;line-height:1.2}
.quote-vat-visible.inline{display:inline-block!important;margin-left:6px;margin-top:0;padding:3px 8px;border-radius:999px;background:#ede9fe;color:#5b21b6;font-size:11px;vertical-align:middle}
.quote-amount-side .quote-vat-badge,.quote-amount-side .quote-vat-text{display:none!important}
@media(max-width:700px){.quote-vat-visible{font-size:13px}.quote-vat-visible.inline{margin-left:0;margin-top:5px;display:block!important;width:max-content}}

/* Riepilogo nome cliente visibile nel pannello tecnico */
.pc-tech-customer-summary{
  margin:8px 0 10px;
  padding:10px 12px;
  border:1px solid rgba(15,23,42,.08);
  border-radius:14px;
  background:rgba(248,250,252,.85);
}
.pc-tech-customer-summary p{margin:3px 0;}

/* Fix 20260515: mostra dati cliente anche nella modifica ticket tecnico */
.pc-tech-edit-customer-box{
  margin:0 0 14px 0;
  padding:14px;
  border:1px solid var(--line);
  border-radius:18px;
  background:rgba(37,99,235,.04);
}
.pc-tech-edit-customer-box h4{
  margin:0 0 10px 0;
  color:var(--ink);
}
.pc-tech-edit-customer-box input[readonly]{
  background:#f8fafc;
  color:var(--ink);
  font-weight:700;
}



/* RESET SCROLL NATIVO scroll_clean_native_20260515_11
   Nessun contenitore interno forzato: body/pagina intera scrollabile.
   Niente overflow hidden/touch manuale. */
@media(max-width:900px){
  html, body{
    height:auto !important;
    min-height:100% !important;
    max-height:none !important;
    overflow-x:hidden !important;
    overflow-y:auto !important;
    -webkit-overflow-scrolling:touch !important;
    touch-action:pan-y !important;
  }
  #portal:not(.hidden),
  #portal .shell,
  #portal .main-wrap,
  #portal .content,
  #portal .page{
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    overflow:visible !important;
    touch-action:pan-y !important;
  }
  #portal .shell{display:block !important; min-height:100dvh !important;}
  #portal .sidebar{position:relative !important; width:100% !important; min-width:0 !important; height:auto !important; max-height:none !important; overflow:visible !important;}
  #portal .main-wrap{display:flex !important; flex-direction:column !important;}
  #portal .topbar{position:relative !important; overflow-x:auto !important; overflow-y:hidden !important; -webkit-overflow-scrolling:touch !important;}
  #portal .content{padding-bottom:120px !important;}
  #portal input, #portal select, #portal textarea{touch-action:auto !important;}
}


.customer-change-highlight{margin:12px 0;padding:12px 14px;border:1px solid #facc15;background:#fef9c3;border-radius:14px;color:#713f12;box-shadow:0 8px 22px rgba(202,138,4,.10)}
.customer-change-title{font-weight:900;text-transform:uppercase;font-size:12px;letter-spacing:.04em;margin-bottom:4px;color:#854d0e}
.customer-change-detail{display:flex;flex-direction:column;gap:4px;margin-top:8px;font-size:13px;line-height:1.35}
.customer-change-old{opacity:.75;text-decoration:line-through;text-decoration-thickness:1px}
.customer-change-new{font-weight:800;color:#365314}
@media(max-width:700px){.customer-change-highlight{padding:11px 12px}.customer-change-detail{font-size:13px}}

/* Evidenzia temporaneamente il ticket aperto da notifica push cliente */
.ticket.pc-push-ticket-target{
  outline: 3px solid #0b5cff;
  box-shadow: 0 0 0 6px rgba(11,92,255,.14), 0 12px 28px rgba(11,92,255,.18);
  border-radius: 18px;
  transition: box-shadow .25s ease, outline .25s ease;
}

/* V12 evidenziazione ticket da notifica */
.pc-push-ticket-target{outline:4px solid #f59e0b!important;box-shadow:0 0 0 6px rgba(245,158,11,.22),0 12px 35px rgba(0,0,0,.18)!important;border-radius:14px!important;animation:pcPushPulseV12 1s ease-in-out infinite alternate!important;}
@keyframes pcPushPulseV12{from{filter:brightness(1)}to{filter:brightness(1.08)}}

/* Fix 20260519: lista ticket compatta apribile a tendina */
.pc-ticket-accordion{
  padding:0 !important;
  overflow:hidden;
}
.pc-ticket-accordion > summary.pc-ticket-summary{
  list-style:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 16px;
}
.pc-ticket-accordion > summary.pc-ticket-summary::-webkit-details-marker{display:none;}
.pc-ticket-accordion > summary.pc-ticket-summary::before{
  content:'▸';
  font-weight:900;
  margin-right:2px;
}
.pc-ticket-accordion[open] > summary.pc-ticket-summary::before{content:'▾';}
.pc-ticket-summary-main{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}
.pc-ticket-summary-main strong,
.pc-ticket-summary-main span,
.pc-ticket-summary-main small{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.pc-ticket-summary-main span,
.pc-ticket-summary-main small{color:var(--muted);}
.pc-ticket-details{
  border-top:1px solid var(--line);
  padding:12px 16px 16px;
}
.pc-ticket-details > .ticket{
  margin:0;
  border:0;
  box-shadow:none;
  padding:0;
  background:transparent;
}
@media(max-width:700px){
  .pc-ticket-accordion > summary.pc-ticket-summary{padding:12px;align-items:flex-start;}
  .pc-ticket-details{padding:10px 12px 14px;}
  .pc-ticket-summary-main strong,
  .pc-ticket-summary-main span,
  .pc-ticket-summary-main small{white-space:normal;}
}

/* Fix 20260519: pannello tecnico più compatto nella lista ticket */
.pc-tech-ticket-compact-card{
  padding:12px 14px !important;
}
.pc-tech-ticket-compact-card .ticket-top{
  gap:10px;
}
.pc-tech-ticket-compact-card .ticket-top h4{
  margin-bottom:4px;
}
@media(max-width:700px){
  .pc-tech-ticket-compact-card{padding:10px 12px !important;}
}


/* Fix mirato 20260519_9: pannello tecnico > Tutti i ticket più compatto, senza cambiare funzioni */
#allTickets .pc-tech-ticket-compact-card{
  padding:8px 10px !important;
}
#allTickets .pc-tech-ticket-compact-card .ticket-top{
  gap:8px !important;
  align-items:flex-start;
}
#allTickets .pc-tech-ticket-compact-card .ticket-top > div:first-child{
  min-width:0;
}
#allTickets .pc-tech-ticket-compact-card .ticket-top h4{
  font-size:13px !important;
  margin:0 0 3px !important;
  line-height:1.25;
}
#allTickets .pc-tech-ticket-compact-card .ticket-top p.muted{
  font-size:12px !important;
  line-height:1.25 !important;
  margin:2px 0 !important;
}
#allTickets .pc-tech-ticket-compact-card .ticket-top .badge{
  padding:4px 8px !important;
  font-size:10px !important;
}
#allTickets .pc-tech-ticket-compact-card .ticket-top .btn{
  padding:7px 9px !important;
  font-size:12px !important;
  margin-top:5px !important;
}
#allTickets .pc-tech-ticket-compact-card .tech-ticket-detail{
  margin-top:10px !important;
  padding-top:10px !important;
}
@media(max-width:700px){
  #allTickets .pc-tech-ticket-compact-card{padding:7px 8px !important;}
  #allTickets .pc-tech-ticket-compact-card .ticket-top{gap:6px !important;}
}


/* Fix mirato 20260519_10: pannello tecnico > Tutti i ticket come vere tendine chiuse */
#allTickets .ticket:not(.pc-tech-ticket-open){
  padding:6px 8px !important;
  margin-bottom:6px !important;
}
#allTickets .ticket:not(.pc-tech-ticket-open) .ticket-top{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  align-items:center !important;
  gap:8px !important;
}
#allTickets .ticket:not(.pc-tech-ticket-open) .ticket-top > div:first-child{
  min-width:0 !important;
}
#allTickets .ticket:not(.pc-tech-ticket-open) .ticket-top > div:first-child > *:not(h4){
  display:none !important;
}
#allTickets .ticket:not(.pc-tech-ticket-open) .ticket-top h4{
  margin:0 !important;
  font-size:13px !important;
  line-height:1.2 !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
#allTickets .ticket:not(.pc-tech-ticket-open) .ticket-top > div:last-child{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:6px !important;
  text-align:right !important;
  min-width:max-content !important;
}
#allTickets .ticket:not(.pc-tech-ticket-open) .ticket-top > div:last-child br{
  display:none !important;
}
#allTickets .ticket:not(.pc-tech-ticket-open) .ticket-top > div:last-child button:not([onclick*="toggleTechTicket"]),
#allTickets .ticket:not(.pc-tech-ticket-open) .ticket-top > div:last-child .pc-tech-billing-list-btn{
  display:none !important;
}
#allTickets .ticket:not(.pc-tech-ticket-open) .ticket-top .badge{
  padding:3px 7px !important;
  font-size:10px !important;
  white-space:nowrap !important;
}
#allTickets .ticket:not(.pc-tech-ticket-open) button[onclick*="toggleTechTicket"]{
  margin-top:0 !important;
  padding:5px 8px !important;
  font-size:11px !important;
  white-space:nowrap !important;
}
#allTickets .ticket.pc-tech-ticket-open{
  margin-bottom:10px !important;
}
@media(max-width:700px){
  #allTickets .ticket:not(.pc-tech-ticket-open){
    padding:6px 7px !important;
    margin-bottom:5px !important;
  }
  #allTickets .ticket:not(.pc-tech-ticket-open) .ticket-top{
    grid-template-columns:minmax(0,1fr) auto !important;
    gap:5px !important;
  }
  #allTickets .ticket:not(.pc-tech-ticket-open) .ticket-top h4{
    font-size:12px !important;
  }
  #allTickets .ticket:not(.pc-tech-ticket-open) .ticket-top .badge{
    font-size:9px !important;
    padding:3px 5px !important;
  }
  #allTickets .ticket:not(.pc-tech-ticket-open) button[onclick*="toggleTechTicket"]{
    padding:5px 7px !important;
    font-size:10px !important;
  }
}

/* Fix 20260519: Modifica ticket visibile anche sulla tendina chiusa */
.pc-ticket-summary-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}
.pc-ticket-summary-edit{
  padding:7px 10px !important;
  font-size:12px !important;
  line-height:1.1;
}
@media(max-width:700px){
  .pc-ticket-summary-actions{align-items:flex-end;flex-direction:column;gap:6px;}
  .pc-ticket-summary-edit{padding:7px 9px !important;}
}

/* Clienti lato tecnico compatti a tendina */
.pc-tech-customer-accordion{
  padding:8px 0;
}
.pc-tech-customer-accordion summary{
  list-style:none;
}
.pc-tech-customer-accordion summary::-webkit-details-marker{
  display:none;
}
.pc-tech-customer-summary-row{
  display:grid;
  grid-template-columns:auto 1.4fr 1.5fr auto auto;
  align-items:center;
  gap:10px;
  cursor:pointer;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
}
.pc-tech-customer-summary-row:before{
  content:"▸";
  font-weight:900;
  color:var(--blue);
  margin-right:2px;
}
.pc-tech-customer-accordion[open] .pc-tech-customer-summary-row:before{
  content:"▾";
}
.pc-tech-customer-title{
  font-weight:900;
  font-size:14px;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.pc-tech-customer-meta{
  color:var(--muted);
  font-size:13px;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.pc-tech-customer-details{
  margin:8px 0 4px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#f8fafc;
}
.pc-tech-customer-type-label{
  display:block;
  margin-top:10px;
  max-width:260px;
}
.pc-tech-customer-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px;
}
@media(max-width:800px){
  .pc-tech-customer-summary-row{
    grid-template-columns:auto 1fr auto;
    gap:7px;
  }
  .pc-tech-customer-meta{
    grid-column:2/-1;
  }
}

/* Dashboard rivenditore: due riepiloghi configurabili senza modificare il resto della dashboard */
.pc-reseller-dashboard-host{
  padding:0 !important;
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
  margin:0 0 22px !important;
}
.pc-reseller-report-head{
  margin:0 0 12px !important;
  padding:0 2px !important;
}
.pc-reseller-dashboard-block{
  background:#fff;
  border:1px solid rgba(15,23,42,.10);
  border-radius:22px;
  box-shadow:0 12px 30px rgba(15,23,42,.07);
  padding:18px;
  margin:0 0 18px;
  overflow:hidden;
}
.pc-reseller-dashboard-block h3{
  margin:0 0 8px;
  color:#0f172a;
  font-size:22px;
  line-height:1.15;
  font-weight:900;
}
.pc-reseller-dashboard-block .muted{
  margin:0 0 16px;
  color:#64748b;
}
.monthly-total-box{
  margin:14px 0 16px;
  padding:18px 20px;
  border-radius:20px;
  background:#0f172a;
  color:#fff;
  box-shadow:0 12px 24px rgba(15,23,42,.12);
}
.monthly-total-box small{
  display:block;
  margin-bottom:8px;
  color:rgba(255,255,255,.75);
  font-size:15px;
}
.monthly-total-box strong{
  display:block;
  font-size:34px;
  line-height:1;
  font-weight:900;
  letter-spacing:-.02em;
}
.pc-reseller-dashboard-block .month-box{
  background:#fff;
  border:1px solid rgba(15,23,42,.10);
  box-shadow:0 4px 12px rgba(15,23,42,.05);
}
@media(max-width:600px){
  .pc-reseller-dashboard-block{padding:14px;border-radius:20px;}
  .monthly-total-box strong{font-size:30px;}
}

/* Stato email chiusura cliente nel dettaglio ticket tecnico */
.pc-closed-email-status{
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--line, #e5e7eb);
  background:#f8fafc;
  font-size:14px;
  line-height:1.45;
}
.pc-closed-email-status.ok{
  background:#ecfdf5;
  border-color:#bbf7d0;
}
.pc-closed-email-status.warn{
  background:#fff7ed;
  border-color:#fed7aa;
}

/* Stato email chiusura visibile anche sulla riga compatta del ticket tecnico */
.pc-closed-email-inline{
  margin-top:6px;
  padding:6px 8px;
  border-radius:10px;
  background:#f8fafc;
  border:1px solid var(--line, #e5e7eb);
  display:inline-block;
}

/* PC Ecology - Preventivo cliente finale / logo rivenditore */
.pc-final-customer-price{
  background:#f8fafc;
  border:1px solid var(--line, #e5e7eb);
  border-radius:12px;
  padding:8px 10px;
  margin-top:6px;
}
.pc-final-customer-price-pill{
  background:#f8fafc;
  border-color:#cbd5e1;
}
.pc-final-customer-list{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:10px;
}
.pc-final-customer-row{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
  padding:10px 12px;
  border:1px solid var(--line, #e5e7eb);
  border-radius:12px;
  background:#fff;
}
.pc-final-customer-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.pc-final-customer-pdf-btn{
  padding:6px 10px !important;
  font-size:12px !important;
  line-height:1.2 !important;
}
.pc-reseller-logo-customer-box{
  margin-top:10px;
  padding:12px;
  border:1px solid var(--line, #e5e7eb);
  border-radius:14px;
  background:#fff;
}
.pc-reseller-logo-current img{
  display:block;
  max-width:170px;
  max-height:90px;
  object-fit:contain;
  margin:8px 0 10px;
  border:1px solid var(--line, #e5e7eb);
  border-radius:10px;
  background:#fff;
  padding:6px;
}
.pc-small-note{font-size:12px;}
@media(max-width:640px){
  .pc-final-customer-row{align-items:flex-start;gap:8px;flex-direction:column;}
  .pc-final-customer-actions{justify-content:flex-start;}
}

/* FIX 20260521_2: azioni compatte nei ticket cliente/rivenditore */
.pc-ticket-summary-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.pc-ticket-summary-delete{margin-top:0!important}
@media(max-width:900px){.pc-ticket-summary-actions{justify-content:flex-start}.pc-ticket-summary-delete,.pc-ticket-summary-edit{padding:8px 10px;font-size:13px}}

/* PC Ecology v66 - Ticket tecnico mobile: riga compatta ma più leggibile */
#allTickets .ticket:not(.pc-tech-ticket-open) .pc-tech-ticket-mobile-line{
  display:block !important;
  margin-top:3px !important;
  color:#64748b !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
#allTickets .ticket:not(.pc-tech-ticket-open) .ticket-top > div:first-child > *:not(.pc-tech-ticket-title):not(.pc-tech-ticket-mobile-line){
  display:none !important;
}
#allTickets .ticket:not(.pc-tech-ticket-open) .pc-tech-ticket-title{
  display:flex !important;
  align-items:center !important;
  min-width:0 !important;
  gap:0 !important;
  font-size:13px !important;
  line-height:1.2 !important;
  margin:0 !important;
}
#allTickets .ticket:not(.pc-tech-ticket-open) .pc-tech-ticket-id{
  flex:0 0 auto !important;
  font-weight:900 !important;
}
#allTickets .ticket:not(.pc-tech-ticket-open) .pc-tech-ticket-customer{
  min-width:0 !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  font-weight:900 !important;
}
#allTickets .ticket:not(.pc-tech-ticket-open) .ticket-top > div:last-child{
  gap:5px !important;
}
#allTickets .ticket:not(.pc-tech-ticket-open) .pc-tech-ticket-indicators{
  margin:0 !important;
  gap:4px !important;
}
#allTickets .ticket:not(.pc-tech-ticket-open) .pc-tech-quote-read-pill,
#allTickets .ticket:not(.pc-tech-ticket-open) .pc-tech-chat-unread-pill{
  margin-top:0 !important;
  width:22px !important;
  height:22px !important;
  min-width:22px !important;
}
#allTickets .ticket:not(.pc-tech-ticket-open) .pc-tech-open-ticket-btn{
  border-radius:999px !important;
  min-width:46px !important;
}
@media(max-width:700px){
  #allTickets .ticket:not(.pc-tech-ticket-open){
    padding:8px 8px !important;
    border-radius:12px !important;
  }
  #allTickets .ticket:not(.pc-tech-ticket-open) .ticket-top{
    grid-template-columns:minmax(0,1fr) auto !important;
    align-items:center !important;
  }
  #allTickets .ticket:not(.pc-tech-ticket-open) .pc-tech-ticket-title{
    font-size:12.5px !important;
  }
  #allTickets .ticket:not(.pc-tech-ticket-open) .pc-tech-ticket-mobile-line{
    font-size:11.5px !important;
    line-height:1.2 !important;
  }
  #allTickets .ticket:not(.pc-tech-ticket-open) .ticket-top .badge.pc-tech-ticket-status-badge{
    max-width:92px !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }
}
@media(max-width:420px){
  #allTickets .ticket:not(.pc-tech-ticket-open) .ticket-top > div:last-child{
    gap:4px !important;
  }
  #allTickets .ticket:not(.pc-tech-ticket-open) .ticket-top .badge.pc-tech-ticket-status-badge{
    max-width:82px !important;
    padding-left:6px !important;
    padding-right:6px !important;
  }
  #allTickets .ticket:not(.pc-tech-ticket-open) .pc-tech-open-ticket-btn{
    padding-left:8px !important;
    padding-right:8px !important;
    min-width:42px !important;
  }
}


/* PC Ecology v67 - Lista ticket tecnico mobile come mockup a 2 righe + filtri a tendina */
#allTickets .ticket:not(.pc-tech-ticket-open) .ticket-top > div:first-child > .pc-tech-ticket-mobile-line{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:8px !important;
  min-width:0 !important;
  width:100% !important;
  margin-top:4px !important;
  color:#475569 !important;
  white-space:nowrap !important;
  overflow:hidden !important;
}
#allTickets .ticket:not(.pc-tech-ticket-open) .pc-tech-ticket-device{
  min-width:0 !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  font-size:12px !important;
  font-weight:700 !important;
}
#allTickets .ticket:not(.pc-tech-ticket-open) .pc-tech-ticket-mobile-status{
  flex:0 0 auto !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  max-width:105px !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  padding:3px 7px !important;
  font-size:10px !important;
  line-height:1.1 !important;
  border-radius:999px !important;
}
#allTickets .ticket:not(.pc-tech-ticket-open) .ticket-top > div:last-child > .pc-tech-ticket-status-badge{
  display:none !important;
}
#allTickets .ticket:not(.pc-tech-ticket-open) .pc-tech-ticket-title{
  gap:0 !important;
  padding-right:2px !important;
}
#allTickets .ticket:not(.pc-tech-ticket-open) .pc-tech-ticket-sep{
  flex:0 0 auto !important;
  padding:0 4px !important;
  color:#64748b !important;
}
#allTickets .ticket:not(.pc-tech-ticket-open) .ticket-top > div:last-child{
  align-self:center !important;
}
@media(max-width:700px){
  #allTickets .ticket:not(.pc-tech-ticket-open){
    padding:8px 9px !important;
    border-radius:14px !important;
  }
  #allTickets .ticket:not(.pc-tech-ticket-open) .ticket-top{
    grid-template-columns:minmax(0,1fr) auto !important;
    align-items:center !important;
    gap:7px !important;
  }
  #allTickets .ticket:not(.pc-tech-ticket-open) .pc-tech-ticket-title{
    font-size:12.8px !important;
    line-height:1.18 !important;
  }
  #allTickets .ticket:not(.pc-tech-ticket-open) .pc-tech-ticket-mobile-line{
    font-size:11.7px !important;
    line-height:1.18 !important;
  }
  #allTickets .ticket:not(.pc-tech-ticket-open) .pc-tech-ticket-indicators{
    gap:4px !important;
  }
  #allTickets .ticket:not(.pc-tech-ticket-open) .pc-tech-open-ticket-btn{
    min-width:44px !important;
    padding:6px 9px !important;
    font-size:11px !important;
  }
}

.pc-tech-ticket-filter-accordion{
  display:block;
  margin:0 0 14px 0;
  border:1px solid var(--line,#e5e7eb);
  border-radius:14px;
  background:#f8fafc;
  overflow:hidden;
}
.pc-tech-ticket-filter-summary{
  list-style:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  cursor:pointer;
  padding:10px 12px;
  font-weight:900;
  color:#0f172a;
}
.pc-tech-ticket-filter-summary::-webkit-details-marker{display:none;}
.pc-tech-ticket-filter-summary:before{
  content:'▸';
  color:var(--blue,#0866f6);
  font-size:14px;
  margin-right:4px;
}
.pc-tech-ticket-filter-accordion[open] .pc-tech-ticket-filter-summary:before{content:'▾';}
.pc-tech-ticket-filter-title{white-space:nowrap;}
.pc-tech-ticket-filter-summary-text{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#64748b;
  font-size:12px;
  font-weight:700;
  text-align:right;
}
.pc-tech-ticket-filter-accordion .searchbar{
  padding:10px 12px 12px !important;
  margin:0 !important;
  border-top:1px solid var(--line,#e5e7eb);
}
@media(max-width:700px){
  .pc-tech-ticket-filter-accordion{margin-bottom:10px;}
  .pc-tech-ticket-filter-accordion:not([open]){background:#fff;}
  .pc-tech-ticket-filter-accordion:not([open]) .searchbar{display:none !important;}
  .pc-tech-ticket-filter-summary{padding:9px 10px;}
}


/* PC Ecology v68 - feedback visivo tendina clienti aperta */
.pc-tech-customer-accordion[open] .pc-tech-customer-summary-row{
  box-shadow:0 10px 24px rgba(15,23,42,.08);
  border-color:rgba(11,99,246,.22);
}
@media(max-width:800px){
  .pc-tech-customer-details{
    animation:pcCustomerDropIn .16s ease-out;
  }
}
@keyframes pcCustomerDropIn{
  from{opacity:.35;transform:translateY(-4px)}
  to{opacity:1;transform:translateY(0)}
}


/* PC Ecology v69 - Ticket tecnico mobile: mockup compatto a 2 righe */
.pc-tech-ticket-mobile-mockup{
  display:none;
}

@media(max-width:700px){
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open){
    padding:7px 8px !important;
    border-radius:16px !important;
    background:#fff !important;
    box-shadow:0 1px 0 rgba(15,23,42,.05) !important;
    overflow:hidden !important;
  }

  /* In chiusura mobile mostro solo il nuovo layout pulito */
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) > .ticket-top{
    display:none !important;
  }

  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) > .pc-tech-ticket-mobile-mockup{
    display:grid !important;
    grid-template-rows:auto auto auto;
    gap:4px;
    min-width:0;
    width:100%;
  }

  #allTickets .ticket.pc-tech-ticket-compact-card.pc-tech-ticket-open > .pc-tech-ticket-mobile-mockup{
    display:none !important;
  }

  #allTickets .pc-tech-mobile-row{
    min-width:0;
    display:flex;
    align-items:center;
    white-space:nowrap;
    overflow:hidden;
  }

  #allTickets .pc-tech-mobile-row-title{
    gap:5px;
    font-size:13px;
    line-height:1.18;
    color:#0f172a;
    font-weight:950;
    letter-spacing:-.15px;
  }

  #allTickets .pc-tech-mobile-id{
    flex:0 0 auto;
    font-weight:950;
  }

  #allTickets .pc-tech-mobile-dot{
    flex:0 0 auto;
    color:#64748b;
    font-weight:800;
  }

  #allTickets .pc-tech-mobile-customer{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-weight:950;
  }


  /* PC Ecology FIX470 - su smartphone la data apertura va su riga separata,
     così non tronca il nome cliente/rivenditore nella testata ticket. */
  #allTickets .pc-tech-mobile-row-open-date{
    font-size:11.5px;
    line-height:1.12;
    color:#64748b;
    font-weight:800;
    margin-top:-1px;
  }

  #allTickets .pc-tech-ticket-open-date-mobile-v467{
    display:block;
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  #allTickets .pc-tech-mobile-row-device{
    width:100%;
    max-width:100%;
    padding-top:1px;
  }

  #allTickets .pc-tech-mobile-row-actions{
    display:flex !important;
    justify-content:flex-end;
    align-items:center;
    gap:7px;
    font-size:12px;
    line-height:1.18;
    color:#475569;
    width:100%;
    max-width:100%;
    overflow:visible;
  }

  #allTickets .pc-tech-mobile-device{
    display:block;
    width:100%;
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-weight:650;
    color:#475569;
  }

  #allTickets .pc-tech-mobile-status{
    flex:0 0 auto;
    min-width:0;
    max-width:102px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    display:inline-flex !important;
    align-items:center;
    justify-content:center;
    padding:3px 6px !important;
    border-radius:999px !important;
    font-size:10px !important;
    line-height:1.1 !important;
    font-weight:950 !important;
  }

  #allTickets .pc-tech-ticket-mobile-mockup .pc-tech-paid-pill{
    flex:0 1 auto !important;
    min-width:0 !important;
    max-width:118px !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;
    padding:3px 8px !important;
    min-height:22px !important;
    font-size:11px !important;
  }

  #allTickets .pc-tech-ticket-mobile-mockup .pc-tech-paid-pill .pc-tech-paid-text{
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;
  }

  #allTickets .pc-tech-ticket-mobile-mockup .pc-tech-ticket-indicators{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:4px !important;
    margin:0 !important;
    min-width:22px !important;
  }

  #allTickets .pc-tech-ticket-mobile-mockup .pc-tech-quote-read-pill,
  #allTickets .pc-tech-ticket-mobile-mockup .pc-tech-chat-unread-pill{
    margin:0 !important;
    width:21px !important;
    min-width:21px !important;
    height:21px !important;
    font-size:13px !important;
    flex:0 0 auto !important;
  }

  #allTickets .pc-tech-mobile-open-btn{
    flex:0 0 auto !important;
    margin:0 !important;
    padding:5px 7px !important;
    min-width:50px !important;
    border-radius:999px !important;
    font-size:11px !important;
    line-height:1.15 !important;
    font-weight:950 !important;
    white-space:nowrap !important;
  }
}

@media(max-width:430px){
  #allTickets .pc-tech-mobile-row-actions{
    gap:5px;
  }

  #allTickets .pc-tech-mobile-status{
    max-width:92px;
  }

  #allTickets .pc-tech-ticket-mobile-mockup .pc-tech-paid-pill{
    max-width:108px !important;
  }
}

@media(max-width:390px){
  #allTickets .pc-tech-mobile-row-title{
    font-size:12.3px;
  }

  #allTickets .pc-tech-mobile-row-actions{
    gap:4px;
  }

  #allTickets .pc-tech-mobile-status{
    max-width:82px;
    font-size:9.5px !important;
    padding-left:5px !important;
    padding-right:5px !important;
  }

  #allTickets .pc-tech-ticket-mobile-mockup .pc-tech-paid-pill{
    max-width:96px !important;
    padding-left:6px !important;
    padding-right:6px !important;
  }

  #allTickets .pc-tech-mobile-open-btn{
    min-width:45px !important;
    padding-left:6px !important;
    padding-right:6px !important;
  }
}


/* PC Ecology v70 - Pulsanti PDF interno/cliente/WhatsApp preventivo */
.pc-tech-quote-pdf-actions{
  display:flex;
  flex-direction:column;
  gap:6px;
  align-items:flex-end;
}
.pc-tech-quote-pdf-actions .btn{
  margin-top:0 !important;
  white-space:nowrap;
  font-size:12px;
  padding:8px 10px;
  border-radius:999px;
}
.pc-tech-pdf-internal-btn{
  background:#f1f5f9 !important;
  color:#0f172a !important;
  border:1px solid #dbe3ef !important;
}
.pc-tech-pdf-client-btn{
  background:#eef2ff !important;
  color:#3730a3 !important;
  border:1px solid #c7d2fe !important;
}
.pc-tech-pdf-whatsapp-btn{
  background:#16a34a !important;
  color:#fff !important;
}
@media(max-width:700px){
  .pc-tech-quote-pdf-actions{
    align-items:stretch;
    gap:5px;
  }
  .pc-tech-quote-pdf-actions .btn{
    font-size:11px !important;
    padding:7px 8px !important;
  }
}


/* PC Ecology v72 - riquadro logo profilo cliente sempre chiaro */
.pc-reseller-logo-disabled{
  background:#f8fafc;
  border-style:dashed;
}
.pc-reseller-logo-disabled .empty{
  background:#fff7ed;
  border-color:#fed7aa;
  color:#9a3412;
}


/* PC Ecology v73 - provvigione rivenditore visibile in pannello cliente */
.pc-reseller-commission-box{
  display:inline-flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin:8px 0 6px;
  padding:9px 11px;
  border:1px solid #bbf7d0;
  background:#f0fdf4;
  color:#166534;
  border-radius:14px;
  font-size:13px;
  line-height:1.25;
}
.pc-reseller-commission-box b{
  color:#14532d;
}
@media(max-width:700px){
  .pc-reseller-commission-box{
    display:flex;
    width:100%;
    justify-content:space-between;
    font-size:12.5px;
  }
}


/* PC Ecology v74 - sezione Preventivo cliente finale ripristinata in Preventivi */
.pc-final-customer-price-v74{
  box-shadow:0 8px 20px rgba(15,23,42,.05);
}
.pc-final-customer-summary-line{
  display:block;
  margin-top:3px;
  color:#166534 !important;
  font-weight:800;
}
.pc-quote-accordion .pc-final-customer-price{
  margin-top:10px;
}
@media(max-width:700px){
  .pc-final-customer-edit{
    align-items:stretch !important;
  }
  .pc-final-customer-edit label,
  .pc-final-customer-edit button{
    width:100%;
  }
  .pc-final-customer-price .badge{
    margin-top:4px;
  }
}


/* PC Ecology v75 - ripristino completo prezzo cliente finale in I miei ticket + Preventivi */
.pc-final-customer-full-block{
  margin:10px 0 8px;
}
.pc-final-customer-price-v75{
  border:1px solid #dbeafe;
  border-radius:14px;
  padding:12px;
  margin:10px 0 8px;
  background:#f8fbff;
  color:#334155;
}
.pc-final-customer-price-head{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
}
.pc-final-customer-edit{
  display:flex;
  gap:8px;
  align-items:flex-end;
  flex-wrap:wrap;
  margin-top:10px;
}
.pc-final-customer-edit label{
  margin:0;
  min-width:190px;
  flex:1;
}
.pc-final-customer-edit input{
  margin-top:4px;
}
.pc-final-customer-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:8px 0 2px;
}
.pc-final-customer-summary-line{
  display:block;
  color:#0f766e;
  font-weight:800;
  margin-top:3px;
}
@media(max-width:700px){
  .pc-final-customer-edit,
  .pc-final-customer-actions{
    display:grid;
    grid-template-columns:1fr;
  }
  .pc-final-customer-pdf-btn,
  .pc-final-customer-edit button{
    width:100%;
  }
}


/* PC Ecology v78 - IVA separata tra totale tecnico e preventivo cliente finale */
.pc-final-customer-vat-row, .pc-tech-total-vat-row{
  align-items:center;
  gap:10px;
}
.pc-final-customer-vat-row span, .pc-tech-total-vat-row span{
  display:inline-flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}
.pc-tech-total-vat-row small{
  color:#64748b;
  font-size:12px;
  font-weight:600;
}
.pc-final-vat-label{
  display:inline-block;
  margin-left:6px;
  padding:3px 8px;
  border-radius:999px;
  background:#eef2ff;
  color:#3730a3;
  font-weight:800;
}
@media(max-width:700px){
  .pc-final-customer-vat-row{
    min-height:46px;
  }
}


/* PC Ecology v81 - Dashboard tecnica: ultime richieste compatte a tendina */
#lastTickets .pc-tech-dashboard-ticket{
  border:1px solid var(--line);
  border-radius:18px;
  background:#fff;
  margin:10px 0;
  overflow:hidden;
  box-shadow:0 8px 22px rgba(15,23,42,.04);
}
.pc-tech-dashboard-ticket-summary{
  width:100%;
  border:0;
  background:#fff;
  color:var(--text);
  padding:13px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  text-align:left;
  cursor:pointer;
}
.pc-tech-dashboard-ticket-summary:hover{
  background:#f8fafc;
}
.pc-tech-dashboard-ticket-main{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:4px;
}
.pc-tech-dashboard-ticket-title{
  font-size:14px;
  color:#0f172a;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.pc-tech-dashboard-ticket-sub{
  font-size:13px;
  color:#64748b;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.pc-tech-dashboard-ticket-side{
  display:flex;
  align-items:center;
  gap:8px;
  flex-shrink:0;
}
.pc-tech-dashboard-icons{
  display:inline-flex;
  align-items:center;
  gap:4px;
}
.pc-tech-dashboard-chevron{
  width:26px;
  height:26px;
  border-radius:999px;
  background:#eef2ff;
  color:#1d4ed8;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:13px;
  font-weight:800;
}
.pc-tech-dashboard-ticket-open .pc-tech-dashboard-ticket-summary{
  background:#f8fafc;
  border-bottom:1px solid var(--line);
}
.pc-tech-dashboard-ticket-detail{
  padding:14px 16px 16px;
}
.pc-tech-dashboard-detail-grid{
  display:grid;
  grid-template-columns:1fr auto;
  gap:18px;
  align-items:start;
}
.pc-tech-dashboard-detail-info{
  min-width:0;
}
.pc-tech-dashboard-actions{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:7px;
  min-width:190px;
}
.pc-tech-dashboard-actions .btn,
.pc-tech-dashboard-actions .pc-tech-quote-pdf-actions .btn{
  margin-top:0 !important;
}
.pc-tech-dashboard-actions .pc-tech-quote-pdf-actions{
  display:flex;
  flex-direction:column;
  gap:7px;
  margin-top:0 !important;
  width:100%;
}
.pc-tech-dashboard-actions .pc-tech-quote-pdf-actions .btn,
.pc-tech-dashboard-actions > .btn{
  width:100%;
  justify-content:center;
}
@media(max-width:900px){
  .pc-tech-dashboard-ticket-summary{
    padding:12px 13px;
    align-items:flex-start;
  }
  .pc-tech-dashboard-ticket-side{
    flex-direction:column;
    align-items:flex-end;
    gap:5px;
  }
  .pc-tech-dashboard-detail-grid{
    grid-template-columns:1fr;
  }
  .pc-tech-dashboard-actions{
    width:100%;
    min-width:0;
    align-items:stretch;
  }
}
@media(max-width:560px){
  .pc-tech-dashboard-ticket-title{
    font-size:13px;
  }
  .pc-tech-dashboard-ticket-sub{
    font-size:12px;
  }
  .pc-tech-dashboard-ticket-side .badge{
    max-width:95px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
}


/* PC Ecology v82 - Profilo cliente telefono modificabile */
.pc-profile-edit-card{
  border:1px solid var(--line);
  border-radius:18px;
  background:#fff;
  padding:16px;
  box-shadow:0 8px 22px rgba(15,23,42,.04);
  margin-bottom:14px;
}
.pc-profile-row{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
  margin:6px 0;
}
.pc-profile-phone-edit{
  margin-top:12px;
  display:grid;
  gap:10px;
}
.pc-profile-phone-edit label{
  display:grid;
  gap:6px;
}
.pc-profile-phone-edit input{
  width:100%;
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px 14px;
  font-size:16px;
}
.pc-profile-phone-actions{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}
.pc-profile-phone-actions .btn[disabled]{
  opacity:.65;
  cursor:not-allowed;
}


/* PC Ecology v83 - Dashboard stabile senza auto-chiusura veloce */
.pc-tech-dashboard-ticket-open{
  box-shadow:0 12px 30px rgba(15,23,42,.08);
}
.pc-tech-dashboard-ticket-open .pc-tech-dashboard-chevron{
  background:#dbeafe;
}


/* PC Ecology V113 - Desktop tecnico: stato ticket allineato e non duplicato */
@media (min-width:901px){
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) > .pc-tech-ticket-mobile-mockup{
    display:none !important;
  }
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) > .ticket-top{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) max-content !important;
    align-items:center !important;
    gap:12px !important;
  }
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) .pc-tech-ticket-mobile-line{
    display:flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    gap:8px !important;
    min-width:0 !important;
    width:100% !important;
    overflow:hidden !important;
  }
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) .pc-tech-ticket-mobile-line .pc-tech-ticket-mobile-status{
    display:none !important;
  }
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) .pc-tech-ticket-device{
    min-width:0 !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;
  }
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) .pc-tech-ticket-actions-desktop{
    display:flex !important;
    align-items:center !important;
    justify-content:flex-end !important;
    gap:8px !important;
    min-width:0 !important;
    white-space:nowrap !important;
    text-align:right !important;
  }
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) .pc-tech-ticket-status-fixed{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:136px !important;
    min-width:136px !important;
    max-width:136px !important;
    margin:0 !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;
    text-align:center !important;
  }
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) .pc-tech-ticket-indicators-fixed{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    min-width:24px !important;
    width:auto !important;
    margin:0 !important;
  }
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) .pc-tech-open-ticket-btn,
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) .pc-tech-delete-ticket-btn{
    margin:0 !important;
    min-width:0 !important;
    white-space:nowrap !important;
  }
}
@media (max-width:900px){
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) .pc-tech-ticket-actions-desktop .pc-tech-ticket-status-fixed,
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) .pc-tech-ticket-actions-desktop .pc-tech-delete-ticket-btn{
    display:none !important;
  }
}



/* PC Ecology v116 - Miglioria desktop campo "Preventivo pagato" senza alterare layout mobile V114 */
.pc-tech-payment-row{
  display:grid;
  grid-template-columns:auto 1fr;
  align-items:flex-start;
  gap:12px;
  background:#fff7ed;
  border:1px solid #fed7aa;
  border-radius:16px;
  padding:12px 14px;
  cursor:pointer;
}
.pc-tech-payment-row.is-paid{
  background:#f0fdf4;
  border-color:#bbf7d0;
}
.pc-tech-payment-checkbox{
  width:24px;
  height:24px;
  margin:2px 0 0 0;
  accent-color:#2563eb;
  flex:0 0 auto;
}
.pc-tech-payment-copy{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:0;
}
.pc-tech-payment-title{
  display:block;
  font-weight:900;
  font-size:18px;
  line-height:1.2;
  color:#0f172a;
}
.pc-tech-payment-note{
  display:block;
  font-size:14px;
  line-height:1.45;
  color:#57534e;
}
@media (min-width: 992px){
  .pc-tech-payment-row{
    align-items:center;
    gap:18px;
    padding:18px 20px;
    border-radius:22px;
  }
  .pc-tech-payment-checkbox{
    width:28px;
    height:28px;
    margin-top:0;
  }
  .pc-tech-payment-copy{
    gap:6px;
  }
  .pc-tech-payment-title{
    font-size:22px;
  }
  .pc-tech-payment-note{
    max-width:700px;
    font-size:15px;
  }
}


/* PC Ecology v118 - Tasto mostra/nascondi ticket chiusi e pagati */
.pc-tech-closed-paid-toggle{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  margin:0 0 12px 0;
  padding:10px 12px;
  border:1px solid #e5e7eb;
  border-radius:16px;
  background:#f8fafc;
}
.pc-tech-closed-paid-toggle-btn{
  background:#0f172a!important;
  color:#fff!important;
  border:1px solid #0f172a!important;
  border-radius:999px!important;
  padding:9px 13px!important;
  font-weight:900!important;
  box-shadow:0 8px 18px rgba(15,23,42,.12);
}
.pc-tech-closed-paid-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:24px;
  height:24px;
  margin-left:6px;
  padding:0 7px;
  border-radius:999px;
  background:#fff;
  color:#0f172a;
  font-size:12px;
  font-weight:900;
}
.pc-tech-closed-paid-note{
  color:#64748b;
  font-size:13px;
  font-weight:700;
}
@media (max-width: 700px){
  .pc-tech-closed-paid-toggle{
    align-items:stretch;
    flex-direction:column;
    padding:10px;
  }
  .pc-tech-closed-paid-toggle-btn{
    width:100%;
  }
  .pc-tech-closed-paid-note{
    text-align:center;
    font-size:12px;
  }
}



/* PC Ecology V119 - Ripristino tasti preventivo/PDF/WhatsApp nel dettaglio ticket tecnico */
.pc-tech-ticket-quote-actions-restored{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  margin-top:14px;
  padding:12px;
  border:1px solid #e2e8f0;
  border-radius:16px;
  background:#f8fafc;
}
.pc-tech-ticket-quote-actions-restored .pc-tech-quote-pdf-actions{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  margin-top:0 !important;
}
.pc-tech-ticket-quote-actions-restored .btn{
  margin-top:0 !important;
  white-space:nowrap;
}
@media(max-width:700px){
  .pc-tech-ticket-quote-actions-restored{
    align-items:stretch;
    flex-direction:column;
    gap:7px;
    padding:10px;
  }
  .pc-tech-ticket-quote-actions-restored .pc-tech-quote-pdf-actions{
    flex-direction:column;
    align-items:stretch;
    gap:7px;
    width:100%;
  }
  .pc-tech-ticket-quote-actions-restored .btn{
    width:100%;
    justify-content:center;
  }
}


/* PC Ecology V120 - Ticket aperto su smartphone: descrizione libera e comandi sotto */
.pc-tech-ticket-payment-fixed{
  display:none;
}
@media(max-width:700px){
  /* Quando il ticket è aperto non usare più la colonna laterale: prima testo, poi comandi */
  #allTickets .ticket.pc-tech-ticket-compact-card.pc-tech-ticket-open > .ticket-top{
    display:block !important;
    width:100% !important;
  }
  #allTickets .ticket.pc-tech-ticket-compact-card.pc-tech-ticket-open > .ticket-top > div:first-child{
    width:100% !important;
    min-width:0 !important;
  }
  #allTickets .ticket.pc-tech-ticket-compact-card.pc-tech-ticket-open .pc-tech-ticket-title{
    display:block !important;
    font-size:14px !important;
    line-height:1.22 !important;
    margin:0 0 6px !important;
    white-space:normal !important;
    overflow:visible !important;
  }
  #allTickets .ticket.pc-tech-ticket-compact-card.pc-tech-ticket-open .pc-tech-ticket-mobile-line{
    display:block !important;
    width:100% !important;
    margin:4px 0 6px !important;
    white-space:normal !important;
    overflow:visible !important;
    line-height:1.28 !important;
  }
  #allTickets .ticket.pc-tech-ticket-compact-card.pc-tech-ticket-open .pc-tech-ticket-device{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    white-space:normal !important;
    overflow:visible !important;
    text-overflow:clip !important;
    font-size:13px !important;
    line-height:1.35 !important;
    font-weight:650 !important;
    color:#475569 !important;
  }
  /* Evita la duplicazione del badge accanto alla descrizione articolo */
  #allTickets .ticket.pc-tech-ticket-compact-card.pc-tech-ticket-open .pc-tech-ticket-mobile-line .pc-tech-ticket-mobile-status,
  #allTickets .ticket.pc-tech-ticket-compact-card.pc-tech-ticket-open .pc-tech-ticket-mobile-line .pc-tech-paid-pill{
    display:none !important;
  }
  #allTickets .ticket.pc-tech-ticket-compact-card.pc-tech-ticket-open .pc-tech-ticket-actions-desktop{
    display:flex !important;
    flex-wrap:wrap !important;
    align-items:center !important;
    justify-content:flex-start !important;
    gap:7px !important;
    width:100% !important;
    max-width:100% !important;
    margin-top:9px !important;
    padding-top:8px !important;
    border-top:1px solid #eef2f7 !important;
    text-align:left !important;
    white-space:normal !important;
  }
  #allTickets .ticket.pc-tech-ticket-compact-card.pc-tech-ticket-open .pc-tech-ticket-status-fixed{
    display:inline-flex !important;
    width:auto !important;
    min-width:0 !important;
    max-width:120px !important;
    margin:0 !important;
    padding:5px 8px !important;
    font-size:11px !important;
    line-height:1.1 !important;
    white-space:normal !important;
    text-align:center !important;
  }
  #allTickets .ticket.pc-tech-ticket-compact-card.pc-tech-ticket-open .pc-tech-ticket-payment-fixed{
    display:inline-flex !important;
    align-items:center !important;
    min-width:0 !important;
    max-width:120px !important;
  }
  #allTickets .ticket.pc-tech-ticket-compact-card.pc-tech-ticket-open .pc-tech-ticket-payment-fixed .pc-tech-paid-pill{
    margin:0 !important;
    max-width:120px !important;
    min-height:24px !important;
    padding:4px 8px !important;
    font-size:11px !important;
  }
  #allTickets .ticket.pc-tech-ticket-compact-card.pc-tech-ticket-open .pc-tech-ticket-indicators-fixed{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:5px !important;
    min-width:24px !important;
    margin:0 !important;
  }
  #allTickets .ticket.pc-tech-ticket-compact-card.pc-tech-ticket-open .pc-tech-open-ticket-btn{
    margin:0 !important;
    min-width:82px !important;
    padding:7px 12px !important;
    border-radius:999px !important;
    font-size:12px !important;
    line-height:1.1 !important;
  }
  #allTickets .ticket.pc-tech-ticket-compact-card.pc-tech-ticket-open .pc-tech-delete-ticket-btn{
    margin:0 !important;
    padding:7px 12px !important;
    border-radius:999px !important;
    font-size:12px !important;
    line-height:1.1 !important;
    width:auto !important;
    min-width:0 !important;
  }
}


/* PC Ecology V121 - Tasti preventivo/PDF/WhatsApp visibili subito nel ticket aperto */
.pc-tech-ticket-quote-actions-top{
  margin:12px 0 14px 0 !important;
  position:relative;
  z-index:2;
}
#allTickets .ticket.pc-tech-ticket-open .pc-tech-ticket-quote-actions-restored,
#allTickets .ticket .tech-ticket-detail:not(.hidden) .pc-tech-ticket-quote-actions-restored{
  display:flex !important;
  visibility:visible !important;
  opacity:1 !important;
}
#allTickets .ticket.pc-tech-ticket-open .pc-tech-ticket-quote-actions-restored .pc-tech-quote-pdf-actions,
#allTickets .ticket .tech-ticket-detail:not(.hidden) .pc-tech-ticket-quote-actions-restored .pc-tech-quote-pdf-actions{
  display:flex !important;
  visibility:visible !important;
  opacity:1 !important;
}
@media(min-width:701px){
  #allTickets .pc-tech-ticket-quote-actions-restored{
    flex-direction:row !important;
    align-items:center !important;
  }
  #allTickets .pc-tech-ticket-quote-actions-restored .pc-tech-quote-pdf-actions{
    flex-direction:row !important;
    align-items:center !important;
  }
}


/* PC Ecology V122 - Tasto archiviati/rifiutati */
.pc-tech-closed-paid-toggle .pc-tech-closed-paid-note{
  line-height:1.35;
}



/* PC Ecology V124 - Pulsante/box Riapri ticket */
.pc-tech-reopen-ticket-btn{
  background:#eef2ff !important;
  color:#3730a3 !important;
  border:1px solid #c7d2fe !important;
  font-weight:800 !important;
}
.pc-tech-reopen-box{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:12px 0 14px;
  padding:12px 14px;
  border:1px solid #c7d2fe;
  border-radius:16px;
  background:#eef2ff;
  color:#1e1b4b;
}
.pc-tech-reopen-box b{
  display:block;
  margin-bottom:3px;
  font-size:14px;
}
.pc-tech-reopen-box span{
  display:block;
  font-size:13px;
  line-height:1.35;
  color:#4338ca;
}
@media(max-width:700px){
  .pc-tech-reopen-box{
    flex-direction:column;
    align-items:stretch;
    padding:10px;
  }
  .pc-tech-reopen-box .btn,
  .pc-tech-reopen-ticket-btn{
    width:100%;
    justify-content:center;
  }
}

/* PC Ecology V125 - Ticket chiusi/rifiutati in sola lettura lato cliente */
.pc-customer-ticket-readonly-box{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:12px 0;
  padding:12px 14px;
  border:1px solid #fed7aa;
  border-radius:16px;
  background:#fff7ed;
  color:#7c2d12;
}
.pc-customer-ticket-readonly-box b{
  display:block;
  margin-bottom:4px;
  font-size:14px;
}
.pc-customer-ticket-readonly-box span{
  display:block;
  font-size:13px;
  line-height:1.35;
}
.pc-customer-reopen-btn,
.pc-ticket-summary-reopen{
  white-space:nowrap;
}
.pc-customer-reopen-status{
  display:inline-flex !important;
  align-items:center;
  padding:7px 10px;
  border-radius:999px;
  border:1px solid #bbf7d0;
  background:#f0fdf4;
  color:#166534;
  font-weight:700;
}
@media(max-width:700px){
  .pc-customer-ticket-readonly-box{
    flex-direction:column;
    align-items:stretch;
    padding:10px;
  }
  .pc-customer-ticket-readonly-box .btn,
  .pc-ticket-summary-reopen{
    width:100%;
    justify-content:center;
  }
}


/* PC Ecology V130 - spunte lettura chat */
.pc-chat-read-receipt{
  margin-top:4px;
  text-align:right;
  font-size:11px;
  line-height:1.2;
  font-weight:800;
  color:#64748b;
  user-select:none;
}
.pc-chat-read-receipt.is-read{
  color:#2563eb;
}
.pc-chat-read-receipt.is-sent{
  color:#94a3b8;
}
@media(max-width:700px){
  .pc-chat-read-receipt{
    font-size:10.5px;
  }
}



/* PC Ecology V131 - fix spunte chat stabili desktop/mobile */
.pc-ticket-chat .pc-chat-msg{
  box-sizing:border-box !important;
  overflow:visible !important;
}
.pc-ticket-chat .pc-chat-read-receipt{
  display:flex !important;
  visibility:visible !important;
  opacity:1 !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:4px !important;
  width:100% !important;
  min-height:18px !important;
  margin-top:6px !important;
  text-align:right !important;
  font-size:11px !important;
  line-height:1.2 !important;
  font-weight:900 !important;
  white-space:nowrap !important;
  user-select:none !important;
  pointer-events:auto !important;
  color:#64748b !important;
  position:relative !important;
  z-index:2 !important;
}
.pc-ticket-chat .pc-chat-read-receipt.is-read{
  color:#1d4ed8 !important;
}
.pc-ticket-chat .pc-chat-read-receipt.is-sent{
  color:#64748b !important;
}
.pc-ticket-chat .pc-chat-read-checks{
  display:inline-flex !important;
  min-width:18px !important;
  align-items:center !important;
  justify-content:center !important;
  font-size:13px !important;
  letter-spacing:-2px !important;
  line-height:1 !important;
}
.pc-ticket-chat .pc-chat-read-label,
.pc-ticket-chat .pc-chat-read-time{
  display:inline-flex !important;
  align-items:center !important;
}
.pc-ticket-chat .pc-chat-read-time::before{
  content:'·';
  margin-right:4px;
  color:#94a3b8;
}
@media(max-width:700px){
  .pc-ticket-chat .pc-chat-list{
    padding:8px !important;
    overflow-x:hidden !important;
  }
  .pc-ticket-chat .pc-chat-msg{
    max-width:96% !important;
    width:auto !important;
    min-width:120px !important;
    padding:8px 9px !important;
  }
  .pc-ticket-chat .pc-chat-read-receipt{
    font-size:10.5px !important;
    min-height:16px !important;
    margin-top:5px !important;
    gap:3px !important;
  }
  .pc-ticket-chat .pc-chat-read-checks{
    font-size:12px !important;
    min-width:16px !important;
  }
  .pc-ticket-chat .pc-chat-read-time{
    display:none !important;
  }
}



/* PC Ecology V133 - mostra data/orario lettura chat anche su Android */
@media(max-width:700px){
  .pc-ticket-chat .pc-chat-read-receipt{
    display:flex !important;
    flex-wrap:wrap !important;
    justify-content:flex-end !important;
    align-items:center !important;
    width:100% !important;
    max-width:100% !important;
    white-space:normal !important;
    overflow:visible !important;
    line-height:1.2 !important;
    text-align:right !important;
  }
  .pc-ticket-chat .pc-chat-read-time{
    display:block !important;
    flex:0 0 100% !important;
    width:100% !important;
    max-width:100% !important;
    margin-top:2px !important;
    font-size:10px !important;
    line-height:1.2 !important;
    white-space:normal !important;
    overflow:visible !important;
    text-overflow:clip !important;
    text-align:right !important;
    color:#64748b !important;
  }
  .pc-ticket-chat .pc-chat-msg{
    overflow:visible !important;
  }
}


/* PC Ecology V138 - Situazione pagamenti ticket dashboard */
.pc-tech-payment-report-v138{border:1px solid rgba(14,165,233,.18);background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%)}
.pc-tech-payment-head-v138{align-items:flex-start}
.pc-tech-payment-total-v138{cursor:pointer;transition:transform .15s ease, box-shadow .15s ease;border:1px solid rgba(37,99,235,.18)}
.pc-tech-payment-total-v138:hover{transform:translateY(-1px);box-shadow:0 12px 26px rgba(15,23,42,.10)}
.pc-tech-payment-total-v138 em{display:block;margin-top:6px;font-style:normal;color:#64748b;font-size:13px;font-weight:700}
.pc-tech-payment-grid-v138{grid-template-columns:repeat(auto-fit,minmax(210px,1fr))}
.pc-tech-payment-card-v138{width:100%;text-align:left;cursor:pointer;border:1px solid #e5e7eb;background:#fff;transition:transform .15s ease, box-shadow .15s ease}
.pc-tech-payment-card-v138:hover{transform:translateY(-1px);box-shadow:0 10px 22px rgba(15,23,42,.10)}
.pc-tech-payment-card-v138 b{display:block;color:#0f172a}
.pc-tech-payment-card-v138 span{display:block;margin:5px 0;color:#2563eb;font-weight:900;font-size:22px}
.pc-tech-payment-card-v138 small{display:block;color:#64748b;line-height:1.35}
.pc-tech-payment-alert-v138 span{color:#c2410c}
.pc-tech-payment-potential-v138 span{color:#7c3aed}
.pc-tech-payment-filter-notice-v138{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:10px 0 14px;padding:10px 12px;border:1px solid #bfdbfe;border-radius:14px;background:#eff6ff;color:#1e3a8a;font-weight:700}
.pc-tech-payment-filter-notice-v138 button{border:0;border-radius:999px;background:#2563eb;color:#fff;font-weight:800;padding:7px 12px;cursor:pointer}
@media(max-width:700px){
  .pc-tech-payment-filter-notice-v138{align-items:flex-start;flex-direction:column}
  .pc-tech-payment-filter-notice-v138 button{width:100%}
}



/* PC Ecology V139 - riepilogo importi direttamente nella lista filtrata da Dashboard */
.pc-tech-payment-preview-v139{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:8px 0 8px;
}
.pc-tech-payment-preview-v139 span{
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:7px 10px;
  border-radius:999px;
  border:1px solid #bfdbfe;
  background:#eff6ff;
  color:#1e3a8a;
  font-size:13px;
  font-weight:750;
  line-height:1.2;
}
.pc-tech-payment-preview-v139 span:nth-child(2){
  border-color:#fed7aa;
  background:#fff7ed;
  color:#9a3412;
}
@media(max-width:700px){
  .pc-tech-payment-preview-v139{
    flex-direction:column;
    align-items:stretch;
    gap:6px;
  }
  .pc-tech-payment-preview-v139 span{
    width:100%;
    justify-content:space-between;
    border-radius:14px;
    font-size:12px;
  }
}


/* PC Ecology V140 - mostra riepilogo importi nel riepilogo ticket chiuso, senza aprire il ticket */
#allTickets .ticket:not(.pc-tech-ticket-open) .ticket-top > div:first-child > .pc-tech-payment-preview-v139{
  display:flex !important;
  visibility:visible !important;
  opacity:1 !important;
  margin:6px 0 4px !important;
}
#allTickets .ticket:not(.pc-tech-ticket-open) .pc-tech-payment-preview-v139{
  display:flex !important;
  visibility:visible !important;
  opacity:1 !important;
}
#allTickets .ticket:not(.pc-tech-ticket-open) .pc-tech-payment-preview-v139 span{
  display:inline-flex !important;
}
#allTickets .pc-tech-ticket-mobile-mockup .pc-tech-payment-preview-v139{
  display:flex !important;
  margin:7px 0 6px !important;
}
#allTickets .pc-tech-ticket-mobile-mockup .pc-tech-payment-preview-v139 span{
  display:flex !important;
}
@media(max-width:700px){
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) > .pc-tech-ticket-mobile-mockup .pc-tech-payment-preview-v139{
    display:flex !important;
  }
  #allTickets .pc-tech-ticket-mobile-mockup .pc-tech-payment-preview-v139 span{
    width:100% !important;
    justify-content:space-between !important;
  }
}


/* PC Ecology V141 - importi pagamento visibili anche su PC desktop nella lista filtrata */
#allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) > .ticket-top > div:first-child > .pc-tech-payment-preview-v139.pc-tech-payment-preview-desktop-v141,
#allTickets .ticket.pc-tech-payment-filter-card-v141:not(.pc-tech-ticket-open) > .ticket-top > div:first-child > .pc-tech-payment-preview-v139{
  display:flex !important;
  visibility:visible !important;
  opacity:1 !important;
  flex-wrap:wrap !important;
  align-items:center !important;
  gap:8px !important;
  margin:6px 0 5px !important;
  white-space:normal !important;
  overflow:visible !important;
  max-width:100% !important;
}
#allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) > .ticket-top > div:first-child > .pc-tech-payment-preview-v139.pc-tech-payment-preview-desktop-v141 span{
  display:inline-flex !important;
  visibility:visible !important;
  opacity:1 !important;
  white-space:nowrap !important;
}
@media (min-width:901px){
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) > .ticket-top{
    grid-template-columns:minmax(0,1fr) max-content !important;
    align-items:center !important;
  }
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) > .ticket-top > div:first-child{
    display:block !important;
    min-width:0 !important;
    overflow:visible !important;
  }
}


/* PC Ecology V142 - Totali per rivenditore nel riepilogo filtro pagamenti */
.pc-tech-payment-reseller-totals-v142{
  margin:18px 0 8px;
  padding:14px;
  border:1px solid #dbeafe;
  border-radius:18px;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
  box-shadow:0 10px 26px rgba(15,23,42,.06);
}
.pc-tech-payment-reseller-totals-head-v142{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.pc-tech-payment-reseller-totals-head-v142 h4{
  margin:0 0 4px;
  color:#0f172a;
  font-size:18px;
}
.pc-tech-payment-reseller-totals-head-v142 p{
  margin:0;
  color:#64748b;
  font-size:13px;
  font-weight:700;
}
.pc-tech-payment-reseller-totals-head-v142 > span{
  flex:0 0 auto;
  border-radius:999px;
  padding:7px 11px;
  background:#e0f2fe;
  color:#075985;
  font-weight:900;
  font-size:13px;
}
.pc-tech-payment-reseller-table-v142{
  display:grid;
  gap:8px;
}
.pc-tech-payment-reseller-row-v142{
  display:grid;
  grid-template-columns:minmax(230px,1.8fr) .55fr .9fr .9fr;
  gap:10px;
  align-items:center;
  padding:10px 12px;
  border:1px solid #e5e7eb;
  border-radius:14px;
  background:#fff;
  color:#0f172a;
  font-size:14px;
}
.pc-tech-payment-reseller-row-v142 span:nth-child(n+2){
  text-align:right;
  font-weight:900;
}
.pc-tech-payment-reseller-row-v142 small{
  display:block;
  margin-top:2px;
  color:#64748b;
  font-size:12px;
  font-weight:700;
}
.pc-tech-payment-reseller-row-head-v142{
  background:#eff6ff;
  color:#1e3a8a;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.03em;
}
.pc-tech-payment-reseller-row-total-v142{
  background:#f0fdf4;
  border-color:#bbf7d0;
  color:#14532d;
  font-weight:900;
}
@media(max-width:700px){
  .pc-tech-payment-reseller-totals-v142{
    margin:14px 0 6px;
    padding:12px;
    border-radius:16px;
  }
  .pc-tech-payment-reseller-totals-head-v142{
    flex-direction:column;
    align-items:stretch;
  }
  .pc-tech-payment-reseller-row-v142{
    grid-template-columns:1fr 1fr;
    gap:7px 10px;
    padding:10px;
  }
  .pc-tech-payment-reseller-row-v142 span:first-child{
    grid-column:1/-1;
  }
  .pc-tech-payment-reseller-row-head-v142{
    display:none;
  }
  .pc-tech-payment-reseller-row-v142 span:nth-child(n+2){
    text-align:left;
  }
  .pc-tech-payment-reseller-row-v142 span:nth-child(2)::before{content:'Ticket: ';font-weight:700;color:#64748b;}
  .pc-tech-payment-reseller-row-v142 span:nth-child(3)::before{content:'Totale: ';font-weight:700;color:#64748b;}
  .pc-tech-payment-reseller-row-v142 span:nth-child(4)::before{content:'Da riconoscere: ';font-weight:700;color:#64748b;}
}


/* PC Ecology V143 - Totali manodopera rivenditore per cliente finale */
.pc-reseller-finalcustomer-summary{
  margin-top:18px;
  padding:14px;
  border:1px solid rgba(15,23,42,.10);
  border-radius:18px;
  background:#f8fafc;
}
.pc-reseller-finalcustomer-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:12px;
}
.pc-reseller-finalcustomer-head h4{
  margin:0 0 4px;
  font-size:17px;
  line-height:1.2;
  color:#0f172a;
}
.pc-reseller-finalcustomer-head .muted{
  margin:0 !important;
  font-size:13px;
}
.pc-reseller-finalcustomer-total{
  flex:0 0 auto;
  min-width:130px;
  padding:10px 12px;
  border-radius:14px;
  background:#0f172a;
  color:#fff;
  text-align:right;
}
.pc-reseller-finalcustomer-total small{
  display:block;
  color:rgba(255,255,255,.72);
  font-size:12px;
}
.pc-reseller-finalcustomer-total strong{
  display:block;
  font-size:20px;
  line-height:1.1;
}
.pc-reseller-finalcustomer-table{
  overflow-x:auto;
  border-radius:14px;
  background:#fff;
  border:1px solid rgba(15,23,42,.08);
}
.pc-reseller-finalcustomer-row{
  display:grid;
  grid-template-columns:minmax(190px,1fr) 80px 140px;
  gap:10px;
  align-items:center;
  padding:10px 12px;
  border-bottom:1px solid rgba(15,23,42,.08);
  font-size:14px;
}
 .pc-reseller-finalcustomer-row.pc-row-with-repairs{
  grid-template-columns:minmax(190px,1fr) 80px 150px 140px;
}
.pc-reseller-finalcustomer-row:last-child{border-bottom:0;}
.pc-reseller-finalcustomer-row-head,
.pc-reseller-finalcustomer-row-total{
  background:#f1f5f9;
  font-weight:900;
  color:#0f172a;
}
.pc-reseller-finalcustomer-row span:not(:first-child){text-align:right;}
@media(max-width:700px){
  .pc-reseller-finalcustomer-head{flex-direction:column;}
  .pc-reseller-finalcustomer-total{width:100%;text-align:left;}
  .pc-reseller-finalcustomer-row,
   .pc-reseller-finalcustomer-row.pc-row-with-repairs{
    grid-template-columns:1fr;
    gap:4px;
  }
  .pc-reseller-finalcustomer-row span:not(:first-child){text-align:left;}
  .pc-reseller-finalcustomer-row .pc-rfc-ticket-count::before{content:"Ticket: ";font-weight:700;}
  .pc-reseller-finalcustomer-row .pc-rfc-repairs::before{content:"Totale interventi: ";font-weight:700;}
  .pc-reseller-finalcustomer-row .pc-rfc-commission::before{content:"Manodopera: ";font-weight:700;}
}



/* PC Ecology V144 - Dashboard rivenditore compatta quando gli interventi sono numerosi */
.pc-reseller-finalcustomer-summary-v144{
  margin-top:16px;
}
.pc-reseller-finalcustomer-toolbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin:10px 0 12px;
  padding:10px 12px;
  border:1px solid #e2e8f0;
  border-radius:16px;
  background:#f8fafc;
}
.pc-reseller-finalcustomer-toolbar label{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:13px;
  font-weight:800;
  color:#334155;
}
.pc-reseller-finalcustomer-toolbar select{
  min-height:36px;
  border:1px solid #cbd5e1;
  border-radius:12px;
  padding:6px 10px;
  background:#fff;
}
.pc-reseller-finalcustomer-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.pc-reseller-finalcustomer-kpis{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin:10px 0 12px;
}
.pc-reseller-finalcustomer-kpis div{
  border:1px solid #e2e8f0;
  border-radius:16px;
  padding:10px 12px;
  background:#fff;
}
.pc-reseller-finalcustomer-kpis small{
  display:block;
  color:#64748b;
  font-size:12px;
  font-weight:800;
}
.pc-reseller-finalcustomer-kpis strong{
  display:block;
  margin-top:3px;
  font-size:18px;
  color:#0f172a;
}
.pc-reseller-finalcustomer-table-v144{
  max-height:520px;
  overflow:auto;
  border-radius:16px;
}
.pc-reseller-finalcustomer-table-v144 .pc-reseller-finalcustomer-row-head{
  position:sticky;
  top:0;
  z-index:2;
  background:#f1f5f9;
}
.pc-reseller-finalcustomer-more-note,
.pc-reseller-finalcustomer-empty{
  padding:10px 12px;
  border:1px dashed #cbd5e1;
  border-radius:14px;
  background:#f8fafc;
  font-size:13px;
  color:#64748b;
  margin:8px 0;
}
@media(max-width:700px){
  .pc-reseller-finalcustomer-toolbar{
    align-items:stretch;
    flex-direction:column;
  }
  .pc-reseller-finalcustomer-toolbar label,
  .pc-reseller-finalcustomer-toolbar select,
  .pc-reseller-finalcustomer-actions,
  .pc-reseller-finalcustomer-actions .btn{
    width:100%;
  }
  .pc-reseller-finalcustomer-actions{
    flex-direction:column;
  }
  .pc-reseller-finalcustomer-kpis{
    grid-template-columns:1fr;
  }
  .pc-reseller-finalcustomer-table-v144{
    max-height:none;
    overflow:visible;
  }
}


/* PC Ecology V146 - Dashboard pagamenti rivenditore lato cliente */
.pc-customer-payment-report-v146{margin:18px 0 20px;padding:18px;border:1px solid rgba(15,23,42,.10);border-radius:22px;background:linear-gradient(180deg,#ffffff,#f8fbff);box-shadow:0 14px 35px rgba(15,23,42,.06)}
.pc-customer-payment-head-v146 h3{margin:0 0 4px;font-size:22px;color:#0f172a}.pc-customer-payment-head-v146 .muted{margin:0 0 14px;color:#64748b}
.pc-customer-payment-total-v146{width:100%;display:block;text-align:left;border:0;border-radius:20px;background:#0f172a;color:#fff;padding:18px 20px;margin:0 0 14px;box-shadow:0 12px 28px rgba(15,23,42,.18);cursor:pointer}
.pc-customer-payment-total-v146 small,.pc-customer-payment-total-v146 em{display:block;color:rgba(255,255,255,.75);font-style:normal}.pc-customer-payment-total-v146 strong{display:block;font-size:34px;line-height:1.1;margin:6px 0;color:#fff}
.pc-customer-payment-grid-v146{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.pc-customer-payment-card-v146{border:1px solid rgba(15,23,42,.10);background:#fff;border-radius:18px;padding:16px;text-align:left;cursor:pointer;box-shadow:0 10px 25px rgba(15,23,42,.06);min-height:135px}.pc-customer-payment-card-v146 b{display:block;font-size:19px;color:#0f172a;margin-bottom:8px}.pc-customer-payment-card-v146 span{display:block;font-size:30px;font-weight:900;color:#0b73f6;margin-bottom:8px}.pc-customer-payment-card-v146 small{display:block;color:#64748b;font-size:14px;line-height:1.35}.pc-customer-payment-alert-v146 span{color:#c2410c}.pc-customer-payment-wait-v146 span{color:#8b5cf6}
.pc-customer-payment-filter-banner-v146{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 14px;padding:13px 15px;border:1px solid rgba(15,23,42,.12);border-radius:16px;background:#f8fafc}.pc-customer-payment-filter-banner-v146 small{display:block;margin-top:3px;color:#64748b}.pc-customer-payment-filter-banner-v146 button{border:0;border-radius:999px;background:#0b73f6;color:#fff;font-weight:800;padding:9px 14px;cursor:pointer;white-space:nowrap}
.pc-customer-payment-preview-v146{display:flex!important;flex-wrap:wrap;gap:8px;margin-top:8px;color:#334155;font-size:13px}.pc-customer-payment-preview-v146 span{display:inline-flex;align-items:center;gap:4px;background:#eff6ff;border:1px solid #bfdbfe;border-radius:999px;padding:4px 8px}.pc-customer-payment-preview-v146 b{color:#0f172a}
@media(max-width:760px){.pc-customer-payment-report-v146{padding:14px;border-radius:20px}.pc-customer-payment-total-v146{padding:16px}.pc-customer-payment-total-v146 strong{font-size:30px}.pc-customer-payment-grid-v146{grid-template-columns:1fr;gap:10px}.pc-customer-payment-card-v146{min-height:auto;padding:14px}.pc-customer-payment-card-v146 b{font-size:18px}.pc-customer-payment-card-v146 span{font-size:28px}.pc-customer-payment-filter-banner-v146{align-items:flex-start;flex-direction:column}.pc-customer-payment-filter-banner-v146 button{width:100%}.pc-customer-payment-preview-v146{font-size:12px;gap:6px}.pc-customer-payment-preview-v146 span{border-radius:12px}}


/* Sezione Clienti rivenditore pulita */
.pc-final-customers-tools{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  margin-bottom:14px;
}
.pc-final-customers-tools input{
  min-width:260px;
  flex:1;
  margin-top:0;
}
.pc-final-customer-card{
  border:1px solid var(--line,#e5e7eb);
  border-radius:18px;
  background:#fff;
  margin:0 0 12px;
  overflow:hidden;
  box-shadow:0 6px 18px rgba(15,23,42,.04);
}
.pc-final-customer-card>summary{
  list-style:none;
  cursor:pointer;
  padding:14px 16px;
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  background:#f8fafc;
}
.pc-final-customer-card>summary::-webkit-details-marker{display:none}
.pc-final-customer-card h4{margin:0;font-size:16px}
.pc-final-customer-card small{display:block;color:#64748b;font-weight:700;margin-top:4px}
.pc-final-customer-body{padding:14px 16px;display:grid;gap:12px}
.pc-final-customer-subtitle{font-weight:900;color:#0f172a;font-size:14px}
.pc-final-customer-device{
  border:1px solid #e2e8f0;
  border-radius:16px;
  padding:12px;
  background:#fff;
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
}
.pc-final-customer-device h5{margin:0 0 4px;font-size:15px}
.pc-final-customer-device p{margin:2px 0;color:#64748b;font-size:13px;line-height:1.35}
.pc-final-customer-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;min-width:190px}
.pc-final-customer-empty{border:1px dashed #cbd5e1;background:#f8fafc;border-radius:16px;padding:14px;color:#64748b}
@media(max-width:700px){
  .pc-final-customers-tools{align-items:stretch}
  .pc-final-customers-tools input,.pc-final-customers-tools .btn{width:100%;min-width:0}
  .pc-final-customer-device{display:block}
  .pc-final-customer-actions{justify-content:stretch;margin-top:10px;min-width:0}
  .pc-final-customer-actions .btn{width:100%}
  .pc-final-customer-card>summary{display:block}
}


/* PC Ecology V167 - Dashboard cliente/rivenditore: quarta scheda Pagati */
.pc-customer-payment-grid-v146{grid-template-columns:repeat(4,minmax(0,1fr));}
.pc-customer-payment-paid-v167 span{color:#16a34a;}
@media(max-width:1100px) and (min-width:761px){.pc-customer-payment-grid-v146{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:760px){.pc-customer-payment-grid-v146{grid-template-columns:1fr;}}

/* PC Ecology V307 - Pannello tecnico: colonne allineate in Tutti i ticket desktop
   Mantiene fisse le colonne: Pagamento | Importo | Stato | Indicatori | Apri ticket. */
@media (min-width:901px){
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) > .ticket-top{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) 462px !important;
    align-items:center !important;
    gap:14px !important;
  }
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) > .ticket-top > div:first-child{
    min-width:0 !important;
    overflow:hidden !important;
  }
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) .pc-tech-ticket-actions-desktop{
    display:grid !important;
    grid-template-columns:112px 82px 136px 28px 96px !important;
    column-gap:8px !important;
    row-gap:0 !important;
    align-items:center !important;
    justify-items:center !important;
    justify-content:end !important;
    width:462px !important;
    min-width:462px !important;
    max-width:462px !important;
    white-space:nowrap !important;
    text-align:center !important;
  }
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) .pc-tech-ticket-payment-fixed{
    display:inline-flex !important;
    order:1 !important;
    width:112px !important;
    min-width:112px !important;
    max-width:112px !important;
    min-height:24px !important;
    align-items:center !important;
    justify-content:center !important;
    overflow:hidden !important;
  }
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) .pc-tech-ticket-payment-fixed:empty::before{
    content:'Da pagare';
    visibility:hidden;
    display:inline-flex;
    min-height:22px;
  }
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) .pc-tech-ticket-payment-fixed .pc-tech-paid-pill{
    width:100% !important;
    max-width:112px !important;
    justify-content:center !important;
    margin:0 !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) .pc-tech-ticket-amount-fixed{
    display:inline-flex !important;
    order:2 !important;
    width:82px !important;
    min-width:82px !important;
    max-width:82px !important;
    min-height:24px !important;
    align-items:center !important;
    justify-content:center !important;
    overflow:hidden !important;
  }
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) .pc-tech-ticket-amount-fixed:empty::before{
    content:'€ 0,00';
    visibility:hidden;
    display:inline-flex;
    min-height:22px;
  }
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) .pc-tech-ticket-amount-fixed .pc-tech-ticket-amount-pill-v175{
    width:100% !important;
    max-width:82px !important;
    justify-content:center !important;
    margin:0 !important;
  }
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) .pc-tech-ticket-status-fixed{
    order:3 !important;
    display:inline-flex !important;
    width:136px !important;
    min-width:136px !important;
    max-width:136px !important;
    justify-content:center !important;
    margin:0 !important;
    text-align:center !important;
  }
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) .pc-tech-ticket-indicators-fixed{
    order:4 !important;
    display:inline-flex !important;
    width:28px !important;
    min-width:28px !important;
    max-width:28px !important;
    align-items:center !important;
    justify-content:center !important;
    margin:0 !important;
  }
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) .pc-tech-ticket-indicators-fixed:empty::before{
    content:'✓';
    visibility:hidden;
  }
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) .pc-tech-open-ticket-btn{
    order:5 !important;
    width:96px !important;
    min-width:96px !important;
    max-width:96px !important;
    margin:0 !important;
    justify-content:center !important;
    white-space:nowrap !important;
  }
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) .pc-tech-delete-ticket-btn{
    display:none !important;
  }
}


/* PC Ecology V308 - desktop tecnico: evita il doppio badge "Da pagare" nella riga compatta.
   Il badge pagamento deve comparire solo nella colonna fissa a destra, non anche nella riga descrittiva a sinistra. */
@media (min-width:901px){
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) > .ticket-top > div:first-child .pc-tech-ticket-mobile-line .pc-tech-paid-pill,
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) > .ticket-top > div:first-child .pc-tech-ticket-mobile-line .pc-tech-ticket-amount-pill-v175,
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) > .ticket-top > div:first-child > .pc-tech-paid-pill{
    display:none!important;
  }
}


/* PC Ecology V340 - Filtro pagamenti più coerente con il lato tecnico */
.pc-tech-payment-filter-panel-v340{
  margin:10px 0 14px;
  padding:14px;
  border:1px solid rgba(37,99,235,.18);
  border-radius:20px;
  background:linear-gradient(135deg,#eff6ff 0%,#ffffff 58%,#f8fbff 100%);
  box-shadow:0 14px 34px rgba(15,23,42,.08);
}
.pc-tech-payment-filter-top-v340{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:12px;
}
.pc-tech-payment-filter-title-v340 h3{
  margin:2px 0 4px;
  color:#0f2f8f;
  font-size:20px;
  line-height:1.15;
}
.pc-tech-payment-filter-title-v340 p{
  margin:0;
  color:#475569;
  font-size:13px;
  font-weight:700;
  line-height:1.35;
}
.pc-tech-payment-filter-kicker-v340{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:5px 9px;
  border-radius:999px;
  background:#dbeafe;
  color:#1e40af;
  font-size:12px;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.035em;
}
.pc-tech-payment-filter-clear-v340{
  flex:0 0 auto;
  border:0;
  border-radius:999px;
  background:#2563eb;
  color:#fff;
  font-weight:950;
  padding:9px 15px;
  cursor:pointer;
  box-shadow:0 10px 18px rgba(37,99,235,.22);
}
.pc-tech-payment-filter-clear-v340:hover{filter:brightness(.97);transform:translateY(-1px)}
.pc-tech-payment-filter-metrics-v340{
  display:grid;
  grid-template-columns:repeat(4,minmax(140px,1fr));
  gap:10px;
}
.pc-tech-payment-filter-metrics-v340 span{
  min-width:0;
  border:1px solid rgba(15,23,42,.08);
  border-radius:16px;
  background:#fff;
  padding:10px 12px;
  box-shadow:0 8px 18px rgba(15,23,42,.04);
}
.pc-tech-payment-filter-metrics-v340 small{
  display:block;
  margin-bottom:4px;
  color:#64748b;
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.025em;
}
.pc-tech-payment-filter-metrics-v340 b{
  display:block;
  color:#0f172a;
  font-size:17px;
  font-weight:950;
  white-space:nowrap;
}
#allTickets.pc-tech-payment-filter-active-v340 > .ticket{
  margin:10px 0;
  padding:12px 14px;
  border:1px solid #dbeafe !important;
  border-radius:18px !important;
  background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%) !important;
  box-shadow:0 10px 24px rgba(15,23,42,.055);
}
#allTickets.pc-tech-payment-filter-active-v340 > .ticket:hover{
  border-color:#93c5fd !important;
  box-shadow:0 14px 30px rgba(15,23,42,.08);
}
#allTickets.pc-tech-payment-filter-active-v340 .pc-tech-payment-preview-v139{
  margin-top:8px !important;
  gap:7px !important;
}
#allTickets.pc-tech-payment-filter-active-v340 .pc-tech-payment-preview-v139 span{
  border-radius:12px !important;
  padding:7px 10px !important;
  font-size:13px !important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.5);
}
#allTickets.pc-tech-payment-filter-active-v340 .ticket .ticket-top{
  gap:12px !important;
}
#allTickets.pc-tech-payment-filter-active-v340 .pc-tech-ticket-actions-desktop{
  gap:7px !important;
}
.pc-tech-payment-reseller-totals-v142{
  border-color:rgba(37,99,235,.16) !important;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%) !important;
  box-shadow:0 14px 30px rgba(15,23,42,.07) !important;
}
.pc-tech-payment-reseller-totals-head-v142 h4{
  color:#0f2f8f !important;
}
.pc-tech-payment-reseller-row-v142{
  border-radius:13px !important;
}
@media(max-width:900px){
  .pc-tech-payment-filter-metrics-v340{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:700px){
  .pc-tech-payment-filter-panel-v340{padding:12px;border-radius:18px;margin:8px 0 12px;}
  .pc-tech-payment-filter-top-v340{flex-direction:column;align-items:stretch;gap:10px;}
  .pc-tech-payment-filter-clear-v340{width:100%;}
  .pc-tech-payment-filter-title-v340 h3{font-size:18px;}
  .pc-tech-payment-filter-metrics-v340{grid-template-columns:1fr;gap:8px;}
  .pc-tech-payment-filter-metrics-v340 span{padding:9px 10px;border-radius:14px;}
  #allTickets.pc-tech-payment-filter-active-v340 > .ticket{padding:10px 11px;border-radius:16px !important;}
}

/* PC Ecology V341 - Vista pagamenti cliente/rivenditore in stile pannello tecnico, solo quando e' attivo il filtro pagamenti */
.pc-customer-payment-filter-panel-v341{
  margin:10px 0 14px;
  padding:14px;
  border:1px solid rgba(37,99,235,.18);
  border-radius:20px;
  background:linear-gradient(135deg,#eff6ff 0%,#ffffff 58%,#f8fbff 100%);
  box-shadow:0 14px 34px rgba(15,23,42,.08);
}
.pc-customer-payment-filter-top-v341{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:12px;
}
.pc-customer-payment-filter-title-v341 h3{
  margin:2px 0 4px;
  color:#0f2f8f;
  font-size:20px;
  line-height:1.15;
}
.pc-customer-payment-filter-title-v341 p{
  margin:0;
  color:#475569;
  font-size:13px;
  font-weight:700;
  line-height:1.35;
}
.pc-customer-payment-filter-kicker-v341{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:5px 9px;
  border-radius:999px;
  background:#dbeafe;
  color:#1e40af;
  font-size:12px;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.035em;
}
.pc-customer-payment-filter-clear-v341{
  flex:0 0 auto;
  border:0;
  border-radius:999px;
  background:#2563eb;
  color:#fff;
  font-weight:950;
  padding:9px 15px;
  cursor:pointer;
  box-shadow:0 10px 18px rgba(37,99,235,.22);
}
.pc-customer-payment-filter-clear-v341:hover{filter:brightness(.97);transform:translateY(-1px)}
.pc-customer-payment-filter-metrics-v341{
  display:grid;
  grid-template-columns:repeat(5,minmax(135px,1fr));
  gap:10px;
}
.pc-customer-payment-filter-metrics-v341 span{
  min-width:0;
  border:1px solid rgba(15,23,42,.08);
  border-radius:16px;
  background:#fff;
  padding:10px 12px;
  box-shadow:0 8px 18px rgba(15,23,42,.04);
}
.pc-customer-payment-filter-metrics-v341 small{
  display:block;
  margin-bottom:4px;
  color:#64748b;
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.025em;
}
.pc-customer-payment-filter-metrics-v341 b{
  display:block;
  color:#0f172a;
  font-size:17px;
  font-weight:950;
  white-space:nowrap;
}
.pc-customer-payment-list-v341{display:block;}
#allTickets.pc-customer-payment-filter-active-v341 .pc-customer-payment-ticket-v341{
  display:block;
  margin:10px 0;
  padding:0;
  border:1px solid #dbeafe !important;
  border-radius:18px !important;
  background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%) !important;
  box-shadow:0 10px 24px rgba(15,23,42,.055);
  overflow:hidden;
}
#allTickets.pc-customer-payment-filter-active-v341 .pc-customer-payment-ticket-v341:hover{
  border-color:#93c5fd !important;
  box-shadow:0 14px 30px rgba(15,23,42,.08);
}
.pc-customer-payment-summary-v341{
  list-style:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:13px 14px;
  cursor:pointer;
}
.pc-customer-payment-summary-v341::-webkit-details-marker{display:none;}
.pc-customer-payment-summary-main-v341{min-width:0;flex:1 1 auto;}
.pc-customer-payment-summary-main-v341 h4{
  margin:0 0 3px;
  color:#0f172a;
  font-size:15px;
  font-weight:950;
  line-height:1.2;
}
.pc-customer-payment-summary-main-v341 p{
  margin:0 0 3px;
  color:#334155;
  font-size:13px;
  font-weight:700;
}
.pc-customer-payment-summary-main-v341 small{
  display:block;
  margin:0;
  color:#64748b;
  font-size:12px;
  font-weight:700;
}
.pc-customer-payment-preview-v341{
  display:flex!important;
  flex-wrap:wrap;
  gap:7px;
  margin-top:8px;
  color:#334155;
  font-size:13px;
}
.pc-customer-payment-preview-v341 span{
  display:inline-flex;
  align-items:center;
  gap:4px;
  border-radius:999px;
  padding:6px 9px;
  font-weight:850;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.55);
}
.pc-customer-payment-preview-v341 b{color:#0f172a;}
.pc-customer-pay-pill-blue-v341{background:#eff6ff;border:1px solid #bfdbfe;color:#1d4ed8;}
.pc-customer-pay-pill-orange-v341{background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;}
.pc-customer-pay-pill-green-v342{background:#ecfdf5;border:1px solid #bbf7d0;color:#047857;}
.pc-customer-payment-summary-actions-v341{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
  min-width:310px;
}
.pc-customer-pay-pill-due-v341,
.pc-customer-pay-pill-amount-v341,
.pc-customer-pay-pill-net-v342{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  padding:6px 10px;
  font-size:12px;
  line-height:1;
  font-weight:950;
  white-space:nowrap;
}
.pc-customer-pay-pill-due-v341{background:#ffedd5;color:#c2410c;}
.pc-customer-pay-pill-amount-v341{background:#eff6ff;border:1px solid #bfdbfe;color:#1d4ed8;}
.pc-customer-pay-pill-net-v342,.pc-customer-payment-net-metric-v342{background:#ecfdf5!important;border-color:#bbf7d0!important;color:#047857!important;}
.pc-customer-payment-net-metric-v342 b{color:#047857!important;}
.pc-customer-payment-summary-actions-v341 .badge{
  border-radius:999px;
  padding:6px 10px;
  font-size:11px;
  font-weight:950;
  white-space:nowrap;
}
.pc-customer-payment-open-v341{
  border:0;
  border-radius:999px;
  background:#2563eb;
  color:#fff;
  font-weight:950;
  padding:8px 13px;
  cursor:pointer;
  white-space:nowrap;
  box-shadow:0 10px 18px rgba(37,99,235,.18);
}
.pc-customer-payment-open-v341:hover{filter:brightness(.96);transform:translateY(-1px)}
.pc-customer-payment-ticket-v341[open]{
  border-color:#93c5fd !important;
  box-shadow:0 16px 34px rgba(15,23,42,.10) !important;
}
.pc-customer-payment-ticket-v341[open] .pc-customer-payment-summary-v341{
  border-bottom:1px solid #e2e8f0;
  background:#f8fbff;
}
.pc-customer-payment-details-v341{padding:12px 14px 14px;background:#fff;}
@media(max-width:1100px){
  .pc-customer-payment-filter-metrics-v341{grid-template-columns:repeat(2,minmax(0,1fr));}
  .pc-customer-payment-summary-actions-v341{min-width:260px;}
}
@media(max-width:760px){
  .pc-customer-payment-filter-panel-v341{padding:12px;border-radius:18px;margin:8px 0 12px;}
  .pc-customer-payment-filter-top-v341{flex-direction:column;align-items:stretch;gap:10px;}
  .pc-customer-payment-filter-clear-v341{width:100%;}
  .pc-customer-payment-filter-title-v341 h3{font-size:18px;}
  .pc-customer-payment-filter-metrics-v341{grid-template-columns:1fr;gap:8px;}
  .pc-customer-payment-filter-metrics-v341 span{padding:9px 10px;border-radius:14px;}
  .pc-customer-payment-summary-v341{align-items:flex-start;flex-direction:column;gap:10px;padding:12px;}
  .pc-customer-payment-summary-actions-v341{width:100%;min-width:0;justify-content:flex-start;gap:7px;}
  .pc-customer-payment-open-v341{margin-left:auto;}
  .pc-customer-payment-preview-v341{font-size:12px;gap:6px;}
  .pc-customer-payment-preview-v341 span{border-radius:12px;padding:6px 8px;}
  #allTickets.pc-customer-payment-filter-active-v341 .pc-customer-payment-ticket-v341{border-radius:16px !important;}
}

/* PC Ecology V344 - mesi dashboard clienti cliccabili con riferimenti ticket */
.pc-month-box-clickable-v344{cursor:pointer;border:0;text-align:left;font:inherit;width:100%}
.pc-month-box-clickable-v344 small{display:block;margin-top:4px;opacity:.72;font-size:12px}
.pc-month-box-active-v344{outline:2px solid rgba(30,110,220,.35)}
.pc-month-ticket-list-v344{grid-column:1/-1;margin:0 0 10px 0;padding:12px;border-radius:14px;background:#f7f9fc;border:1px solid #e3e8f0}
.pc-month-ticket-list-head-v344{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.pc-month-ticket-list-head-v344 button{border:0;border-radius:10px;padding:7px 10px;cursor:pointer;background:#e9eef7}
.pc-month-ticket-rows-v344{display:grid;gap:8px}
.pc-month-ticket-row-v344{width:100%;border:1px solid #e5eaf2;background:#fff;border-radius:12px;padding:10px;text-align:left;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:10px;font:inherit}
.pc-month-ticket-row-v344 small{white-space:nowrap;color:#5b6472}
@media(max-width:700px){.pc-month-ticket-row-v344{display:block}.pc-month-ticket-row-v344 small{display:block;margin-top:4px;white-space:normal}}

/* PC Ecology V345 - mesi dashboard cliente cliccabili */
.pc-month-box-clickable-v345,
.monthly-grid.twelve-months-grid .pc-month-box-clickable-v345{
  cursor:pointer !important;
  pointer-events:auto !important;
  border:0 !important;
  text-align:center !important;
  font:inherit !important;
  width:100% !important;
  user-select:none !important;
}
.pc-month-box-clickable-v345 *{pointer-events:none !important;}

/* PC Ecology V346 */
.pc-month-payment-schema-v346{grid-column:1/-1;margin:10px 0 18px}
.pc-month-payment-schema-v346 .pc-customer-payment-filter-panel-v341{margin-top:0}
.pc-month-box-clickable-v345{cursor:pointer;appearance:none;border:1px solid var(--line);text-align:left}
.pc-month-box-clickable-v345:hover{filter:brightness(.98)}

/* PC Ecology V348 - Vista mese pulita: quando il riepilogo mensile è aperto non mostrare la griglia mesi a destra. */
.pc-month-open-clean-v348 .monthly-grid.twelve-months-grid{
  display:none !important;
}
.pc-month-open-clean-v348 .pc-month-payment-schema-v346{
  grid-column:auto;
  margin-top:14px;
}


/* PC Ecology V350 - Allineamento colonne riepilogo mensile pagamenti ticket */
.pc-month-payment-schema-v346 .pc-customer-payment-ticket-v341{
  display:block !important;
  margin:10px 0 !important;
  padding:0 !important;
  border:1px solid #e5edf8 !important;
  border-radius:18px !important;
  background:#fff !important;
  overflow:hidden !important;
}
.pc-month-payment-schema-v346 .pc-customer-payment-summary-v341{
  display:grid !important;
  grid-template-columns:minmax(360px,1fr) minmax(610px,720px) !important;
  align-items:center !important;
  gap:18px !important;
  padding:14px 16px !important;
}
.pc-month-payment-schema-v346 .pc-customer-payment-summary-main-v341{
  min-width:0 !important;
}
.pc-month-payment-schema-v346 .pc-customer-payment-preview-v341{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:7px !important;
}
.pc-month-payment-schema-v346 .pc-customer-payment-summary-actions-v341{
  min-width:0 !important;
  width:100% !important;
  display:grid !important;
  grid-template-columns:86px 88px 110px 120px 112px !important;
  align-items:center !important;
  justify-content:end !important;
  gap:8px !important;
}
.pc-month-payment-schema-v346 .pc-customer-payment-summary-actions-v341 > *{
  justify-self:center !important;
  white-space:nowrap !important;
}
.pc-month-payment-schema-v346 .pc-customer-payment-open-v341{
  justify-self:end !important;
  min-width:104px !important;
  text-align:center !important;
}
@media(max-width:1050px){
  .pc-month-payment-schema-v346 .pc-customer-payment-summary-v341{
    grid-template-columns:1fr !important;
    gap:10px !important;
  }
  .pc-month-payment-schema-v346 .pc-customer-payment-summary-actions-v341{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    justify-content:stretch !important;
  }
  .pc-month-payment-schema-v346 .pc-customer-payment-open-v341{
    justify-self:stretch !important;
  }
}
@media(max-width:620px){
  .pc-month-payment-schema-v346 .pc-customer-payment-summary-actions-v341{
    display:flex !important;
    flex-wrap:wrap !important;
    justify-content:flex-start !important;
  }
}


/* FIX 351 - Allineamento I miei ticket lato cliente */
#allTickets .pc-ticket-accordion{
  border:0 !important;
  border-bottom:1px solid var(--line,#e5e7eb) !important;
  border-radius:0 !important;
  box-shadow:none !important;
  margin:0 !important;
  background:#fff !important;
}
#allTickets .pc-ticket-summary{
  display:grid !important;
  grid-template-columns:minmax(420px,1fr) 340px !important;
  align-items:center !important;
  gap:18px !important;
  min-height:82px !important;
  padding:18px 22px !important;
}
#allTickets .pc-ticket-summary-main{
  min-width:0 !important;
  display:block !important;
}
#allTickets .pc-ticket-summary-main strong{
  display:block !important;
  font-size:15px !important;
  line-height:1.25 !important;
  white-space:normal !important;
}
#allTickets .pc-ticket-summary-main span,
#allTickets .pc-ticket-summary-main small{
  display:block !important;
  line-height:1.25 !important;
}
#allTickets .pc-ticket-summary-actions{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:10px !important;
  flex-wrap:nowrap !important;
  min-width:320px !important;
}
#allTickets .pc-ticket-summary-actions .badge{
  white-space:nowrap !important;
}
#allTickets .pc-ticket-summary-actions .btn{
  white-space:nowrap !important;
  min-height:34px !important;
  padding:8px 12px !important;
}
#allTickets .pc-ticket-details{
  padding:0 22px 18px !important;
}
@media(max-width:900px){
  #allTickets .pc-ticket-summary{
    grid-template-columns:1fr !important;
    gap:10px !important;
    padding:14px !important;
  }
  #allTickets .pc-ticket-summary-actions{
    justify-content:flex-start !important;
    flex-wrap:wrap !important;
    min-width:0 !important;
  }
}

/* FIX 352 - I miei ticket: layout compatto senza vuoto a sinistra */
#allTickets .pc-ticket-accordion > summary.pc-ticket-summary{
  display:grid !important;
  grid-template-columns:26px minmax(0,1fr) auto !important;
  align-items:center !important;
  column-gap:14px !important;
  min-height:70px !important;
  padding:14px 18px !important;
}
#allTickets .pc-ticket-accordion > summary.pc-ticket-summary::before{
  grid-column:1 !important;
  margin:0 !important;
  justify-self:center !important;
  align-self:center !important;
}
#allTickets .pc-ticket-summary-main{
  grid-column:2 !important;
  min-width:0 !important;
  display:flex !important;
  flex-direction:column !important;
  gap:2px !important;
}
#allTickets .pc-ticket-summary-main strong,
#allTickets .pc-ticket-summary-main span,
#allTickets .pc-ticket-summary-main small{
  white-space:normal !important;
  overflow:visible !important;
  text-overflow:clip !important;
  line-height:1.22 !important;
}
#allTickets .pc-ticket-summary-actions{
  grid-column:3 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:8px !important;
  flex-wrap:nowrap !important;
  min-width:auto !important;
}
#allTickets .pc-ticket-summary-actions .btn,
#allTickets .pc-ticket-summary-actions .badge{
  white-space:nowrap !important;
}
#allTickets .pc-ticket-details{
  padding:0 18px 16px 58px !important;
}
@media(max-width:900px){
  #allTickets .pc-ticket-accordion > summary.pc-ticket-summary{
    grid-template-columns:22px minmax(0,1fr) !important;
    row-gap:8px !important;
    padding:12px 14px !important;
  }
  #allTickets .pc-ticket-summary-actions{
    grid-column:2 !important;
    justify-content:flex-start !important;
    flex-wrap:wrap !important;
  }
  #allTickets .pc-ticket-details{
    padding:0 14px 14px 42px !important;
  }
}

/* PC Ecology FIX 382 - Lato cliente: effetto bordatura sui mesi Gennaio-Dicembre come lato tecnico */
.monthly-grid.twelve-months-grid .pc-month-box-clickable-v345,
.pc-reseller-dashboard-block .pc-month-box-clickable-v345{
  appearance:none !important;
  border:1px solid rgba(15,23,42,.08) !important;
  cursor:pointer !important;
  font:inherit !important;
  color:inherit !important;
  transition:border-color .15s ease, box-shadow .15s ease, transform .15s ease, filter .15s ease !important;
}
.monthly-grid.twelve-months-grid .pc-month-box-clickable-v345:hover,
.monthly-grid.twelve-months-grid .pc-month-box-clickable-v345:focus,
.pc-reseller-dashboard-block .pc-month-box-clickable-v345:hover,
.pc-reseller-dashboard-block .pc-month-box-clickable-v345:focus{
  border-color:#2563eb !important;
  box-shadow:0 0 0 3px rgba(37,99,235,.12) !important;
  outline:none !important;
  transform:translateY(-1px) !important;
  filter:none !important;
}


/* PC Ecology FIX 385 - pulsante Indietro PC/smartphone */
.pc-back-btn-v385{
  background:#0f172a!important;
  color:#fff!important;
  border:0!important;
  border-radius:999px!important;
  font-weight:900!important;
  padding:8px 13px!important;
  cursor:pointer!important;
  box-shadow:0 8px 16px rgba(15,23,42,.18)!important;
  white-space:nowrap!important;
}
.pc-back-btn-v385:hover,
.pc-back-btn-v385:focus{
  filter:brightness(.96)!important;
  transform:translateY(-1px)!important;
  outline:none!important;
}
.pc-customer-payment-filter-clear-v341.pc-back-btn-v385,
.pc-tech-payment-filter-notice-v138 .pc-back-btn-v385{
  background:#0f172a!important;
  color:#fff!important;
}
@media(max-width:760px){
  .pc-back-btn-v385{width:100%!important;justify-content:center!important;text-align:center!important;}
}


/* PC Ecology FIX 386 - Selezione ticket lato tecnico per futura esportazione */
.pc-tech-ticket-selection-toolbar-v386{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  flex-wrap:wrap;
  margin:10px 0 12px;
  padding:10px 12px;
  border:1px solid rgba(15,23,42,.10);
  border-radius:14px;
  background:#f8fafc;
}
.pc-tech-ticket-selection-title-v386{
  font-weight:800;
  color:#0f172a;
  margin-right:4px;
}
.pc-tech-ticket-selection-count-v386{
  font-size:12px;
  font-weight:800;
  color:#334155;
  background:#ffffff;
  border:1px solid rgba(15,23,42,.08);
  border-radius:999px;
  padding:6px 10px;
}
.pc-tech-ticket-select-v386{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  min-height:24px;
  padding:3px 8px;
  border:1px solid rgba(37,99,235,.18);
  border-radius:999px;
  background:#eff6ff;
  color:#1d4ed8;
  font-size:11px;
  font-weight:800;
  line-height:1;
  white-space:nowrap;
  cursor:pointer;
  user-select:none;
}
.pc-tech-ticket-select-v386 input{
  width:14px;
  height:14px;
  margin:0;
  accent-color:#2563eb;
}
#allTickets .ticket:not(.pc-tech-ticket-open) .ticket-top .pc-tech-ticket-select-v386,
#allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) .pc-tech-ticket-actions-desktop .pc-tech-ticket-select-v386{
  display:inline-flex !important;
}
@media(max-width:700px){
  .pc-tech-ticket-selection-toolbar-v386{
    padding:9px 10px;
    gap:6px;
  }
  .pc-tech-ticket-selection-title-v386{
    width:100%;
    font-size:13px;
  }
  .pc-tech-ticket-selection-btn-v386{
    padding:7px 9px !important;
    font-size:12px !important;
  }
  .pc-tech-ticket-selection-count-v386{
    font-size:11px;
    padding:5px 8px;
  }
  .pc-tech-ticket-select-v386{
    padding:3px 7px;
    font-size:10px;
    min-height:22px;
  }
  .pc-tech-ticket-select-v386 input{
    width:13px;
    height:13px;
  }
}


/* PC Ecology FIX 387 - selezione ticket a sinistra + toolbar compatta */
.pc-tech-ticket-select-left-v387{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  margin:0 0 6px;
}
.pc-tech-ticket-select-left-v387 .pc-tech-ticket-select-v386{
  padding:2px 7px;
  min-height:22px;
  font-size:10px;
}
.pc-tech-ticket-export-btn-v387{
  padding:7px 12px!important;
  font-size:12px!important;
}
@media(min-width:901px){
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) .pc-tech-ticket-actions-desktop .pc-tech-ticket-select-v386{
    display:none!important;
  }
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) .pc-tech-ticket-select-left-v387{
    display:flex!important;
  }
}
@media(max-width:900px){
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) .pc-tech-ticket-select-left-v387{
    display:none!important;
  }
  .pc-tech-ticket-selection-toolbar-v386{
    align-items:flex-start;
  }
  .pc-tech-ticket-export-btn-v387{
    padding:7px 9px!important;
    font-size:12px!important;
  }
}


/* PC Ecology FIX 388 - checkbox export prima del riferimento ticket su desktop + allineamento smartphone */
@media (min-width:901px){
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) .pc-tech-ticket-select-left-v387{display:none!important}
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) .pc-tech-ticket-title{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:7px!important;flex-wrap:wrap!important;min-width:0!important}
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) .pc-tech-ticket-title-select-v388{display:inline-flex!important;align-items:center!important;justify-content:flex-start!important;flex:0 0 auto!important;order:-1!important;margin:0!important}
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) .pc-tech-ticket-title-select-v388 .pc-tech-ticket-select-v386{display:inline-flex!important;padding:2px 7px!important;min-height:22px!important;font-size:10px!important;line-height:1!important;white-space:nowrap!important}
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) .pc-tech-ticket-title-select-v388 .pc-tech-ticket-select-v386 input{width:13px!important;height:13px!important}
}
@media (max-width:900px){
  #allTickets .ticket.pc-tech-ticket-compact-card .pc-tech-ticket-title-select-v388{display:none!important}
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) .pc-tech-mobile-row-actions{display:flex!important;flex-wrap:wrap!important;align-items:center!important;justify-content:flex-start!important;gap:6px!important;overflow:visible!important;padding-left:0!important;margin-left:0!important;transform:none!important}
  #allTickets .ticket.pc-tech-ticket-compact-card:not(.pc-tech-ticket-open) .pc-tech-ticket-select-mobile-v386{margin-left:0!important;flex:0 0 auto!important;max-width:100%!important}
}

/* PC Ecology FIX 392 - Nasconde selezione/export ticket su smartphone lato tecnico
   Solo visuale mobile: su PC desktop resta invariato. */
@media (max-width:900px){
  .pc-tech-ticket-selection-toolbar-v386{
    display:none!important;
  }
  #allTickets .ticket.pc-tech-ticket-compact-card .pc-tech-ticket-select-mobile-v386,
  #allTickets .ticket.pc-tech-ticket-compact-card .pc-tech-ticket-title-select-v388,
  #allTickets .ticket.pc-tech-ticket-compact-card .pc-tech-ticket-select-left-v387,
  #allTickets .ticket.pc-tech-ticket-compact-card .pc-tech-ticket-select-v386{
    display:none!important;
  }
}
