:root{font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#20242a;background:#f3f5f7;font-size:14px}
*{box-sizing:border-box}
body{margin:0}
.topbar{height:auto;min-height:62px;background:#172331;color:white;display:flex;align-items:center;justify-content:space-between;padding:12px max(20px,calc((100% - 1180px)/2));gap:20px}
.brand{font-weight:750;font-size:17px;white-space:nowrap}
.topbar nav{display:flex;align-items:center;gap:18px;flex-wrap:wrap}
.topbar a{color:#dce5ed;text-decoration:none;font-weight:600}
.topbar a.active,.topbar a:hover{color:white;text-decoration:underline;text-underline-offset:5px}
.topbar-left { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

.linea-form { display: flex; align-items: center; gap: 6px; }
.linea-label {
  font-size: 11px; color: #a7b4c1; text-transform: uppercase;
  letter-spacing: .4px; font-weight: 700;
}
#linea-select {
  background: #223547;
  color: #fff;
  border: 1px solid #2e475f;
  border-radius: 6px;
  padding: 5px 8px;
  font: inherit; font-size: 12px; font-weight: 600;
  min-width: 130px;
  cursor: pointer;
}
#linea-select:hover { background: #2a4055; }
#linea-select:focus { outline: 2px solid #4a9bd6; outline-offset: 1px; }
.mode{color:#a7e3bd;font-size:12px}
.container{max-width:1180px;margin:28px auto;padding:0 18px 60px}
.page-heading{display:flex;justify-content:space-between;align-items:end;margin-bottom:18px;gap:12px}
h1{font-size:25px;margin:0 0 5px}
.page-heading p{margin:0;color:#697582}
.editable-note{font-size:12px;color:#17683a;background:#e2f4e8;border-radius:20px;padding:7px 12px}
.flash{padding:11px 14px;border-radius:8px;margin-bottom:14px;background:#e8eef5}
.flash.success{background:#e4f4e9;color:#17683a}.flash.warning,.flash.danger{background:#fff0e8;color:#99451b}
.groups{display:flex;flex-direction:column;gap:20px}
.group-card{background:white;border:1px solid #dce2e8;border-radius:12px;padding:18px;box-shadow:0 2px 8px #1525350a}
.group-title h2 {
  font-size: 18px;
  margin: 0 0 13px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 15px;
  flex-wrap: wrap;
}
.group-title .semi-total { font-size: 17px; white-space: nowrap; color: #17683a; }

.semi-line {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #f5f7f9;
  border-radius: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
/* Layout scheda OPR a 3 colonne */
.order-card {
  border: 1px solid #e0e5ea;
  border-radius: 9px;
  padding: 14px;
  margin: 12px 0;
  background: #fff;
  display: grid;
  /* max-content forza la colonna a essere almeno larga quanto il suo contenuto più lungo */
  grid-template-columns: minmax(max-content, 1fr) minmax(max-content, 1.5fr) minmax(max-content, 1.5fr);
  grid-template-areas:
    "head    head    head"
    "fields  tableL  tableR"
    "notes   notes   actions";
  gap: 12px 14px;
  align-items: start;
  overflow-x: auto; /* Permette lo scroll orizzontale della singola scheda se lo schermo è troppo piccolo */
}
.order-card.archived { margin: 0; }
.order-card.dragging { opacity: .45; border: 2px dashed #4779a8; }

.order-head-line {
  grid-area: head;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 8px;
  border-bottom: 1px solid #e8ecf0;
}
.head-left { font-size: 15px; font-weight: 600; line-height: 1.35; }
.head-left strong { color: #1769aa; }
.head-right { font-size: 14px; white-space: nowrap; }
.qty-main { font-weight: 750; color: #20242a; }
.pallet-main { color: #17683a; font-weight: 650; }

.order-fields {
  grid-area: fields;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  min-width: 0;
}
.field-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 6px;
  align-items: baseline;
  padding: 4px 0;
  border-bottom: 1px dashed #eef1f4;
}
.field-row:last-child { border-bottom: 0; }
.field-label {
  font-size: 10px;
  font-weight: 700;
  color: #697582;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.field-value {
  color: #20242a;
  line-height: 1.35;
  white-space: nowrap; /* Impedisce al testo di andare a capo */
}
.field-value strong { color: #1769aa; }

.table-left-wrap  { grid-area: tableL; min-width: 0; }
.table-right-wrap { grid-area: tableR; min-width: 0; }
.components-wrap { overflow-x: auto; }

.components {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
}
.components td {
  border-top: 1px solid #e8ecf0;
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
  white-space: nowrap; /* Impedisce ai componenti di andare a capo */
}
.components tr:first-child td { border-top: 0; }
.components td.comp-label {
  width: 1%;
  white-space: nowrap;
  color: #52606d;
  padding-right: 6px;
}

.order-notes { grid-area: notes; min-width: 0; }
.order-actions {
  grid-area: actions;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.note-block, .note-label { /* manteniamo stile */ }
.note-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: #697582;
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 4px;
}

/* Form delle note affiancato */
.note-form { 
  display: flex; 
  flex-direction: row; /* Mette textarea e tasto sulla stessa riga */
  align-items: flex-start; 
  gap: 10px; 
  width: 100%;
}

/* La textarea prende tutto lo spazio disponibile */
.note-input {
  flex: 1; 
  width: 100%; 
  font: inherit; 
  font-size: 12px;
  border: 1px solid #cbd4dd; 
  border-radius: 6px;
  padding: 8px; 
  resize: vertical; 
  min-height: 54px;
  line-height: 1.4; 
  background: #fff;
}

.note-input:focus { 
  outline: 2px solid #1769aa33; 
  border-color: #1769aa; 
}

/* Contenitore del tasto e del messaggio "Salvata" */
.note-actions { 
  display: flex; 
  flex-direction: column; /* Mette il messaggio "Salvata" sotto al tasto, non di lato */
  gap: 6px; 
  align-items: flex-start;
}

.note-save { 
  padding: 8px 12px; 
  font-size: 12px; 
  white-space: nowrap; /* Impedisce al tasto di andare a capo */
}

.note-status { font-size: 11px; color: #52606d; }
.note-status.ok { color: #17683a; font-weight: 600; }
.note-status.error { color: #99451b; font-weight: 600; }
.note-readonly {
  white-space: pre-wrap; font-size: 12px; color: #536170;
  background: #f7f8fa; border: 1px solid #e8ecf0; border-radius: 6px;
  padding: 8px; min-height: 34px; line-height: 1.4;
}

/* semi-line: lavaggio + totali */
.semi-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: #f5f7f9;
  border-radius: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.semi-totals {
  display: flex;
  gap: 14px;
  font-size: 13px;
  color: #20242a;
  white-space: nowrap;
}
.semi-totals strong { font-weight: 750; }
.semi-totals strong:last-child { color: #17683a; }
.semi-line>div{min-width:0}.semi-line>div span{color:#4c5864}
.semi-total{font-size:19px;white-space:nowrap;color:#17683a}
.order-card.dragging{opacity:.45;border:2px dashed #4779a8}
.order-head{display:grid;grid-template-columns:minmax(0,1fr) minmax(130px,180px);align-items:center;gap:12px;margin-bottom:8px}
.order-doc{font-weight:750;font-size:15px}
.order-quantity{text-align:right;font-weight:750;font-size:16px;white-space:nowrap}
.product-line>div{font-weight:600;line-height:1.4}
.note-block{margin-top:14px;padding-top:12px;border-top:1px solid #e8ecf0}
.note-label{display:block;font-size:11px;font-weight:700;color:#52606d;text-transform:uppercase;letter-spacing:.4px;margin-bottom:6px}
.note-status{font-size:11px;color:#52606d}
.note-status.ok{color:#17683a;font-weight:600}
.note-status.error{color:#99451b;font-weight:600}
.note-readonly{white-space:pre-wrap;font-size:12px;color:#536170;background:#f7f8fa;border:1px solid #e8ecf0;border-radius:6px;padding:8px;min-height:34px;line-height:1.4}
.product-meta span:last-child{text-align:right}
.components-wrap{overflow-x:auto}
.components{border-collapse:collapse;width:100%;font-size:12px}
.components th,.components td{border-top:1px solid #e8ecf0;padding:6px 8px;text-align:left;vertical-align:top}
.components th{background:#f7f8fa;color:#52606d;font-weight:700}
.components td:first-child{width:55px;white-space:nowrap}
.components td:last-child,.components th:last-child{width:55px}
.right{text-align:right!important;white-space:nowrap}
.order-actions{display:flex;justify-content:space-between;align-items:center;margin-top:10px}
.action-group{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.unschedule-btn{white-space:nowrap}
button{background:#1769aa;color:white;border:0;border-radius:6px;padding:9px 13px;font-weight:650;cursor:pointer}
button:hover{filter:brightness(.94)}
button.secondary{background:#edf1f5;color:#394958;border:1px solid #d5dde5}
.drag-hint{font-size:11px;color:#8a96a2}
.group-summary{display:flex;align-items:center;justify-content:space-between;gap:15px;border-top:1px solid #e1e6eb;margin-top:14px;padding:15px 4px 1px;font-size:15px}
.group-summary strong:last-child{font-size:20px}
.empty{padding:30px;text-align:center;color:#697582;background:white;border:1px solid #dce2e8;border-radius:10px}
.login-card{max-width:420px;margin:60px auto;background:white;border:1px solid #dce2e8;border-radius:12px;padding:25px;box-shadow:0 4px 20px #1723310d}
.login-card h1{font-size:22px}.login-card p{color:#697582;line-height:1.5}
.login-card form{display:flex;flex-direction:column;gap:9px;margin-top:20px}
.login-card input{border:1px solid #cbd4dd;border-radius:7px;padding:11px;font:inherit}
.login-card button{margin-top:8px}
.move-btn:disabled { opacity: 0.4; cursor: wait; }
/* ===== Sidebar "Da schedulare" ===== */
.topbar { position: relative; z-index: 50; }

body { transition: padding-left .25s ease; }
body.has-sidebar:not(.sidebar-collapsed) { padding-left: 300px; }

.unscheduled-panel {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: 300px;
  background: #fff;
  border-right: 1px solid #dce2e8;
  z-index: 40;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding-top: 62px;
  transform: translateX(0);
  transition: transform .25s ease;
}
.unscheduled-panel::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 62px;
  background: #172331;
  border-bottom: 1px solid #0c1620;
}
body.sidebar-collapsed .unscheduled-panel { transform: translateX(-100%); }

.unscheduled-head {
  padding: 14px 16px;
  border-bottom: 1px solid #e8ecf0;
  background: #f5f7f9;
}
.unscheduled-head h2 {
  margin: 0; font-size: 13px; font-weight: 750; color: #20242a;
  text-transform: uppercase; letter-spacing: .4px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.unscheduled-count {
  background: #1769aa; color: #fff;
  font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 700;
  letter-spacing: 0;
}
.unscheduled-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background .15s;
}
.unscheduled-list.drop-active {
  background: #eef5fb;
  box-shadow: inset 0 0 0 2px #1769aa;
}
.unscheduled-empty {
  color: #8a96a2; font-size: 12px; text-align: center; padding: 24px 8px;
}
.unscheduled-item {
  background: #fff;
  border: 1px solid #dce2e8;
  border-radius: 8px;
  padding: 9px 11px;
  cursor: grab;
  user-select: none;
  display: flex; flex-direction: column; gap: 4px;
  transition: border-color .15s, box-shadow .15s;
}
.unscheduled-item:hover { border-color: #a8bfd4; box-shadow: 0 2px 6px #15253510; }
.unscheduled-item.dragging { opacity: .5; border: 2px dashed #4779a8; }
.u-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.u-doc { font-size: 10px; color: #8a96a2; font-weight: 600; letter-spacing: .3px; }
.u-qty { font-size: 12px; font-weight: 750; color: #17683a; white-space: nowrap; }
.u-bott { font-size: 13px; font-weight: 750; color: #20242a; }
.u-desc {
  font-size: 12px; color: #536170; line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

/* Toggle in topbar */
.sidebar-toggle {
  background: transparent;
  color: #dce5ed;
  border: 1px solid #dce5ed44;
  padding: 6px 10px;
  font: inherit; font-size: 12px; font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.sidebar-toggle:hover { background: #ffffff10; color: #fff; filter: none; }
.toggle-icon::before { content: "◀"; font-size: 10px; }
body.sidebar-collapsed .toggle-icon::before { content: "▶"; }
body:not(.has-sidebar) .sidebar-toggle { display: none; }

/* Drop indicator area principale */
#groups.drop-active {
  outline: 2px dashed #1769aa;
  outline-offset: 8px;
  border-radius: 12px;
}

/* Doc + frecce */
.order-doc { font-weight: 750; font-size: 15px; }
.move-buttons { display: inline-flex; gap: 2px; margin-left: 2px; }
.move-btn {
  background: #edf1f5;
  color: #394958;
  border: 1px solid #d5dde5;
  padding: 7px 9px;
  font: inherit;
  font-size: 11px;
  line-height: 1;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
}
.move-btn:hover { background: #dfe8f0; border-color: #a8bfd4; filter: none; }
.move-btn:active { transform: translateY(1px); }
.move-btn:disabled { opacity: 0.4; cursor: wait; }

/* Indicatore drop tra ordini */
.drop-indicator {
  height: 3px;
  background: #1769aa;
  border-radius: 2px;
  margin: 8px 0;
  position: relative;
  box-shadow: 0 0 8px 2px #1769aa55;
  animation: dropPulse 0.7s ease-in-out infinite alternate;
  pointer-events: none;
}
.drop-indicator::before {
  content: "▼ inserisci qui";
  position: absolute;
  left: 50%;
  top: -24px;
  transform: translateX(-50%);
  background: #1769aa;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
  letter-spacing: 0.3px;
  z-index: 5;
}
@keyframes dropPulse {
  from { opacity: 0.75; }
  to { opacity: 1; }
}

#groups.drop-active {
  outline: 2px dashed #1769aa;
  outline-offset: 8px;
  border-radius: 12px;
}

/* Lavaggio */
.wash-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  background: #eef5fb;
  border: 1px solid #cfe1f0;
  border-radius: 6px;
  font-size: 12px;
  min-width: 0;
}
.wash-cell[data-prev] { cursor: pointer; }
.wash-cell[data-prev]:hover { background: #e0eef9; border-color: #a8bfd4; }
.wash-cell.wash-missing { background: #fff0e8; border-color: #f5c7a5; }
.wash-cell.wash-missing[data-prev]:hover { background: #ffe4d4; }
.wash-label {
  font-weight: 700; color: #52606d;
  text-transform: uppercase; font-size: 10px; letter-spacing: .4px;
}
.wash-value { font-weight: 650; color: #20242a; }
.wash-cell.wash-missing .wash-value { color: #99451b; }
.wash-select {
  font: inherit; font-size: 12px;
  padding: 3px 6px;
  border: 1px solid #cbd4dd;
  border-radius: 4px;
  background: #fff;
}
.wash-cell.wash-first {
  background: #f0f0f0;
  border-color: #d0d0d0;
  cursor: default;
}
.wash-cell.wash-first .wash-value { color: #52606d; }

/* ===== Header gruppo ===== */
.group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 10px;
}
.group-title[draggable="true"] { cursor: grab; }
.group-title[draggable="true"]:active { cursor: grabbing; }
.group-title h2 { font-size: 18px; margin: 0; }
.group-title-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.group-arrows { display: inline-flex; gap: 2px; }
.move-group-btn {
  background: #edf1f5; color: #394958; border: 1px solid #d5dde5;
  padding: 4px 7px; font: inherit; font-size: 10px; line-height: 1;
  border-radius: 4px; cursor: pointer; font-weight: 700;
}
.move-group-btn:hover { background: #dfe8f0; border-color: #a8bfd4; filter: none; }
.group-qta {
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
  font-size: 12px; color: #4c5864;
}
.qta-input {
  width: 90px; text-align: right; font: inherit; font-size: 18px;
  font-weight: 750; color: #17683a;
  border: 1px solid #cbd4dd; border-radius: 6px; padding: 4px 6px;
}
.qta-target { font-size: 18px; font-weight: 750; color: #17683a; }
.qta-meta { font-size: 11px; color: #697582; }

.group-card.dragging-group { opacity: .5; border: 2px dashed #4779a8; }

/* ===== Lavaggio (invariato) ===== */
.wash-cell { display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px;
  background: #eef5fb; border: 1px solid #cfe1f0; border-radius: 6px; font-size: 12px; min-width: 0; }
.wash-cell[data-prev] { cursor: pointer; }
.wash-cell[data-prev]:hover { background: #e0eef9; border-color: #a8bfd4; }
.wash-cell.wash-missing { background: #fff0e8; border-color: #f5c7a5; }
.wash-cell.wash-missing[data-prev]:hover { background: #ffe4d4; }
.wash-cell.wash-first { background: #f0f0f0; border-color: #d0d0d0; cursor: default; }
.wash-cell.wash-first .wash-value { color: #52606d; }
.wash-label { font-weight: 700; color: #52606d; text-transform: uppercase; font-size: 10px; letter-spacing: .4px; }
.wash-value { font-weight: 650; color: #20242a; }
.wash-cell.wash-missing .wash-value { color: #99451b; }
.wash-select { font: inherit; font-size: 12px; padding: 3px 6px; border: 1px solid #cbd4dd; border-radius: 4px; background: #fff; }

/* ===== Sidebar unscheduled ===== */
.u-semi { font-size: 11px; color: #52606d; margin-top: 2px; font-weight: 600; }

/* ===== Drop zone vuota ===== */
#groups.drop-zone-empty {
  outline: 2px dashed #99451b;
  outline-offset: 10px;
  border-radius: 12px;
  background: #fff8f3;
}
#groups.drop-zone-empty::after {
  content: "Rilascia per creare un nuovo gruppo con questo semilavorato";
  display: block;
  text-align: center;
  color: #99451b;
  font-weight: 700;
  font-size: 13px;
  padding: 20px;
}

/* ===== Bottoni primari ===== */
button.primary { background: #17683a; }
button.primary:hover { filter: brightness(1.05); }

/* ===== Dialog creazione gruppo ===== */
.group-dialog {
  border: 1px solid #cbd4dd;
  border-radius: 12px;
  padding: 22px;
  max-width: 420px;
  width: calc(100% - 32px);
  box-shadow: 0 10px 40px rgba(0,0,0,.2);
}
.group-dialog::backdrop { background: rgba(0,0,0,.35); }
.group-dialog h2 { font-size: 18px; margin: 0 0 16px; }
.group-dialog label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px; color: #52606d; margin-bottom: 12px;
}
.group-dialog input {
  border: 1px solid #cbd4dd; border-radius: 6px;
  padding: 8px 10px; font: inherit; font-size: 14px;
}
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

/* ===== Archivio piatta ===== */
.archived-list { display: flex; flex-direction: column; gap: 14px; }
.order-card.archived { margin: 0; }

/* ===== Drop indicator ===== */
.drop-indicator {
  height: 3px; background: #1769aa; border-radius: 2px; margin: 8px 0;
  position: relative; box-shadow: 0 0 8px 2px #1769aa55;
  animation: dropPulse 0.7s ease-in-out infinite alternate; pointer-events: none;
}
.drop-indicator::before {
  content: "▼ inserisci qui";
  position: absolute; left: 50%; top: -24px; transform: translateX(-50%);
  background: #1769aa; color: #fff; font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 10px; white-space: nowrap; z-index: 5;
}
.drop-indicator.group-indicator { background: #17683a; box-shadow: 0 0 8px 2px #17683a55; }
.drop-indicator.group-indicator::before { content: "▼ sposta qui"; background: #17683a; }
@keyframes dropPulse { from { opacity: .75; } to { opacity: 1; } }
.group-card.drop-active { outline: 2px solid #1769aa44; outline-offset: 2px; }

/* ===== Frecce OPR (già definite, ripetute per sicurezza) ===== */
.move-buttons { display: inline-flex; gap: 2px; margin-left: 2px; }
.move-btn {
  background: #edf1f5; color: #394958; border: 1px solid #d5dde5;
  padding: 7px 9px; font: inherit; font-size: 11px; line-height: 1;
  border-radius: 6px; cursor: pointer; font-weight: 700;
}
.move-btn:hover { background: #dfe8f0; border-color: #a8bfd4; filter: none; }
.move-btn:disabled { opacity: 0.4; cursor: wait; }
/* Drop zone per creazione gruppo da drag in area vuota */
#groups { min-height: 140px; }
#groups:has(> .group-card) { min-height: auto; }

#groups.drop-zone-empty {
  outline: 2px dashed #99451b;
  outline-offset: 10px;
  border-radius: 12px;
  background: #fff8f3;
}
#groups.drop-zone-empty::after {
  content: "Rilascia per creare un nuovo gruppo con questo semilavorato";
  display: block;
  text-align: center;
  color: #99451b;
  font-weight: 700;
  font-size: 13px;
  padding: 20px;
}

/* Dialog: campo read-only quando si assegna un OPR */
.group-dialog input[readonly] { background: #f0f3f6; color: #697582; cursor: not-allowed; }

/* Order quantity con colli */
.order-quantity { white-space: nowrap; }

/* OPR spariti dall'ultima importazione */
.order-card.missing-import {
  opacity: 0.6;
  background-color: #f4f5f7;
  border-color: #d1d5db;
}
.order-card.missing-import .order-head-line {
  color: #697582;
}
.order-card.missing-import .order-head-line strong {
  color: #8a96a2;
}
/* Per evitare che il drag o i click sembrino attivi su OPR vecchi */
.order-card.missing-import .order-actions,
.order-card.missing-import .note-block {
  opacity: 0.8;
}

@media(max-width:900px){
  .order-body{grid-template-columns:1fr;gap:10px}

  /* Sidebar overlay su mobile */
  body.has-sidebar:not(.sidebar-collapsed){padding-left:0}
  .unscheduled-panel{
    width:100%;
    max-width:380px;
    box-shadow:4px 0 24px rgba(0,0,0,.15);
  }
  .sidebar-toggle-text{display:none}
}

@media(max-width:700px){
 .topbar{align-items:flex-start;flex-direction:column;padding:13px 16px;gap:10px}
 .topbar nav{gap:13px;font-size:12px}
 .container{margin:18px auto;padding:0 10px 40px}
 .group-card{padding:12px}
 .semi-line{align-items:flex-start;padding:10px;gap:8px}
 .semi-line>div{font-size:12px}
 .semi-total{font-size:16px}
 .order-card{padding:10px}
 .order-quantity{font-size:14px}
 .product-line{grid-template-columns:minmax(0,1fr) auto;gap:7px;font-size:12px}
 .product-meta span:last-child{text-align:left}
 .components{min-width:570px}
 .group-summary{font-size:13px}
 .group-summary strong:last-child{font-size:17px}
 .action-group{gap:6px}
 .unschedule-btn{font-size:12px;padding:7px 9px}
  .topbar-left { gap: 10px; }
  .linea-label { display: none; }
  #linea-select { min-width: 100px; font-size: 11px; padding: 5px 6px; }
  .drop-indicator::before { font-size: 9px; padding: 1px 6px; top: -20px; }
  .move-btn { padding: 6px 7px; font-size: 10px; }
  .wash-cell { font-size: 11px; padding: 6px 8px; gap: 6px; }
  .wash-label { display: none; }
  .group-title h2 { font-size: 15px; }
  .qta-input { width: 70px; font-size: 15px; }
  .qta-target { font-size: 15px; }
  .wash-cell { font-size: 11px; padding: 6px 8px; gap: 6px; }
  .wash-label { display: none; }
  .move-btn, .move-group-btn { padding: 5px 6px; font-size: 10px; }
  #groups.drop-zone-empty::after { font-size: 11px; padding: 14px; }
  .order-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "fields"
      "tableL"
      "tableR"
      "notes"
      "actions";
  }
}
