/* SCOPE: non sporca il resto del sito */
#planning-dashboard{
  background:#071a2a;
  color:#e9f2ff;
  height: 80vh;            /* in editor spesso 100vh è scomodo */
  min-height: 520px;
  width: 100%;
  overflow: hidden;
  font-family: Arial, sans-serif;
}

#planning-dashboard .board{
  height: 100%;
  display:flex;
  flex-direction:column;
}

#planning-dashboard .board__header{
  padding:12px 14px;
  border-bottom: 1px solid rgba(255,255,255,.14);
  background: rgba(10,34,56,.98);
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap: 16px;
}

#planning-dashboard .board__brand{
  font-weight: 800;
  letter-spacing:.6px;
}

#planning-dashboard .board__subtitle{
  margin-top:4px;
  font-size: 13px;
  color: rgba(233,242,255,.72);
}

#planning-dashboard .board__meta{
  font-size: 12px;
  color: rgba(233,242,255,.72);
}

#planning-dashboard .gridWrap{
  flex: 1;
  overflow: auto;
}

/* QUESTA È LA PARTE CHE TI MANCA: la griglia vera */
#planning-dashboard .grid{
    display: grid !important;

  /* PRIMA COLONNA STRETTA + ALTRE LARGHE */
  grid-template-columns: 40px repeat(var(--operators), minmax(280px, 1fr));
  grid-auto-rows: minmax(96px, auto);
  border-top: 1px solid rgba(255,255,255,.14);
  width: 100%;
}

/* celle */
#planning-dashboard .cell{
  border-right: 1px solid rgba(255,255,255,.14);
  border-bottom: 1px solid rgba(255,255,255,.14);
  padding: 8px;
  background: rgba(12,42,69,.55);
  white-space: normal;
}

#planning-dashboard .cell--head{
  position: sticky;
  top: 0;
  z-index: 4;
  background: rgba(10,34,56,.98);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 12px;
}

#planning-dashboard .cell--day{
  position: sticky;
  left: 0;
  z-index: 3;
  background: rgba(10,34,56,.98);
  font-weight: 400;
  font-size: 12px;
  white-space: pre-line; /* per andare a capo con \n */
  height: auto; 
}

#planning-dashboard .cell--corner{
  position: sticky;
  left: 0;
  top: 0;
  z-index: 5;
  background: rgba(6,20,34,.98);
}

/* contenitore ticket nella cella */
#planning-dashboard .tickets{
  background: rgba(18,57,95,.45);
  border: 1px solid rgba(255,255,255,.14);
  border-left: 4px solid #3b82f6;
  border-radius: 8px;
  padding: 10px 12px;

  display: flex;
  flex-direction: column;
  gap: 14px;   /* ✅ SPAZIO TRA I TICKET */
}

/* card ticket */
/* AZIENDA: più piccola e meno invasiva */
#planning-dashboard .ticket-client{
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  color: rgba(233,242,255,.75);
  text-transform: uppercase; /* opzionale */
}

.ticket {
  background: linear-gradient(180deg, #0f2a44, #0c2236);
  border-left: 4px solid #3b82f6;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 6px;
  font-size: 13px;
}

.ticket-title {
    font-weight: 800;
  font-size: 13px;
  padding: 6px 8px;
  margin: -8px -10px 6px -10px; /* allarga a tutta la card */
  border-radius: 6px 6px 0 0;
  color: #fff;
}

.ticket-sub {
  font-size: 12px;
  color: #bcd1ea;
  margin-top: 2px;
}

.ticket-meta {
  margin-top: 6px;
}

.badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  margin-right: 6px;
}

.badge-status {
  background: #2563eb;
}

.badge-priority {
  background: #dc2626;
}

.ticket-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 11px;
  color: #93c5fd;
}


/* BASE */
.ticket-card {
  margin: 0;
  padding: 0;
  line-height: 1.2;
}

.day-column {
  min-height: 120px;
  height: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: visible;
}

/* CALDO */
.ticket-title.type-caldo{
  background: #b91c1c;
}

/* FREDDO */
.ticket-title.type-freddo{
  background: #1e3a8a;
}

/* CLIMATIZZAZIONE */
.ticket-title.type-climatizzazione{
  background: #0369a1;
}

/* ASPIRAZIONE */
.ticket-title.type-aspirazione{
  background: #374151;
}

/* fallback */
.ticket-title.type-default{
  background: #334155;
}

/* PRIORITÀ / STATO MACCHINA */
.badge-priority{
  font-weight: 700;
  color: #fff;
}

/* SOLO FERMO È ROSSO */
.badge-priority.priority-fermo{
  background: #dc2626; /* rosso */
}

/* RALLENTATO */
.badge-priority.priority-rallentato{
  background: #f59e0b; /* arancione */
  color: #111827;
}

/* FUNZIONANTE */
.badge-priority.priority-funzionante{
  background: #16a34a; /* verde */
}

/* fallback */
.badge-priority:not(.priority-fermo):not(.priority-rallentato):not(.priority-funzionante){
  background: #475569;
}
#weekGrid .week-col{
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(12,42,69,.35);
  border-radius:

