*{box-sizing:border-box}
:root{
  --navy:#0d4b86;
  --navy-dark:#082f63;
  --gold:#e8a600;
  --gold-2:#f3b400;
  --text:#153963;
  --muted:#6c7f98;
  --line:#d6e0ec;
  --green:#119447;
  --bg:#f5f7fa;
}
html,body{margin:0;padding:0;background:var(--bg);font-family:Segoe UI,Arial,sans-serif;color:var(--text)}
button,input,textarea{font:inherit}
[hidden]{display:none!important}
.page-shell{width:min(1600px,100%);min-height:100vh;margin:0 auto;background:#fff}
.app-card{padding:18px 30px 22px}

.topbar{
  display:grid;
  grid-template-columns:minmax(390px,1fr) minmax(460px,1.3fr) minmax(360px,.9fr);
  gap:38px;
  align-items:center;
  margin-bottom:18px;
}
.logo-column{min-width:0}
.brand-logo{display:block;width:min(455px,100%);height:112px;object-fit:contain;object-position:left center}
.hero-copy{min-width:0}
.hero-copy h1{margin:0;font-size:clamp(31px,2.45vw,44px);line-height:1;color:var(--navy-dark);letter-spacing:-1.2px}
.hero-copy p{margin:17px 0 0;font-size:17px;color:#526b88}
.user-area{display:flex;justify-content:flex-end}
.recognized-card{
  width:100%;
  max-width:425px;
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:13px;
  padding:14px 14px 14px 16px;
  border:1px solid #ced9e6;
  border-radius:8px;
  background:#fff;
}
.user-icon{font-size:32px;color:var(--gold)}
.recognized-copy span{display:block;font-size:14px;color:#435d7b}
.recognized-copy strong{display:block;margin-top:4px;font-size:19px;color:var(--navy-dark)}
.btn{display:inline-flex;align-items:center;justify-content:center;border:1px solid #b9c9dc;border-radius:8px;padding:10px 15px;background:#fff;color:var(--navy-dark);font-weight:700;text-decoration:none;cursor:pointer}
.btn-outline{background:#fff}
.user-switch{white-space:nowrap}

.login-card{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:0 0 16px;padding:14px 16px;border:1px solid #dfe7ef;border-radius:10px;background:#fbfcfe}

.dropzone{
  min-height:305px;
  padding:26px 30px;
  border:2px dashed var(--gold);
  border-radius:16px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  background:linear-gradient(180deg,#fffdf7 0%,#fff 100%);
  transition:.15s ease;
}
.dropzone.drag{background:#fff9e9;border-color:#cf9200}
.cloud{font-size:60px;line-height:1;color:var(--gold);margin-bottom:12px}
.drop-title{font-size:30px;font-weight:800;color:var(--navy-dark)}
.drop-sub{margin-top:4px;font-size:22px;color:#536b88}
.or{display:flex;align-items:center;gap:18px;margin:18px 0 15px;color:#5e7591}
.or span{width:55px;height:1px;background:#cbd7e4}
.choose-actions{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap}
.btn-gold{background:linear-gradient(180deg,var(--gold-2),var(--gold));border-color:#d99700;color:#fff;box-shadow:0 4px 10px rgba(218,151,0,.16)}
.choose-btn{font-size:18px;padding:13px 24px}
.choose-folder-btn{font-size:13px;padding:11px 14px}
.upload-hint{text-align:center;margin:14px 0 22px;color:#536c8a;font-size:15px}
.upload-hint strong{color:#a46f00}

.details-row{display:grid;grid-template-columns:1.25fr .95fr 1.35fr;gap:24px;align-items:start}
.field label{display:block;margin-bottom:8px;font-weight:800;color:var(--navy-dark)}
.field label small{font-weight:400;color:#6b7f98}
.field input,.field textarea{width:100%;border:1px solid #ccd8e6;border-radius:8px;background:#fff;color:#173b64;outline:none;padding:14px 16px}
.field input:focus,.field textarea:focus{border-color:#4f80bb;box-shadow:0 0 0 3px rgba(65,119,184,.08)}
.notes-field{margin:0}
.notes-field textarea{height:86px;min-height:86px;resize:vertical}

.send-btn{
  width:100%;
  margin-top:18px;
  padding:14px 18px;
  border:0;
  border-radius:8px;
  background:linear-gradient(90deg,var(--gold),var(--gold-2),var(--gold));
  color:#fff;
  font-size:21px;
  font-weight:800;
  cursor:pointer;
}
.send-btn:disabled{opacity:.6;cursor:wait}
.progress{height:7px;margin-top:10px;border-radius:20px;overflow:hidden;background:#e6edf4}
.progress>div{height:100%;width:0;background:var(--navy)}
.status-text{min-height:18px;margin:5px 0 0;text-align:center;color:#5e728c;font-size:13px}

.result-grid{display:grid;grid-template-columns:1fr 1fr;gap:26px;margin-top:12px}
.panel{min-height:190px;padding:16px 18px;border:1px solid #cfdbe8;border-radius:10px;background:#fff}
.sent-panel{border-color:#b9ddc2}
.panel-head{display:flex;align-items:center;justify-content:space-between;gap:14px}
.panel-title{display:flex;align-items:center;font-size:18px;font-weight:800;color:var(--navy-dark)}
.count{display:inline-flex;align-items:center;justify-content:center;min-width:28px;height:28px;margin-left:10px;border-radius:50%;background:var(--navy-dark);color:#fff;font-size:13px}
.sent-count{background:#08783c}
.ok{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;background:var(--green);color:#fff;font-size:21px}
.clear-list{border:0;background:transparent;color:#be7e00;font-weight:700;cursor:pointer}
.clear-list:disabled{opacity:.45;cursor:not-allowed}
.print-btn{color:#b97800;border-color:#d7c79a}
.print-btn:disabled{opacity:.42;cursor:not-allowed}
.empty-state{height:118px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:#6d7f98}
.tray{font-size:40px;color:#788da7}
.file-list{margin-top:12px;max-height:150px;overflow:auto}
.file-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:12px;align-items:center;padding:10px 0;border-top:1px solid #edf1f5;font-size:14px}
.file-row:first-child{border-top:0}
.file-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}
.file-size{color:#627892}
.remove-file{border:0;background:transparent;color:#6e8097;font-size:22px;cursor:pointer}
.panel-total{display:flex;justify-content:space-between;padding-top:11px;margin-top:8px;border-top:1px solid #dfe7ef;font-weight:800}
.sent-summary{margin-top:11px;font-size:14px}
.sent-summary .success{margin-bottom:10px;font-weight:800;color:#168344}
.summary-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px 14px}
.summary-grid span{display:block;color:#718198;font-size:11px}
.sent-files-list{margin-top:10px;padding-top:8px;border-top:1px solid #e6ece7;max-height:95px;overflow:auto}
.sent-file{display:flex;justify-content:space-between;gap:10px;padding:4px 0}

.security-footer{
  min-height:78px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:16px 34px;
  background:linear-gradient(90deg,#07346c,#082e61);
  color:#fff;
}
.security-message{display:flex;align-items:center;gap:15px}
.shield{font-size:38px}
.security-footer strong,.security-footer span{display:block}
.security-footer span{margin-top:3px;font-size:14px}
.footer-brand{font-size:14px}
.footer-brand span{display:inline;color:var(--gold);font-weight:700}

@media (min-width:1000px) and (max-height:900px){
  .app-card{padding-top:11px;padding-bottom:13px}
  .brand-logo{height:90px}
  .topbar{margin-bottom:10px}
  .hero-copy p{margin-top:10px}
  .recognized-card{padding-top:10px;padding-bottom:10px}
  .dropzone{min-height:245px;padding-top:18px;padding-bottom:18px}
  .cloud{font-size:48px;margin-bottom:7px}
  .drop-title{font-size:26px}
  .drop-sub{font-size:19px}
  .or{margin:10px 0}
  .upload-hint{margin:9px 0 13px}
  .field input,.field textarea{padding:11px 13px}
  .notes-field textarea{height:68px;min-height:68px}
  .send-btn{margin-top:11px;padding:11px 15px;font-size:18px}
  .result-grid{margin-top:9px}
  .panel{min-height:150px;padding:13px 16px}
  .empty-state{height:82px}
  .security-footer{min-height:62px;padding-top:10px;padding-bottom:10px}
}

@media(max-width:1050px){
  .topbar{grid-template-columns:1fr 1fr}
  .user-area{grid-column:1/-1;justify-content:flex-end}
  .recognized-card{max-width:520px}
  .details-row{grid-template-columns:1fr 1fr}
  .notes-field{grid-column:1/-1}
}

@media(max-width:760px){
  .app-card{padding:18px 16px}
  .topbar{display:flex;flex-direction:column;gap:10px}
  .brand-logo{width:min(450px,100%);height:auto}
  .user-area{width:100%}
  .recognized-card{max-width:none;grid-template-columns:auto 1fr}
  .user-switch{grid-column:1/-1}
  .login-card,.details-row,.result-grid{grid-template-columns:1fr}
  .notes-field{grid-column:auto}
  .dropzone{min-height:280px}
  .security-footer{flex-direction:column;align-items:flex-start;gap:12px}
}

/* Accesso email + codice */
.access-card{margin:0 0 16px;padding:14px 16px;border:1px solid #dfe7ef;border-radius:10px;background:#fbfcfe}
.access-tabs{display:flex;gap:8px;margin-bottom:13px;flex-wrap:wrap}
.access-tab{border:1px solid #cad7e5;border-radius:999px;padding:9px 14px;background:#fff;color:#12385f;font-weight:700;cursor:pointer}
.access-tab.active{background:#0b376f;border-color:#0b376f;color:#fff}
.email-access-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:end}
.email-access-row+.email-access-row{margin-top:12px}
.email-access-status{min-height:20px;margin-top:9px;color:#5d728c;font-size:13px}
@media(max-width:760px){.email-access-row{grid-template-columns:1fr}.email-access-row .btn{width:100%}}

/* Flusso staging: prima file, poi identificazione */
.access-card[hidden]{display:none!important}
.progress{position:relative}
.progress::after{content:"";position:absolute;inset:0;border-radius:inherit;box-shadow:inset 0 0 0 1px rgba(11,55,111,.06)}
.send-btn:disabled{filter:grayscale(.15);opacity:.55}


/* Dettagli lavoro: 4 colonne sulla stessa riga.
   Paziente = 1 colonna, Tinta = 1 colonna, Note = 2 colonne. */
.details-row{
  display:grid;
  grid-template-columns:1fr 1fr 1fr 1fr;
  gap:18px;
  align-items:start;
}
.details-row .field:nth-child(1){grid-column:span 1}
.details-row .field:nth-child(2){grid-column:span 1}
.details-row .notes-field{grid-column:span 2;margin:0}
.details-row .notes-field textarea{
  height:52px;
  min-height:52px;
  resize:vertical;
}
.details-row[hidden]{display:none!important}

@media(max-width:900px){
  .details-row{grid-template-columns:1fr 1fr}
  .details-row .notes-field{grid-column:1 / -1}
}
@media(max-width:620px){
  .details-row{grid-template-columns:1fr}
  .details-row .notes-field{grid-column:auto}
}


/* ===== Layout V3: Allegati -> Dettagli -> Identificazione -> Invio -> Riepilogo ===== */
.top-upload-grid{
  display:grid;
  grid-template-columns:minmax(0,1.45fr) minmax(360px,.85fr);
  gap:22px;
  align-items:stretch;
}
.upload-card-wrap,.attachments-card-wrap{min-width:0}
.attachments-card-wrap .panel{height:100%;min-height:100%}
.attachments-card-wrap .empty-state{min-height:150px}
.dropzone{height:100%;min-height:300px}
.upload-hint{margin-top:10px}

.details-row{
  display:grid;
  grid-template-columns:1fr 1fr 2fr;
  gap:18px;
  align-items:start;
  margin-top:16px;
}
.details-row .notes-field{grid-column:auto;margin:0}
.details-row .notes-field textarea{height:52px;min-height:52px}
.details-row[hidden]{display:none!important}

.access-card{margin-top:14px}
.email-flow-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
  align-items:end;
}
.email-request-half,.email-code-half{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  align-items:end;
}
.email-code-half[hidden]{display:none!important}
.email-request-half .btn,.email-code-half .btn{min-width:145px;white-space:nowrap}

.result-grid{grid-template-columns:1fr}
.result-grid .sent-panel{width:100%}

@media(max-width:980px){
  .top-upload-grid{grid-template-columns:1fr}
  .details-row{grid-template-columns:1fr 1fr}
  .details-row .notes-field{grid-column:1/-1}
  .email-flow-row{grid-template-columns:1fr}
}
@media(max-width:650px){
  .details-row{grid-template-columns:1fr}
  .details-row .notes-field{grid-column:auto}
  .email-request-half,.email-code-half{grid-template-columns:1fr}
  .email-request-half .btn,.email-code-half .btn{width:100%}
}

.app-version{
  display:block;
  margin-top:4px;
  font-size:11px;
  opacity:.72;
  letter-spacing:.2px;
}

/* v0.8.5 - upload più compatto */
.hero,.header-card{padding-top:16px;padding-bottom:16px}
.hero h1,.header-card h1{font-size:clamp(24px,2.1vw,34px);line-height:1.08}
.hero p,.header-card p{font-size:14px}
.top-upload-grid{gap:16px}
.dropzone{min-height:225px;padding:25px 22px}
.dropzone h2,.dropzone-title{font-size:23px}
.dropzone p,.dropzone-subtitle{font-size:13px}
.dropzone-icon{transform:scale(.82);transform-origin:center}
.panel,.access-card,.login-card{padding:16px}
.panel h2,.panel-title{font-size:16px}
.attachments-card-wrap .empty-state{min-height:110px;font-size:13px}
.details-row{gap:12px;margin-top:11px}
.field label{font-size:12px}
.field input,.field textarea,.field select{padding:8px 10px;font-size:13px}
.details-row .notes-field textarea{height:42px;min-height:42px}
.btn,button{min-height:36px;padding:7px 13px;font-size:13px}
.access-card{margin-top:10px}.access-tabs{margin-bottom:8px}
.access-tab{padding:7px 11px;font-size:12px}
.upload-hint,.helper-text,.muted{font-size:12px}
.result-grid{margin-top:12px}
@media(max-width:700px){.dropzone{min-height:195px;padding:20px 15px}.dropzone h2,.dropzone-title{font-size:20px}.panel,.access-card,.login-card{padding:13px}}


/* ===== v0.9.2 - autenticazione compatta in alto a destra ===== */
.topbar{
  grid-template-columns:minmax(320px,.95fr) minmax(420px,1.25fr) minmax(430px,1fr);
  gap:24px;
  align-items:start;
}
.user-area{
  min-width:0;
  display:flex;
  justify-content:flex-end;
}
.top-auth-card{
  width:100%;
  max-width:500px;
  border:1px solid #d6e0eb;
  border-radius:10px;
  background:#fff;
  padding:11px;
}
.top-auth-tabs{
  display:flex;
  gap:7px;
  margin-bottom:8px;
}
.top-auth-tab{
  flex:1;
  min-height:32px;
  padding:6px 9px;
  border-radius:7px;
  border:1px solid #c8d5e4;
  background:#fff;
  color:#15385f;
  font-size:11px;
  font-weight:700;
  cursor:pointer;
}
.top-auth-tab.active{
  background:#0b4b93;
  border-color:#0b4b93;
  color:#fff;
}
.top-auth-pane[hidden]{display:none!important}
.top-login-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;
  gap:7px;
}
.top-login-grid input,
.top-email-grid input{
  min-width:0;
  height:35px;
  padding:7px 9px;
  border:1px solid #c8d5e4;
  border-radius:7px;
  font-size:12px;
}
.top-login-btn{min-width:72px}
.top-email-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:7px;
}
.top-code-row{
  grid-column:1/-1;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:7px;
}
.top-code-row[hidden]{display:none!important}
.top-auth-card .btn{
  min-height:35px;
  padding:7px 10px;
  font-size:11px;
}
.top-auth-status{
  min-height:15px;
  margin-top:5px;
  font-size:10px;
  color:#657a92;
}
.recognized-card{
  width:100%;
  max-width:500px;
}
@media(max-width:1180px){
  .topbar{grid-template-columns:1fr 1fr}
  .user-area{grid-column:1/-1}
  .top-auth-card,.recognized-card{max-width:none}
}
@media(max-width:720px){
  .topbar{grid-template-columns:1fr}
  .user-area{grid-column:auto}
  .top-login-grid{grid-template-columns:1fr}
  .top-email-grid{grid-template-columns:1fr}
  .top-code-row{grid-template-columns:1fr}
}


/* ===== v0.9.3 - stato pulsante invio ===== */
.send-btn.is-sending,
.send-btn.is-sending:disabled{
  cursor:wait!important;
}
.send-btn.is-sent,
.send-btn.is-sent:disabled{
  cursor:default!important;
  opacity:1!important;
  filter:none!important;
}


/* ===== v0.9.4 - riepilogo al posto della lista allegati ===== */
.final-receipt-panel{
  border-color:#b9dfc4!important;
  background:#fbfffc;
}
.top-receipt-success{
  color:#0a8f3d;
  font-weight:800;
  font-size:13px;
  margin:8px 0 12px;
}
.top-receipt-grid{
  display:grid;
  grid-template-columns:1.2fr 1fr 1fr;
  gap:10px;
  margin-bottom:12px;
}
.top-receipt-grid>div{
  border:1px solid #dce7df;
  border-radius:8px;
  padding:9px 10px;
  background:#fff;
}
.top-receipt-grid span{
  display:block;
  font-size:10px;
  color:#708196;
}
.top-receipt-grid strong{
  display:block;
  margin-top:3px;
  font-size:12px;
  color:#0b376f;
}
.top-receipt-files{
  border-top:1px solid #dfe8e2;
  max-height:130px;
  overflow:auto;
}
.top-receipt-files .sent-file{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  padding:9px 0;
  border-bottom:1px solid #edf2ee;
  font-size:12px;
}
@media(max-width:700px){
  .top-receipt-grid{grid-template-columns:1fr}
}


/* ===== v0.9.5 - layout iniziale pulito e box principali più alti ===== */
.top-upload-grid{
  align-items:stretch;
}
.dropzone{
  min-height:320px!important;
  padding-top:42px!important;
  padding-bottom:42px!important;
}
.attachments-card-wrap .panel,
.selected-panel{
  min-height:320px!important;
  height:100%;
}
.attachments-card-wrap .empty-state{
  min-height:220px!important;
}
@media(max-width:700px){
  .dropzone{
    min-height:250px!important;
    padding-top:30px!important;
    padding-bottom:30px!important;
  }
  .attachments-card-wrap .panel,
  .selected-panel{
    min-height:250px!important;
  }
  .attachments-card-wrap .empty-state{
    min-height:160px!important;
  }
}


/* ===== v0.9.6 - logo più piccolo e pagina riempita in altezza ===== */
html, body{
  min-height:100%;
}
body{
  min-height:100vh;
}
.page-shell{
  min-height:100vh;
  display:flex;
  flex-direction:column;
}
.app-card{
  flex:1;
  display:flex;
  flex-direction:column;
}
#uploadForm{
  flex:1;
  display:flex;
  flex-direction:column;
}

/* Logo più compatto */
.brand-logo{
  width:330px!important;
  max-width:100%!important;
  height:auto!important;
}
.logo-column{
  align-self:start;
}

/* Più spazio verticale nella parte centrale */
.top-upload-grid{
  flex:1;
  min-height:420px;
  align-items:stretch;
}
.upload-card-wrap,
.attachments-card-wrap{
  display:flex;
}
.dropzone,
.attachments-card-wrap .panel,
.selected-panel{
  min-height:420px!important;
  height:100%!important;
}
.dropzone{
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.attachments-card-wrap .empty-state{
  min-height:300px!important;
}

/* Mantieni il pulsante invio e il footer verso il fondo pagina */
.send-btn{
  margin-top:18px;
}
.security-footer{
  margin-top:auto;
}

/* Header un po' più compatto per lasciare più spazio alla parte centrale */
.topbar{
  padding-top:12px!important;
  padding-bottom:12px!important;
}
.hero-copy h1{
  margin-top:0;
}
.hero-copy p{
  margin-bottom:0;
}

@media(max-width:1180px){
  .brand-logo{width:290px!important}
  .top-upload-grid{min-height:360px}
  .dropzone,
  .attachments-card-wrap .panel,
  .selected-panel{min-height:360px!important}
  .attachments-card-wrap .empty-state{min-height:240px!important}
}

@media(max-width:700px){
  .brand-logo{width:240px!important}
  .top-upload-grid{min-height:auto}
  .dropzone,
  .attachments-card-wrap .panel,
  .selected-panel{min-height:260px!important}
  .attachments-card-wrap .empty-state{min-height:170px!important}
}


/* ===== v0.9.7 - conserva layout precedente, riduce logo e titolo su una riga ===== */

/* Ripristino proporzioni orizzontali del layout v0.9.5 */
.top-upload-grid{
  display:grid!important;
  grid-template-columns:minmax(0,1.45fr) minmax(360px,.85fr)!important;
  gap:16px!important;
  align-items:stretch!important;
  min-height:unset!important;
  flex:none!important;
}
.upload-card-wrap,
.attachments-card-wrap{
  display:block!important;
}
.dropzone,
.attachments-card-wrap .panel,
.selected-panel{
  width:100%!important;
  min-height:360px!important;
  height:100%!important;
}
.attachments-card-wrap .empty-state{
  min-height:245px!important;
}

/* Logo ancora più piccolo */
.brand-logo{
  width:285px!important;
  max-width:100%!important;
  height:auto!important;
}

/* Titolo su una sola riga */
.hero-copy h1{
  white-space:nowrap!important;
  font-size:clamp(24px,2.05vw,34px)!important;
  line-height:1.05!important;
}

/* La parte centrale resta alta ma senza restringere i box */
#uploadForm{
  display:block!important;
}
.app-card{
  display:block!important;
}
.page-shell{
  min-height:100vh;
}
.security-footer{
  margin-top:24px!important;
}

@media(max-width:1180px){
  .top-upload-grid{
    grid-template-columns:1fr!important;
  }
  .brand-logo{
    width:255px!important;
  }
  .hero-copy h1{
    white-space:normal!important;
  }
}

@media(max-width:700px){
  .brand-logo{
    width:225px!important;
  }
  .dropzone,
  .attachments-card-wrap .panel,
  .selected-panel{
    min-height:260px!important;
  }
}


/* ===== v0.9.8 - flusso più chiaro: prima allegati, poi identificazione ===== */
.send-btn[hidden]{
  display:none!important;
}

.top-auth-card{
  border:1px solid #d5e1ee!important;
  box-shadow:0 4px 16px rgba(14,56,105,.05);
}
.top-auth-tab.active{
  box-shadow:0 2px 6px rgba(11,75,147,.12);
}
.top-auth-status{
  font-weight:600;
}


/* ===== v0.9.9 - barra invio usata come guida all'identificazione ===== */
.send-btn.identify-guide,
.send-btn.identify-guide:disabled{
  display:flex!important;
  align-items:center;
  justify-content:center;
  opacity:1!important;
  cursor:default!important;
  background:#eef4fa!important;
  border:1px solid #bfd0e2!important;
  color:#0b376f!important;
  box-shadow:none!important;
  font-size:15px!important;
  font-weight:700!important;
}
.send-btn.identify-guide::before{
  content:"ⓘ";
  margin-right:10px;
  color:#d49300;
  font-size:18px;
}
.send-btn.ready-to-send{
  background:#f2b400!important;
  color:#fff!important;
}


/* ===== v1.0.1 - box principali più alti per riempire la pagina ===== */
.top-upload-grid{
  align-items:stretch!important;
}

.dropzone,
.attachments-card-wrap .panel,
.selected-panel{
  min-height:430px!important;
  height:430px!important;
}

.dropzone{
  padding-top:50px!important;
  padding-bottom:50px!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
}

.attachments-card-wrap .empty-state{
  min-height:315px!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
}

.upload-hint{
  margin-top:8px!important;
}

/* Riduce il vuoto sotto la barra informativa e porta il footer più in basso */
.security-footer{
  margin-top:18px!important;
}

@media(max-width:1180px){
  .dropzone,
  .attachments-card-wrap .panel,
  .selected-panel{
    min-height:370px!important;
    height:370px!important;
  }
  .attachments-card-wrap .empty-state{
    min-height:255px!important;
  }
}

@media(max-width:700px){
  .dropzone,
  .attachments-card-wrap .panel,
  .selected-panel{
    min-height:280px!important;
    height:auto!important;
  }
  .attachments-card-wrap .empty-state{
    min-height:180px!important;
  }
}
\n/* ===== v1.0.2 - layout centrale a tre box ===== */
.hero-copy h1{font-size:clamp(22px,1.8vw,30px)!important}
.brand-logo{width:300px!important;max-width:100%!important}
.top-upload-grid{
 display:grid!important;
 grid-template-columns:minmax(320px,.95fr) minmax(280px,.72fr) minmax(420px,1.25fr)!important;
 gap:16px!important;align-items:stretch!important;min-height:unset!important;
}
.upload-card-wrap{grid-column:1!important}.details-row{grid-column:2!important}.attachments-card-wrap{grid-column:3!important}
.details-row{
 display:flex!important;flex-direction:column!important;gap:16px!important;margin:0!important;padding:20px!important;
 border:1px solid #d4dfec!important;border-radius:10px!important;background:#fff!important;box-sizing:border-box!important;
 grid-template-columns:none!important;
}
.details-row[hidden]{display:none!important}
.details-row:not([hidden])::before{content:"👤  PAZIENTE E NOTE   (facoltativo)";color:#07366f;font-weight:800;font-size:16px;margin-bottom:4px}
.details-row .field,.details-row .notes-field{width:100%!important;grid-column:auto!important;margin:0!important}
.details-row input,.details-row textarea{width:100%!important;box-sizing:border-box!important}
.details-row .notes-field textarea{height:130px!important;min-height:130px!important;resize:vertical}
.dropzone,.attachments-card-wrap .panel,.selected-panel,.details-row{min-height:440px!important;height:440px!important;box-sizing:border-box!important}
.dropzone{display:flex!important;flex-direction:column!important;justify-content:center!important}
.attachments-card-wrap .panel,.selected-panel{overflow:hidden!important}
@media(max-width:1250px){.top-upload-grid{grid-template-columns:minmax(280px,.9fr) minmax(240px,.7fr) minmax(340px,1.1fr)!important}.brand-logo{width:270px!important}}
@media(max-width:980px){.top-upload-grid{grid-template-columns:1fr!important}.upload-card-wrap,.details-row,.attachments-card-wrap{grid-column:1!important}.dropzone,.attachments-card-wrap .panel,.selected-panel,.details-row{height:auto!important;min-height:300px!important}}


/* ===== v1.0.3 - login indipendente dalla selezione file ===== */
.top-auth-login-note{
  margin:0 0 7px;
  padding:5px 8px;
  border-radius:6px;
  background:#f6f9fc;
  color:#637a94;
  font-size:10px;
  text-align:center;
}
.top-login-btn:disabled{
  opacity:.55;
  cursor:not-allowed;
}


/* ===== v1.0.4 - placeholder centrale prima degli allegati ===== */
.details-row{
  position:relative;
}
.details-placeholder{
  display:none;
  flex:1;
  min-height:100%;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  text-align:center;
  gap:8px;
  color:#6b7f96;
  padding:28px;
}
.details-placeholder-icon{
  width:58px;
  height:58px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:#f1f6fb;
  font-size:28px;
}
.details-placeholder strong{
  color:#0b376f;
  font-size:18px;
}
.details-placeholder span{
  max-width:270px;
  font-size:13px;
  line-height:1.45;
}
.details-row.is-empty .details-placeholder{
  display:flex;
}
.details-row.is-empty > *:not(.details-placeholder){
  display:none!important;
}

/* Quando i file sono presenti, i campi tornano visibili */
.details-row:not(.is-empty) .details-placeholder{
  display:none!important;
}


/* ===== v1.0.5 - baseline logica stabile ===== */
.top-upload-grid{
  display:grid!important;
  grid-template-columns:minmax(330px,.95fr) minmax(300px,.72fr) minmax(420px,1.25fr)!important;
  gap:16px!important;
  align-items:stretch!important;
}
.upload-card-wrap{grid-column:1!important;grid-row:1!important}
.details-row{grid-column:2!important;grid-row:1!important}
.attachments-card-wrap{grid-column:3!important;grid-row:1!important}

.dropzone,
.details-row,
.attachments-card-wrap .panel,
.selected-panel{
  min-height:440px!important;
  height:440px!important;
  box-sizing:border-box!important;
}
.details-row{
  display:flex!important;
  flex-direction:column!important;
  padding:20px!important;
  border:1px solid #d4dfec!important;
  border-radius:10px!important;
  background:#fff!important;
  overflow:hidden;
}
.details-placeholder{
  display:none;
  flex:1;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  text-align:center;
  gap:9px;
  padding:24px;
  color:#6b7f96;
}
.details-placeholder-icon{
  width:58px;height:58px;display:flex;align-items:center;justify-content:center;
  border-radius:50%;background:#f1f6fb;font-size:28px;
}
.details-placeholder strong{color:#0b376f;font-size:18px}
.details-placeholder span{max-width:250px;font-size:13px;line-height:1.45}
.details-fields{display:flex;flex-direction:column;gap:16px;height:100%}
.details-fields .field{width:100%}
.details-fields textarea{min-height:125px!important;resize:vertical}
.details-row.is-empty .details-placeholder{display:flex!important}
.details-row.is-empty .details-fields{display:none!important}

.selected-panel .empty-state small{
  display:block;margin-top:8px;color:#8a9ab0;font-size:11px;
}
.file-list{
  max-height:315px!important;
  overflow:auto!important;
}
.file-row{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto 28px!important;
  gap:10px!important;
  align-items:center!important;
  min-height:50px;
}
.file-name{
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
.file-size{white-space:nowrap!important}

@media(max-width:1100px){
  .top-upload-grid{grid-template-columns:1fr!important}
  .upload-card-wrap,.details-row,.attachments-card-wrap{
    grid-column:1!important;grid-row:auto!important;
  }
  .dropzone,.details-row,.attachments-card-wrap .panel,.selected-panel{
    height:auto!important;min-height:300px!important;
  }
}


/* ===== v1.0.9 - dettagli per singolo file ===== */
.file-defaults-help{
  font-size:11px;
  line-height:1.4;
  color:#718197;
  padding:9px 10px;
  border-radius:7px;
  background:#f6f9fc;
}
.apply-all-btn{width:100%}

.file-item-card{
  border-bottom:1px solid #e6edf4;
}
.file-item-card .file-row{
  grid-template-columns:minmax(0,1fr) auto auto 26px!important;
}
.file-details-toggle{
  border:0;
  background:transparent;
  color:#0b4b93;
  font-size:11px;
  font-weight:700;
  cursor:pointer;
}
.file-detail-summary{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
  padding:0 4px 8px 28px;
  font-size:10px;
  color:#74869b;
}
.file-detail-summary strong{
  color:#a16b00;
  background:#fff7df;
  padding:2px 6px;
  border-radius:10px;
}
.file-detail-summary em{
  font-style:normal;
  color:#8da0b4;
}
.file-details-editor{
  margin:0 0 10px 26px;
  padding:12px;
  border:1px solid #d8e3ee;
  border-radius:8px;
  background:#f9fbfd;
}
.file-details-editor[hidden]{display:none!important}
.file-details-editor label{
  display:block;
  margin-bottom:9px;
  font-size:11px;
  font-weight:700;
  color:#123c6c;
}
.file-details-editor input,
.file-details-editor textarea{
  width:100%;
  box-sizing:border-box;
  margin-top:4px;
  padding:8px 9px;
  border:1px solid #cbd8e6;
  border-radius:6px;
  font:inherit;
  font-weight:400;
}
.file-details-editor textarea{
  min-height:70px;
  resize:vertical;
}
.file-details-actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
}
.sent-file-detailed > div{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}
.sent-file-detailed strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.sent-file-detailed small{
  color:#73859a;
}


/* ===== v2.0.0 EXP - ramo sperimentale: box unico / tabella raggruppata ===== */

.upload-workbench{
  width:100%;
  border:1px solid #d4dfec;
  border-radius:12px;
  background:#fff;
  overflow:hidden;
  min-height:470px;
}

.workbench-drop{
  min-height:470px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:46px 30px;
  box-sizing:border-box;
}
.workbench-drop[hidden]{display:none!important}
.workbench-drop.drag{
  background:#f4f9ff;
  outline:3px dashed #8cb9e8;
  outline-offset:-12px;
}
.drop-rules{
  margin-top:18px;
  font-size:11px;
  color:#8090a3;
}

.workbench-table{
  min-height:470px;
  display:flex;
  flex-direction:column;
}
.workbench-table[hidden]{display:none!important}

.workbench-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:13px 16px;
  border-bottom:1px solid #e1e8ef;
  background:#fbfcfe;
}
.workbench-toolbar>div:first-child{
  display:flex;
  align-items:center;
  gap:8px;
  color:#0b376f;
}
.workbench-toolbar #selectedCount{
  min-width:22px;
  height:22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:#eaf1f8;
  color:#45627f;
  font-size:11px;
}
.workbench-actions{
  display:flex;
  gap:7px;
  align-items:center;
  flex-wrap:wrap;
}
.compact-btn{
  min-height:31px!important;
  padding:5px 10px!important;
  font-size:11px!important;
}

.global-details-bar{
  padding:12px 16px;
  border-bottom:1px solid #e1e8ef;
  background:#fffaf0;
}
.global-details-bar[hidden]{display:none!important}
.global-details-title{
  display:flex;
  align-items:baseline;
  gap:10px;
  margin-bottom:9px;
}
.global-details-title strong{color:#0b376f}
.global-details-title span{font-size:10px;color:#7e8da0}
.global-details-grid{
  display:grid;
  grid-template-columns:1fr .6fr 1.4fr;
  gap:10px;
}
.global-details-grid label,
.group-row label{
  display:flex;
  flex-direction:column;
  gap:4px;
  font-size:9px;
  color:#718197;
}
.global-details-grid input,
.group-row input,
.inline-file-editor input{
  width:100%;
  box-sizing:border-box;
  border:1px solid #cad6e3;
  border-radius:6px;
  padding:7px 8px;
  font-size:11px;
}

.file-table-head,
.receipt-table-head{
  display:grid;
  grid-template-columns:minmax(280px,2fr) minmax(150px,1fr) minmax(90px,.5fr) minmax(180px,1.2fr) 70px;
  gap:8px;
  padding:9px 14px;
  background:#f5f8fb;
  border-bottom:1px solid #dde6ef;
  color:#657b94;
  font-size:9px;
  font-weight:800;
  letter-spacing:.5px;
  text-transform:uppercase;
}

.grouped-file-list{
  flex:1;
  overflow:auto;
  min-height:0;
}

.group-row{
  display:grid;
  grid-template-columns:minmax(280px,2fr) minmax(150px,1fr) minmax(90px,.5fr) minmax(180px,1.2fr) 70px;
  gap:8px;
  align-items:end;
  padding:11px 14px;
  background:#edf5ff;
  border-bottom:1px solid #cfe0f2;
}
.group-name{
  display:flex;
  gap:8px;
  align-items:center;
  min-width:0;
}
.group-name strong{
  display:block;
  color:#0b376f;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.group-name small{
  display:block;
  margin-top:2px;
  color:#718399;
  font-size:9px;
}
.group-toggle{
  border:0;background:transparent;color:#0b4b93;font-size:16px;cursor:pointer;
}
.group-save{
  min-height:30px;
  border:0;
  border-radius:6px;
  background:#0b4b93;
  color:#fff;
  font-size:10px;
  font-weight:700;
  cursor:pointer;
}

.work-file-row{
  display:grid;
  grid-template-columns:minmax(280px,2fr) minmax(150px,1fr) minmax(90px,.5fr) minmax(180px,1.2fr) 70px;
  gap:8px;
  align-items:center;
  padding:8px 14px;
  border-bottom:1px solid #edf1f5;
  position:relative;
}
.work-file-row.grouped-child .work-file-name{
  padding-left:24px;
}
.work-file-name{
  min-width:0;
  color:#173b64;
  font-size:11px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.work-file-name small{
  display:block;
  color:#8a9aae;
  font-size:8px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  margin-top:2px;
}

.detail-cell{
  width:100%;
  min-width:0;
  border:0;
  border-radius:5px;
  padding:7px 8px;
  text-align:left;
  font-size:10px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  cursor:pointer;
}
.inherited-cell{
  background:#f6f8fa;
  color:#8897a8;
  font-style:italic;
}
.custom-cell{
  background:#fff7df;
  color:#6f5000;
  font-weight:700;
}
.file-row-actions{
  display:flex;
  justify-content:flex-end;
  gap:3px;
}
.edit-file,.remove-file{
  width:28px;height:28px;border:0;border-radius:5px;background:transparent;cursor:pointer;
}
.edit-file{color:#0b4b93}
.remove-file{color:#b54848}

.inline-file-editor{
  grid-column:1/-1;
  display:grid;
  grid-template-columns:1fr .6fr 1.4fr auto;
  gap:9px;
  align-items:end;
  padding:10px;
  margin-top:4px;
  border:1px solid #d7e4ef;
  border-radius:7px;
  background:#f9fbfd;
}
.inline-file-editor[hidden]{display:none!important}
.inline-file-editor label{
  display:flex;flex-direction:column;gap:4px;font-size:9px;color:#718197;
}
.inline-editor-actions{
  display:flex;gap:6px;
}

.workbench-footer{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px 14px;
  border-top:1px solid #dde6ef;
  background:#fbfcfe;
  font-size:10px;
  color:#61758d;
}
.legend{display:flex;align-items:center;gap:6px}
.legend-dot{width:9px;height:9px;border-radius:2px;display:inline-block}
.legend-dot.inherited{background:#e7ebef}
.legend-dot.custom{background:#f6d46c;margin-left:8px}

.receipt-head{
  display:flex;justify-content:space-between;align-items:center;padding:16px;border-bottom:1px solid #dce7df;background:#fbfffc;
}
.receipt-head strong{display:block;color:#0a8f3d}
.receipt-head span{display:block;color:#60758d;font-size:11px;margin-top:3px}
.receipt-table-head{
  grid-template-columns:minmax(280px,2fr) minmax(150px,1fr) minmax(90px,.5fr) minmax(180px,1.2fr)!important;
}
.receipt-row{
  display:grid;
  grid-template-columns:minmax(280px,2fr) minmax(150px,1fr) minmax(90px,.5fr) minmax(180px,1.2fr);
  gap:8px;padding:10px 14px;border-bottom:1px solid #edf1f5;font-size:10px;
}
.receipt-total{padding:12px 14px;text-align:right;font-weight:700;color:#0b376f}

@media(max-width:1000px){
  .file-table-head{display:none}
  .group-row,.work-file-row{
    grid-template-columns:1fr;
  }
  .group-row label{display:block}
  .inline-file-editor{grid-template-columns:1fr}
  .global-details-grid{grid-template-columns:1fr}
  .workbench-toolbar{align-items:flex-start;flex-direction:column}
}


/* ===== v2.0.1 EXP - tabella semplice editabile senza pulsanti salva ===== */

.file-table-head{
  grid-template-columns:minmax(300px,2fr) minmax(170px,1fr) minmax(100px,.55fr) minmax(220px,1.35fr) 40px!important;
}

.simple-table-row{
  display:grid;
  grid-template-columns:minmax(300px,2fr) minmax(170px,1fr) minmax(100px,.55fr) minmax(220px,1.35fr) 40px;
  gap:8px;
  align-items:center;
  padding:8px 14px;
  border-bottom:1px solid #edf1f5;
}

.group-simple-row{
  background:#edf5ff;
  border-bottom:1px solid #cfe0f2;
}

.simple-name{
  min-width:0;
}
.simple-name strong{
  display:block;
  color:#173b64;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:11px;
}
.group-simple-row .simple-name strong{
  color:#0b376f;
  font-size:12px;
}
.simple-name small{
  display:block;
  margin-top:3px;
  color:#8292a5;
  font-size:9px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.simple-table-row input{
  width:100%;
  min-width:0;
  box-sizing:border-box;
  height:34px;
  padding:7px 8px;
  border:1px solid #ced9e5;
  border-radius:6px;
  background:#fff;
  color:#173b64;
  font-size:11px;
}
.simple-table-row input:focus{
  outline:none;
  border-color:#79a9d7;
  box-shadow:0 0 0 2px rgba(51,119,184,.10);
}
.group-simple-row input{
  background:#fff;
  border-color:#bed2e7;
}

.simple-actions{
  display:flex;
  justify-content:flex-end;
}
.remove-group,
.simple-actions .remove-file{
  width:28px;
  height:28px;
  border:0;
  border-radius:5px;
  background:transparent;
  color:#b54848;
  font-size:18px;
  cursor:pointer;
}

/* Niente righe figlie visibili per i gruppi: i dettagli si compilano solo sul gruppo. */
.group-row,
.work-file-row,
.inline-file-editor,
.detail-cell,
.file-row-actions{
  display:none!important;
}

.legend{
  display:none!important;
}

@media(max-width:1000px){
  .simple-table-row{
    grid-template-columns:1fr;
    padding:12px;
  }
  .simple-actions{
    justify-content:flex-start;
  }
}


/* ===== v2.0.2 EXP - mostra nomi file nei gruppi ===== */
.group-child-file-row{
  display:grid!important;
  grid-template-columns:minmax(300px,2fr) minmax(170px,1fr) minmax(100px,.55fr) minmax(220px,1.35fr) 40px;
  gap:8px;
  align-items:center;
  min-height:38px;
  padding:5px 14px;
  border-bottom:1px solid #edf1f5;
  background:#fbfdff;
}

.group-child-name{
  min-width:0;
  padding-left:22px;
  color:#526d89;
  font-size:10px;
}

.group-child-name span{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.group-child-name small{
  display:block;
  margin-top:2px;
  color:#93a1b1;
  font-size:8px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.group-child-inherited{
  color:#9aa8b7;
  font-size:9px;
  font-style:italic;
}

/* Le righe figlie mostrano solo il nome: nessun campo editabile individuale. */
.group-child-file-row input,
.group-child-file-row button{
  display:none!important;
}

@media(max-width:1000px){
  .group-child-file-row{
    grid-template-columns:1fr!important;
    padding:7px 12px;
  }
  .group-child-inherited{
    padding-left:22px;
  }
}


/* ===== v2.0.3 EXP - gruppi più leggibili, niente X gruppo ===== */

.group-simple-row{
  background:#e8f2fc!important;
  border-top:2px solid #9fc3e6!important;
  border-bottom:1px solid #bdd4ea!important;
  padding-top:11px!important;
  padding-bottom:11px!important;
}

.group-simple-row .simple-name{
  position:relative;
  padding-left:12px;
}

.group-simple-row .simple-name::before{
  content:"";
  position:absolute;
  left:0;
  top:1px;
  bottom:1px;
  width:4px;
  border-radius:4px;
  background:#0b4b93;
}

.group-simple-row .simple-name strong{
  font-size:12px!important;
  font-weight:800!important;
  color:#07366f!important;
}

.group-simple-row .simple-name small{
  color:#526f8e!important;
  font-weight:600;
}

.group-child-file-row{
  background:#fbfdff!important;
  border-left:4px solid #d6e5f3;
  padding-left:20px!important;
}

.group-child-file-row:last-of-type{
  border-bottom-color:#c8d9e9!important;
}

/* Nessun comando di cancellazione sulla riga gruppo:
   per azzerare i dettagli basta svuotare i campi. */
.group-simple-row .simple-actions{
  min-height:1px;
}

.group-simple-row .remove-group{
  display:none!important;
}

/* Tolto il testo "usa dati del gruppo". */
.group-child-inherited{
  display:none!important;
}


/* ===== v2.0.4 EXP - accodamento + continuità tabella/report ===== */

.append-dropzone{
  border-top:1px dashed #c7d6e4;
  border-bottom:1px solid #e2e8ef;
  padding:13px 16px;
  background:#fbfdff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.append-dropzone.drag{
  background:#eef6ff;
  outline:2px dashed #78a9d8;
  outline-offset:-6px;
}
.append-drop-text{
  color:#58728d;
  font-size:11px;
  font-weight:700;
}
.append-actions{
  display:flex;
  gap:7px;
}

/* Finestra file inviati: stessa gerarchia visiva della tabella di lavoro */
.receipt-group-row{
  display:grid;
  grid-template-columns:minmax(280px,2fr) minmax(150px,1fr) minmax(90px,.5fr) minmax(180px,1.2fr);
  gap:8px;
  padding:11px 14px;
  background:#e8f2fc;
  border-top:2px solid #9fc3e6;
  border-bottom:1px solid #bdd4ea;
  font-size:10px;
}
.receipt-group-row strong{
  display:block;
  color:#07366f;
  font-size:11px;
}
.receipt-group-row small{
  display:block;
  color:#607993;
  margin-top:2px;
  font-size:9px;
}
.receipt-file-child{
  display:grid;
  grid-template-columns:minmax(280px,2fr) minmax(150px,1fr) minmax(90px,.5fr) minmax(180px,1.2fr);
  gap:8px;
  padding:7px 14px 7px 34px;
  background:#fbfdff;
  border-left:4px solid #d6e5f3;
  border-bottom:1px solid #edf1f5;
  color:#587089;
  font-size:9px;
}

@media(max-width:1000px){
  .append-dropzone{
    flex-direction:column;
    align-items:flex-start;
  }
  .receipt-group-row,
  .receipt-file-child{
    grid-template-columns:1fr!important;
  }
}


/* ===== v2.0.5 EXP - accodamento drag & drop reale ===== */

.workbench-table{
  position:relative!important;
}

.append-dropzone{
  display:flex!important;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 16px;
  border-top:1px dashed #a9bfd5;
  background:#f8fbfe;
  flex:0 0 auto;
}

.append-dropzone.drag{
  background:#eaf5ff;
  border-color:#4f91cf;
  box-shadow:inset 0 0 0 2px rgba(79,145,207,.16);
}

.append-drop-copy{
  display:flex;
  flex-direction:column;
  gap:3px;
}

.append-drop-copy strong{
  color:#0b4b93;
  font-size:12px;
}

.append-drop-copy span{
  color:#7c8da0;
  font-size:9px;
}

.append-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.table-drop-overlay{
  position:absolute;
  inset:0;
  z-index:50;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(238,247,255,.94);
  border:3px dashed #4f91cf;
  border-radius:10px;
  pointer-events:none;
  color:#0b4b93;
  font-size:18px;
  font-weight:800;
  text-align:center;
  padding:30px;
  box-sizing:border-box;
}

.table-drop-overlay[hidden]{
  display:none!important;
}

.workbench-table.table-drag-active{
  outline:2px solid rgba(79,145,207,.25);
  outline-offset:2px;
}

@media(max-width:900px){
  .append-dropzone{
    flex-direction:column;
    align-items:flex-start;
  }
}


/* ===== v2.0.6 EXP - toolbar superiore semplificata ===== */
.workbench-toolbar .workbench-actions > label.compact-btn{
  display:none!important;
}


/* ===== v2.0.7 EXP - ripristino X sulla riga gruppo ===== */
.group-simple-row .remove-group{
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  width:28px;
  height:28px;
  border:0;
  border-radius:5px;
  background:transparent;
  color:#b54848;
  font-size:18px;
  cursor:pointer;
}
.group-simple-row .remove-group:hover{
  background:#fff0f0;
}

/* ===== v2.0.8 EXP - selezione multipla robusta ===== */
.append-drop-copy span::after{
  content:" · Puoi selezionare più file insieme";
}


/* ===== v2.1.0 EXP - azioni schermata finale ===== */
.receipt-head-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.receipt-head-actions .receipt-new,
.receipt-head-actions .receipt-print{
  min-width:130px;
}

@media(max-width:700px){
  .receipt-head{
    align-items:flex-start!important;
    gap:12px;
  }
  .receipt-head-actions{
    width:100%;
  }
  .receipt-head-actions .receipt-new,
  .receipt-head-actions .receipt-print{
    flex:1 1 140px;
  }
}
