/* ========== Pivot Schedule Table ========== */
.schedule-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
}

.schedule-table {
  border-collapse: collapse;
  font-size: 12px;
  white-space: nowrap;
  min-width: 100%;
}

/* --- Header --- */
.schedule-table thead th {
  background: #f5f6f8;
  color: var(--text-secondary);
  font-weight: 600;
  padding: 6px 8px;
  border: 1px solid var(--border);
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 2;
}
.schedule-table thead th.date-header {
  background: #eef0ff;
  color: var(--primary);
  font-weight: 700;
  font-size: 13px;
}
.schedule-table thead th.sub-header {
  background: #f8f9fb;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

/* --- Machine column (sticky left) --- */
.schedule-table .col-machine {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #f5f6f8;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-primary);
  border-right: 2px solid var(--border);
  min-width: 70px;
  text-align: center;
}
.schedule-table tbody .col-machine {
  background: #fff;
  vertical-align: top;
}

/* --- Body cells --- */
.schedule-table tbody td {
  padding: 4px 6px;
  border: 1px solid var(--border-soft);
  vertical-align: middle;
  color: var(--text-primary);
}
.schedule-table tbody td.cell-product {
  font-weight: 500;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.schedule-table tbody td.cell-jack {
  color: var(--text-secondary);
  text-align: center;
  white-space: nowrap;
}
.schedule-table tbody td.cell-band {
  color: var(--text-secondary);
  text-align: center;
}
.schedule-table tbody td.cell-qty {
  text-align: right;
  font-weight: 600;
  color: var(--text-primary);
}
.schedule-table tbody td.cell-empty {
  color: var(--text-muted);
  text-align: center;
}

/* --- Date column group separator --- */
.schedule-table .date-sep {
  border-left: 2px solid var(--border);
}

/* --- Machine group separator --- */
.schedule-table tbody tr.machine-first td {
  border-top: 2px solid var(--border);
}

/* --- Weekend highlight --- */
.schedule-table thead th.weekend {
  background: #fff0f0;
  color: var(--danger);
}

/* --- Hover --- */
.schedule-table tbody tr:hover td {
  background: #fafbfd;
}
.schedule-table tbody tr:hover .col-machine {
  background: #f5f6f8;
}
